Skip to content

itrace.py: fix MIPS call/return mnemonics and delay-slot EA print - #24

Open
Mr-Pine wants to merge 2 commits into
fmlab-iis:masterfrom
Mr-Pine:mips-mnemonics
Open

itrace.py: fix MIPS call/return mnemonics and delay-slot EA print#24
Mr-Pine wants to merge 2 commits into
fmlab-iis:masterfrom
Mr-Pine:mips-mnemonics

Conversation

@Mr-Pine

@Mr-Pine Mr-Pine commented Aug 4, 2026

Copy link
Copy Markdown

Fixes the use of the label function in the MIPS extractor and fixes mnemonics for calls (jal) and the return address register (prefixed with $ in mips)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Comment thread scripts/itrace.py Outdated

def isFunctionReturn(self, b):
return b.group(1) == "jr" and b.group(2) == "ra"
return b.group(1) == "jr" and b.group(2).lstrip("$") == "ra"

@dot-asm dot-asm Aug 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't follow. itrace.py collects disassembler output from gdb and [MIPS] disassembler doesn't decorate registers with dollar signs. What is your gdb version?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I just quickly checked against my gdb which had pwndbg installed and displayed the registers with $. Should have checked properly, sorry ._.

@dot-asm dot-asm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Thanks!

On a related note. MIPS6 instroduced no-delay-slot branches and removed branch likely-s. As it stands, the scripts doesn't handle either. Would you consider fixing it? If you have energy of course. As separate PR. Do tag me, if you do ;-)

@Mr-Pine

Mr-Pine commented Aug 10, 2026

Copy link
Copy Markdown
Author

I'll keep it in mind if I have the time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants