Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDB Import should consult type libraries #6396

Open
emesare opened this issue Feb 6, 2025 · 2 comments
Open

IDB Import should consult type libraries #6396

emesare opened this issue Feb 6, 2025 · 2 comments
Labels
Component: DebugInfo Issue requires changes to the DebugInfo API Effort: Trivial Issue should take < 1 day Impact: Medium Issue is impactful with a bad, or no, workaround

Comments

@emesare
Copy link
Member

emesare commented Feb 6, 2025

When loading an IDB/TIL we might not actually have the complete view of all types, therefore we should use a supplementary system for when a type reference would otherwise be unresolved. The most straightforward solution is to consult type libraries when the importer encounters an unresolved type reference.

https://dev-rust.binary.ninja/binaryninja/type_library/struct.TypeLibrary.html#method.get_named_type

@emesare emesare added Component: DebugInfo Issue requires changes to the DebugInfo API Effort: Trivial Issue should take < 1 day Impact: Medium Issue is impactful with a bad, or no, workaround labels Feb 6, 2025
@emesare
Copy link
Member Author

emesare commented Feb 6, 2025

More context provided by @rbran

The til file is parsed with a dependencies field, we currently ignore it, but it's basically importing those files from the ${IDA_INSTALL}/til directory. [...] I suppose the solution is to have a more complete "import idb" wizard or similar.

For now I think considering the types that are typical of being a TIL dependency would already exist within our type libraries we can go ahead with this until some better workflow exists for importing with TIL dependencies.

@rbran
Copy link
Contributor

rbran commented Feb 12, 2025

Fixed in idb-rs with: Vector35/idb-rs@84d544c
although this fix need to be expanded for similar situations, it solves this specific issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: DebugInfo Issue requires changes to the DebugInfo API Effort: Trivial Issue should take < 1 day Impact: Medium Issue is impactful with a bad, or no, workaround
Projects
None yet
Development

No branches or pull requests

2 participants