Skip to content

refactor(ida)!: migrate IDA backend to ida-domain API, drop legacy IDAPython#131

Open
r0ny123 wants to merge 3 commits into
danielplohmann:masterfrom
r0ny123:feat/ida-domain-migration
Open

refactor(ida)!: migrate IDA backend to ida-domain API, drop legacy IDAPython#131
r0ny123 wants to merge 3 commits into
danielplohmann:masterfrom
r0ny123:feat/ida-domain-migration

Conversation

@r0ny123

@r0ny123 r0ny123 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces SMDA's legacy IDAPython backend (idaapi/idautils/idc, the Ida73/74/85Interface classes) with a single backend built on the modern IDA Domain API. SMDA's IDA integration now targets IDA Pro 9.1+ only.

Changes

  • src/smda/ida/IdaInterface.py — rewritten on top of ida_domain.Database, keeping the historic file/class name. Works both inside the IDA GUI (IdaInterface()Database.open()) and fully headless (IdaInterface.fromPath() context manager).
  • src/smda/ida/IdaExporter.py — defaults to the ida-domain backed IdaInterface; still supports interface injection via ida_interface=.
  • ida_domain_analyze.py — new headless export entry point (open a .idb/.i64 by path, no GUI → .smda).
  • export.py / ida_analyze.py — refactored to the ida-domain backend; detectBackend() now probes import ida_domain.
  • pyproject.toml / requirements.txtida-domain>=0.5.0 is now a core dependency (installed by pip install smda). Actually using the backend still needs a licensed IDA Pro 9.1+ with IDADIR configured.
  • README.md — documents the IDA 9.1+ / Domain-API-only backend and the headless workflow.

Breaking change

The legacy IDAPython backend supporting IDA 7.x/8.x has been removed. Exports now require IDA Pro 9.1+.

Validation

  • make lint → ruff: All checks passed!
  • make test111 passed (79 subtests)
  • The IDA backend itself is not exercised by CI (no IDA Pro available); the runtime path against a real database is untested.

🤖 Generated with Claude Code

r0ny123 and others added 3 commits June 10, 2026 16:44
…Python

Replace the legacy IDAPython backend (idaapi/idautils/idc, Ida73/74/85
interface classes) with a single backend built on the modern ida-domain
package, targeting IDA Pro 9.1+ only.

- src/smda/ida/IdaInterface.py: rewritten on top of ida_domain.Database;
  same path/class name, works both in the IDA GUI and fully headless
  (IdaInterface.fromPath() context manager)
- IdaExporter: defaults to the ida-domain backed IdaInterface, still
  supports interface injection
- ida_domain_analyze.py: new headless export entry point (open .idb/.i64
  by path, no GUI)
- export.py / ida_analyze.py: refactored to ida-domain; detectBackend()
  now probes `import ida_domain`
- ida-domain>=0.5.0 is now a core dependency (installed by `pip install
  smda`); using it still needs a licensed IDA Pro 9.1+ with IDADIR set
- README updated

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Address review feedback on the IdaInterface backend:
- bind a module-level `Database = None` sentinel and raise a clear
  ImportError (instead of NameError) from __init__/fromPath when
  ida-domain is unavailable
- getInstructionBytes returns b"" when no instruction decodes at offset
  (avoids AttributeError on None)
- getIdbDir no longer appends os.sep to an empty dirname, which would
  resolve a relative db path to the filesystem root

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant