Skip to content

Correctly disable emulation on selected instructions#3155

Merged
disconnect3d merged 1 commit into
pwndbg:devfrom
OBarronCS:banned-instruction-fix
Jul 14, 2025
Merged

Correctly disable emulation on selected instructions#3155
disconnect3d merged 1 commit into
pwndbg:devfrom
OBarronCS:banned-instruction-fix

Conversation

@OBarronCS

Copy link
Copy Markdown
Member

Certain instructions cannot be emulated by Unicorn in the context of Pwndbg - such as when an instruction relies on a coprocessor. This fixes a bug where our list of banned instructions was not being used to stop emulation.

cc @k4lizen

Comment thread pwndbg/emu/emulator.py
# unavailable to the emulator
BANNED_INSTRUCTIONS = {
"mips": {C.mips.MIPS_INS_RDHWR},
"mips": {C.mips.MIPS_INS_RDHWR, C.mips.MIPS_INS_ALIAS_RDHWR},

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds this to the list after Capstone V6 changes - @patryk4815 encountered this one in MIPS:

image

@disconnect3d disconnect3d merged commit e5530ca into pwndbg:dev Jul 14, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants