From a6d4e77c4aade27dd0c6fa939b33b021656ba086 Mon Sep 17 00:00:00 2001 From: Zach Riggle Date: Sat, 11 Apr 2015 15:04:19 -0700 Subject: [PATCH] Better enhancing --- pwndbg/enhance.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pwndbg/enhance.py b/pwndbg/enhance.py index 317d2f226..e5eb60a2a 100644 --- a/pwndbg/enhance.py +++ b/pwndbg/enhance.py @@ -84,16 +84,18 @@ def enhance(value): retval = [] + print([instr,intval0,szval]) + # If it's on the stack, don't display it as code in a chain. if instr and 'stack' in page.objfile: retval = [intval, szval] # If it's RWX but a small value, don't display it as code in a chain. - elif instr and rwx and intval0 > 0x1000: - retval = [instr, intval, szval] + elif instr and rwx and intval0 < 0x1000: + retval = [intval, szval] # If it's an instruction and *not* RWX, display it unconditionally - elif instr: + elif instr and exe: if not rwx: retval = [instr] else: