Dev/improves#9
Merged
Merged
Conversation
Two follow-ups so DWARF source grouping actually shows up for IDA exports: - The IDA database is cached by binary hash, so a database built before the loader learned to import line numbers was silently reused, yielding no source files. Version the cache path (_IDA_DB_VERSION) so changes to how the database is built force a rebuild, and drop superseded caches. - IDA reports absolute build paths (e.g. /home/.../src/foo.cpp). Strip the common root shared by all source files so the exported tree mirrors the project layout instead of being anchored at "/". Relative paths (as angr reports) are unaffected. Verified on a real IDA 9.3 load that the loader now imports source files for the target binary. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A killed analysis (e.g. OOM) leaves the database unpacked on disk (.id0/ .id1/.nam/.til beside the .i64), which cannot be reopened. The backend then saw the cache "exists", tried to open it read-only, and failed hard with "failed to open IDA database at ...". When the cached database fails to open and the original binary is available, purge the broken cache (packed db + unpacked components) and rebuild it from the binary instead of erroring. Extract the open paths into _open_fresh / _open_existing and add a _purge_database helper. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Recovering from an unopenable cached database by deleting it is dangerous: an "unpacked" database (.id0/.id1/.nam/.til beside the .i64) usually means the database is currently open in another IDA session, so purging it would destroy that session's work. Do not purge implicitly. When the cached database cannot be opened and is unpacked, fail with a clear message: the IDA database at <path> is unpacked (it is open in another IDA session, or a previous run was interrupted). Close your IDA session, or re-run with --purge-cache to discard and rebuild it. Add a --purge-cache CLI flag (threaded through create_analyzer to IdaSession) that opts into discarding and rebuilding, emitting a warning first. Add _is_unpacked detection and tests. 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.
No description provided.