Bugfixes, make errno better

pull/14/head
Zach Riggle 11 years ago
parent 4439892671
commit 37c4f8ca21

@ -13,8 +13,8 @@ _errno.errorcode[0] = 'OK'
@_pwndbg.commands.ParsedCommand
def errno(err=None):
if err is None:
err = _pwndbg.regs.retval
err = _pwndbg.regs[err]
# Dont ask.
err = int(gdb.parse_and_eval('*((int *(*) (void)) __errno_location) ()'))
err = abs(int(err))

@ -104,6 +104,9 @@ def get(address, instructions=1):
def near(address, instructions=1):
current = one(address)
if not current:
return []
# Try to go backward by seeing which instructions we've returned
# before, which were followed by this one.
needle = address

Loading…
Cancel
Save