Skip to content

Commit

Permalink
use an f string to compute the value of addrsz
Browse files Browse the repository at this point in the history
  • Loading branch information
smiley committed Aug 3, 2023
1 parent 14a3373 commit aa7c121
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pwndbg/commands/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ def context_backtrace(with_banner=True, target=sys.stdout, width=None):
frame_pc_on_stack = pwndbg.gdblib.stack.find_addr_on_stack(frame_pc)
padded_text = "0x" + hex(frame_pc_on_stack)[2:].zfill(pwndbg.gdblib.arch.ptrsize * 2)
stackaddr = M.get(frame_pc_on_stack, padded_text)
addrsz = "(" + stackaddr + ") " + M.get(frame_pc)
addrsz = f"({stackaddr}) {M.get(frame_pc)}"
symbol = c.symbol(pwndbg.gdblib.symbol.get(int(frame_pc)))
if symbol:
addrsz = addrsz + " " + symbol
Expand Down

0 comments on commit aa7c121

Please sign in to comment.