Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
896 stars 200 forks source link

architecture doesn't have reference to the BinaryView #551

Open lucasduffey opened 7 years ago

lucasduffey commented 7 years ago

This will make certain arches possible - like dex smali.

I need to be able to access bv.session_data.string_table from the Architecture class.

psifertex commented 7 years ago

I suspect there's another way around this -- we make Thumb2/Arm work without it, can you clarify a bit more about why you need session data from architecture?

lucasduffey commented 7 years ago

In smali; strings, methods and other data are stored in their own distinctive tables (arrays). The instructions reference those strings and methods by index.

My current idea: save the tables in SessionData, and access it that way.

whitequark commented 3 months ago

I would also like to see this addressed; the primary motivation is so that Python-based plugins could use settings defined for a Resource to change their disassembly format.

ccarpenter04 commented 3 months ago

I also have a use case for this, smali is a powerful IL that's used for jvm bytecode transformations and I've been working on jvm bytecode support for some time (on and off, work is crazy). It's quite simple to convert Dalvik and "Java bytecode" to smali and with this change (and a preprocessing step to perform the initial conversion), I believe both Dalvik classes and "Java" classes would be able to leverage the benefits of the different ILs offered (and it would be much more reasonable to do now that projects support has been added)