mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-02-17 06:08:28 +00:00
m1n1.hv: Improve bt()
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
9cc0c0a55b
commit
a816f2718b
1 changed files with 6 additions and 1 deletions
|
@ -873,10 +873,15 @@ class HV(Reloadable):
|
|||
if frame is None:
|
||||
frame = self.ctx.regs[29]
|
||||
if lr is None:
|
||||
lr = self.unpac(self.ctx.regs[30])
|
||||
lr = self.unpac(self.ctx.elr) + 4
|
||||
|
||||
print("Stack trace:")
|
||||
frames = set()
|
||||
while frame:
|
||||
if frame in frames:
|
||||
print("Stack loop detected!")
|
||||
break
|
||||
frames.add(frame)
|
||||
print(f" - {self.addr(lr - 4)}")
|
||||
lrp = self.p.hv_translate(frame + 8)
|
||||
fpp = self.p.hv_translate(frame)
|
||||
|
|
Loading…
Add table
Reference in a new issue