- Add `cc-tricore-32.sdb.txt`
- Add `map_dwarf_reg_to_tricore_reg`
- Add `RzAnalysisFunction->has_debuginfo`
- `rz_analysis_var_is_arg`: Register variables are no longer always arguments, but depend on debug information and call conventions
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.
Newer dyldcaches have more fields in the header. This change adds
heuristics for determining the version and reading and displaying the
newer fields if available.