From 1f6d65f80b64d46528b07293a0bfd282a53146ee Mon Sep 17 00:00:00 2001 From: Zach Riggle Date: Thu, 23 Jun 2016 01:56:10 -0400 Subject: [PATCH] Revert "Show "x" when the condition instruction will not be taken (#74)" This reverts commit 6c04e5368e4d48472e10b5fbbb8cbf2a305fe187. Conflicts: pwndbg/disasm/color.py --- pwndbg/disasm/arch.py | 4 ++-- pwndbg/disasm/arm.py | 2 +- pwndbg/disasm/color.py | 2 +- pwndbg/disasm/x86.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pwndbg/disasm/arch.py b/pwndbg/disasm/arch.py index 44e350d60..015a8404e 100644 --- a/pwndbg/disasm/arch.py +++ b/pwndbg/disasm/arch.py @@ -76,7 +76,7 @@ class DisassemblyAssistant(object): instruction.condition = c def condition(self, instruction): - return None + return False def enhance_next(self, instruction): """ @@ -248,7 +248,7 @@ class DisassemblyAssistant(object): for i, op in enumerate(ins.operands): rv.append(' operands[%i] = %s' % (i, ops.get(op.type, op.type))) - #rv.append(' access = %s' % (access.get(op.access, op.access))) + rv.append(' access = %s' % (access.get(op.access, op.access))) if op.int is not None: rv.append(' int = %#x' % (op.int)) diff --git a/pwndbg/disasm/arm.py b/pwndbg/disasm/arm.py index 3df18ec12..46972267d 100644 --- a/pwndbg/disasm/arm.py +++ b/pwndbg/disasm/arm.py @@ -42,7 +42,7 @@ class DisassemblyAssistant(pwndbg.disasm.arch.DisassemblyAssistant): return None if instruction.address != pwndbg.regs.pc: - return None + return False cpsr = pwndbg.regs.cpsr diff --git a/pwndbg/disasm/color.py b/pwndbg/disasm/color.py index d514a833e..57448d2fd 100644 --- a/pwndbg/disasm/color.py +++ b/pwndbg/disasm/color.py @@ -64,6 +64,6 @@ def instruction(ins): elif ins.condition: asm = pwndbg.color.green(u'✔ ') + asm else: - asm = pwndbg.color.red(u'✘ ') + asm + asm = ' ' + asm return asm diff --git a/pwndbg/disasm/x86.py b/pwndbg/disasm/x86.py index 798093bfa..3bb491497 100644 --- a/pwndbg/disasm/x86.py +++ b/pwndbg/disasm/x86.py @@ -132,7 +132,7 @@ class DisassemblyAssistant(pwndbg.disasm.arch.DisassemblyAssistant): # We can't reason about anything except the current instruction if instruction.address != pwndbg.regs.pc: - return None + return False efl = pwndbg.regs.eflags