Vector35 / binaryninja-api

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

GCC/Clang RTTI analysis #3857

Open cvscade opened 1 year ago

cvscade commented 1 year ago

GCC/Clang RTTI analysis RTTI support for the Itanium ABI

Is your feature request related to a problem? No

Are any alternative solutions acceptable? There is a plugin (Itanium C++ ABI by whitequark) but it's buggy and the version in the plugin manager hasn't been updated since 2020. The plugin's repository is pretty much dead.

0xdevalias commented 6 months ago

I'm not 100%, so correct me if i'm wrong, but I believe this may be related to automatically creating the structs for vtable_for_* and typeinfo_for_* and similar?

If so, I was wondering why this didn't seem to currently be a thing, I first found myself at this issue (due to the empty structs not being visible in the types):

And then found the following blog series, which helped me understand the in-memory layout of the vtables/etc in clang binaries a lot better:

Or for something way more low-level:

This may also be of interest:

As well as the existing vtable docs:

It would be awesome if Binary Ninja core was able to handle this automagically!


Also, since they don't seem to be cross-linked currently, here is the issue for MSVC for easier findability: