fix(ui): fix display of addrsz to be hex formated

Currently this function is only used for the backtrace context and does
not prefix the frame pointers in hex form, which can be annoying if the
value is copied to be inspected or otherwise processed.
pull/908/head
anthraxx 5 years ago committed by Disconnect3d
parent a5c9738eec
commit a8c2fb5342

@ -50,7 +50,7 @@ def banner(title, target=sys.stdin, width=None):
def addrsz(address): def addrsz(address):
address = int(address) & pwndbg.arch.ptrmask address = int(address) & pwndbg.arch.ptrmask
return "%{}x".format(2*pwndbg.arch.ptrsize) % address return "%#{}x".format(2*pwndbg.arch.ptrsize) % address
def get_window_size(target=sys.stdin): def get_window_size(target=sys.stdin):
fallback = (int(os.environ.get('LINES', 20)), int(os.environ.get('COLUMNS', 80))) fallback = (int(os.environ.get('LINES', 20)), int(os.environ.get('COLUMNS', 80)))

Loading…
Cancel
Save