diff --git a/pwndbg/commands/context.py b/pwndbg/commands/context.py index b3626577f..a39d810d6 100644 --- a/pwndbg/commands/context.py +++ b/pwndbg/commands/context.py @@ -24,6 +24,8 @@ import pwndbg.vmmap def context(*args): """ Print out the current register, instruction, and stack context. + + Accepts subcommands 'reg', 'code', 'stack', 'backtrace', and 'args'. """ if len(args) == 0: args = ['reg','code','stack','backtrace','args'] diff --git a/pwndbg/disasm/color.py b/pwndbg/disasm/color.py index daeb5e09b..d5aeda305 100644 --- a/pwndbg/disasm/color.py +++ b/pwndbg/disasm/color.py @@ -13,7 +13,6 @@ capstone.CS_GRP_JUMP def instruction(ins): asm = u'%-06s %s' % (ins.mnemonic, ins.op_str) - branch = set(ins.groups) & capstone_branch_groups # tl;dr is a branch? @@ -26,10 +25,10 @@ def instruction(ins): # If it's a constant expression, color it directly in the asm. if const and const != 0: - asm = asm.replace(hex(ins.target), target) + asm = asm.replace(hex(ins.target), sym or target) if sym: - asm = '%-36s <%s>' % (asm, sym) + asm = '%-36s <%s>' % (asm, target) # It's not a constant expression, but we've calculated the target # address by emulation.