You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to display return addresses in the telescope, stack etc outputs.
I initially worked on it in #794 but the patch had some issues.
We should proceed with:
Move the logic of finding return addresses to pwndbg.stack.yield_return_addresses, e.g.:
defyield_return_addresses():
sp=pwndbg.regs.spstack=pwndbg.vmmap.find(sp)
# Enumerate all return addressesframe=gdb.newest_frame()
addresses= []
whileframe:
addresses.append(frame.pc())
frame=frame.older()
# Find all of them on the stackstart=stack.vaddrstop=start+stack.memszwhileaddressesandstart<sp<stop:
value=pwndbg.memory.u(sp)
ifvalueinaddresses:
index=addresses.index(value)
deladdresses[:index]
yieldspsp+=pwndbg.arch.ptrsize
Question: shouldn't the first operator (between start and sp) here: start < sp < stop be <=? On a quick glance now I think so
Rethink how to add it into telescope and other output
Shall we display it in all cases or only on demand?
Rethink if we want to add GDB variables for return addresses. This is really neat, but if we do it, we probably need to do it on each GDB stop and then it may be hurt performance on tough targets when debugging via gdbserver...
The text was updated successfully, but these errors were encountered:
It would be great to display return addresses in the
telescope
,stack
etc outputs.I initially worked on it in #794 but the patch had some issues.
We should proceed with:
pwndbg.stack.yield_return_addresses
, e.g.:start
andsp
) here:start < sp < stop
be<=
? On a quick glance now I think sotelescope
and other outputThe text was updated successfully, but these errors were encountered: