BinaryAnalysisPlatform / bap

Binary Analysis Platform
MIT License
2.07k stars 273 forks source link

extends the demanglers library to the new targets infrastructure #1504

Closed ivg closed 2 years ago

ivg commented 2 years ago

In the existing implementation the demanglers were applied too late, on the Program.t structure and only to the names of the subroutines, leaving the call terms untouched that is not to say about other data structuctures like symbol table, callgraphs, subroutines partitions, and so on, which all were using the mangled names.

In the upgraded version we demangle names on the lowest level, when the name is resolved from the set of possible names. The demangling is performed automatically based on the target, but it is still possible to override the demangler with the [--demangle-with] with command-line option.

Note, that this PR doesn't reimplement any existing target-specific demanglers but just provides the new interface that is not yet used. The reimplementation of the current demanglers using the new infrastructure will be provided in separate PRs for the sake of clean history.