mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-26 03:38:25 +08:00
Commit missing parts of cf41890
.
This commit is contained in:
parent
cf41890255
commit
a829b8a6fc
@ -151,7 +151,11 @@ class Target:
|
|||||||
if addresses == []:
|
if addresses == []:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
offset_addresses = [hex(addr) for addr in addresses]
|
# We got a list of return addresses, i.e. addresses of instructions
|
||||||
|
# just after the call. Offset them back to get an address somewhere
|
||||||
|
# inside the call instruction (or its delay slot), since that's what
|
||||||
|
# the backtrace entry should point at.
|
||||||
|
offset_addresses = [hex(addr - 1) for addr in addresses]
|
||||||
with RunTool([self.triple + "-addr2line", "--addresses", "--functions", "--inlines",
|
with RunTool([self.triple + "-addr2line", "--addresses", "--functions", "--inlines",
|
||||||
"--exe={library}"] + offset_addresses,
|
"--exe={library}"] + offset_addresses,
|
||||||
library=library) \
|
library=library) \
|
||||||
@ -164,7 +168,7 @@ class Target:
|
|||||||
except StopIteration:
|
except StopIteration:
|
||||||
break
|
break
|
||||||
if address_or_function[:2] == "0x":
|
if address_or_function[:2] == "0x":
|
||||||
address = int(address_or_function[2:], 16)
|
address = int(address_or_function[2:], 16) + 1 # remove offset
|
||||||
function = next(lines)
|
function = next(lines)
|
||||||
else:
|
else:
|
||||||
address = backtrace[-1][4] # inlined
|
address = backtrace[-1][4] # inlined
|
||||||
|
Loading…
Reference in New Issue
Block a user