mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-5163: Read stack at $sp-1 for 2, for negative stack growth.
This commit is contained in:
parent
954ff4e124
commit
83a9feedbe
3 changed files with 17 additions and 17 deletions
|
@ -77,8 +77,8 @@ class ProcessState(object):
|
|||
commands.putreg()
|
||||
commands.putmem('0x{:x}'.format(util.get_pc()),
|
||||
"1", display_result=False)
|
||||
commands.putmem('0x{:x}'.format(util.get_sp()),
|
||||
"1", display_result=False)
|
||||
commands.putmem('0x{:x}'.format(util.get_sp()-1),
|
||||
"2", display_result=False)
|
||||
commands.put_frames()
|
||||
self.visited.add(thread)
|
||||
frame = util.selected_frame()
|
||||
|
|
|
@ -101,7 +101,7 @@ class InferiorState(object):
|
|||
except gdb.MemoryError as e:
|
||||
print(f"Couldn't record page with PC: {e}")
|
||||
try:
|
||||
commands.putmem("$sp", "1", from_tty=False)
|
||||
commands.putmem("$sp-1", "2", from_tty=False)
|
||||
except gdb.MemoryError as e:
|
||||
print(f"Couldn't record page with SP: {e}")
|
||||
self.visited.add(hashable_frame)
|
||||
|
|
|
@ -80,7 +80,7 @@ class ProcessState(object):
|
|||
except BaseException as e:
|
||||
print(f"Couldn't record page with PC: {e}")
|
||||
try:
|
||||
commands.putmem("$sp", "1", result=None)
|
||||
commands.putmem("$sp-1", "2", result=None)
|
||||
except BaseException as e:
|
||||
print(f"Couldn't record page with SP: {e}")
|
||||
self.visited.add(hashable_frame)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue