refactor(ida)!: migrate IDA backend to ida-domain API, drop legacy IDAPython#131
Open
r0ny123 wants to merge 3 commits into
Open
refactor(ida)!: migrate IDA backend to ida-domain API, drop legacy IDAPython#131r0ny123 wants to merge 3 commits into
r0ny123 wants to merge 3 commits into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces SMDA's legacy IDAPython backend (
idaapi/idautils/idc, theIda73/74/85Interfaceclasses) 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 ofida_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 backedIdaInterface; still supports interface injection viaida_interface=.ida_domain_analyze.py— new headless export entry point (open a.idb/.i64by path, no GUI →.smda).export.py/ida_analyze.py— refactored to the ida-domain backend;detectBackend()now probesimport ida_domain.pyproject.toml/requirements.txt—ida-domain>=0.5.0is now a core dependency (installed bypip install smda). Actually using the backend still needs a licensed IDA Pro 9.1+ withIDADIRconfigured.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 test→ 111 passed (79 subtests)🤖 Generated with Claude Code