pull/885/head
Disconnect3d 5 years ago committed by GitHub
parent ae6f25a810
commit 4d213a1f90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -476,9 +476,10 @@ def context_disasm(target=sys.stdout, with_banner=True, width=None):
syntax = pwndbg.disasm.CapstoneSyntax[flavor] syntax = pwndbg.disasm.CapstoneSyntax[flavor]
# Get the Capstone object to set disassembly syntax # Get the Capstone object to set disassembly syntax
cs = next(iter(pwndbg.disasm.get_disassembler_cached.cache.values())) cs = next(iter(pwndbg.disasm.get_disassembler_cached.cache.values()), None)
if cs.syntax != syntax: # The `None` case happens when the cache was not filled yet (see e.g. #881)
if cs is not None and cs.syntax != syntax:
pwndbg.memoize.reset() pwndbg.memoize.reset()
banner = [pwndbg.ui.banner("disasm", target=target, width=width)] banner = [pwndbg.ui.banner("disasm", target=target, width=width)]

Loading…
Cancel
Save