pull/2453/head
OBarronCS 1 year ago committed by GitHub
parent fdae52404b
commit 88c363a65e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -24,7 +24,6 @@ import pwndbg.color.memory
import pwndbg.integration import pwndbg.integration
import pwndbg.lib.cache import pwndbg.lib.cache
from pwndbg import color from pwndbg import color
from pwndbg.color.syntax_highlight import syntax_highlight
def format_small_int(value: int) -> str: def format_small_int(value: int) -> str:
@ -113,11 +112,11 @@ def enhance(
rwx = exe = False rwx = exe = False
if exe: if exe:
pwndbg_instr = pwndbg.aglib.disasm.one(value, enhance=False) pwndbg_instr = pwndbg.aglib.disasm.one(value)
if pwndbg_instr: if pwndbg_instr:
instr = f"{pwndbg_instr.mnemonic} {pwndbg_instr.op_str}" # For telescoping, we don't want the extra spaces between the mnemonic and operands
if pwndbg.config.syntax_highlight: # which are baked in during enhancement. This removes those spaces.
instr = syntax_highlight(instr) instr = " ".join(pwndbg_instr.asm_string.split())
szval = pwndbg.aglib.strings.get(value, maxlen=enhance_string_len) or None szval = pwndbg.aglib.strings.get(value, maxlen=enhance_string_len) or None
szval0 = szval szval0 = szval

Loading…
Cancel
Save