This commit rewrites completely how RzBinPlugin are used to load info into the RzBinObject structure. Main changes are: - Avoid looping multiple times to set the same data: now the data is cycled only once to rebase addresses, demangle strings and to make each loaded structure similar to each other. - rz_bin_demangle is now demangling only strings: the old implementation was a hack over a hack to add classes & methods into the RzBinObject while demangling a string. This allowed methods and classes to be added to RzBinObject when for example invoking `is` or other printing commands. This was meant to be an "optimization" to avoid looping and doing things on-the-fly. - Now the demangling is done after guessing the language used in the bin. This is done to avoid looping to various demanglers hoping that a string is going to be correctly demangled. After each string is demangled, the string is given to the language related function which adds classes, methods and fields into the RzBinObject fields. - Swift handling is a special case, since the demangler can be disabled via -Duse_swift_demangler. The issue with the swift demangler is that is not correctly demangling strings and outputting swift code, but instead is creating something that sometimes works, sometimes doesn't. Also the old code only added fields and never methods for "reasons", and the new code just uses what the old code was doing as is. - The new code also takes advantage of the language detection, which now happens before the demangling of symbols, imports and relocs. |
||
|---|---|---|
| .. | ||
| mpc | ||
| nettle | ||
| packagefiles | ||
| ptrace-wrap | ||
| rizin-shell-parser | ||
| rzar | ||
| rzgdb | ||
| rzheap | ||
| rzqnx | ||
| rzspp | ||
| rzw32dbg_wrap | ||
| rzwinkd | ||
| xxhash | ||
| yxml | ||
| blake3.wrap | ||
| capstone-bundled.wrap | ||
| capstone-next.wrap | ||
| capstone-v3.wrap | ||
| capstone-v4.wrap | ||
| libdemangle.wrap | ||
| liblzma.wrap | ||
| libmspack.wrap | ||
| libzip.wrap | ||
| lz4.wrap | ||
| sigdb.wrap | ||
| tree-sitter-c.wrap | ||
| tree-sitter.wrap | ||
| zlib.wrap | ||