ROSE 0.11.145.147
|
Demangle mangled names.
Definition at line 15 of file Demangler.h.
#include <Rose/BinaryAnalysis/Demangler.h>
Public Types | |
typedef Sawyer::Container::Map< std::string, std::string > | NameMap |
Public Member Functions | |
void | fillCache (const std::vector< std::string > &mangledNames) |
Demangle lots of names. | |
std::string | demangle (const std::string &mangledName) |
Demangle one name. | |
void | clear () |
Clear the cache. | |
size_t | size () const |
Number of items in the cache. | |
const NameMap & | allNames () const |
Map of all cached names. | |
void | insert (const std::string &mangledName, const std::string &demangledName) |
Insert a mangled/demangled pair. | |
const boost::filesystem::path & | cxxFiltExe () const |
Property: Name of c++filt program. | |
void | cxxFiltExe (const boost::filesystem::path &p) |
Property: Name of c++filt program. | |
const std::string & | compiler () const |
Property: Format of mangled names. | |
void | compiler (const std::string &s) |
Property: Format of mangled names. | |
typedef Sawyer::Container::Map<std::string , std::string > Rose::BinaryAnalysis::Demangler::NameMap |
Definition at line 17 of file Demangler.h.
|
inline |
Property: Name of c++filt program.
This is the name of the c++filt command that gets run to convert mangled names to demangled names. If it's not an absolute name then the normal executable search is performed (i.e., $PATH variable).
Definition at line 31 of file Demangler.h.
|
inline |
Property: Name of c++filt program.
This is the name of the c++filt command that gets run to convert mangled names to demangled names. If it's not an absolute name then the normal executable search is performed (i.e., $PATH variable).
Definition at line 32 of file Demangler.h.
|
inline |
Property: Format of mangled names.
Each compiler has slightly different rules for how names are mangled. This property controls the format and should be one of the following strings:
ROSE itself does not check these strings, so if your c++filt supports other values for its "-s" switch they will work.
Definition at line 53 of file Demangler.h.
|
inline |
Property: Format of mangled names.
Each compiler has slightly different rules for how names are mangled. This property controls the format and should be one of the following strings:
ROSE itself does not check these strings, so if your c++filt supports other values for its "-s" switch they will work.
Definition at line 54 of file Demangler.h.
void Rose::BinaryAnalysis::Demangler::fillCache | ( | const std::vector< std::string > & | mangledNames | ) |
Demangle lots of names.
The most efficient way to invoke this analyzer is to provide it with as many names as possible. It will send them all to the c++filt program (cxxFiltExe property) all at once and cache the results to query later.
std::string Rose::BinaryAnalysis::Demangler::demangle | ( | const std::string & | mangledName | ) |
Demangle one name.
If the name is already cached, then return the cached value. Otherwise invoke c++filt to demangle this one name and cache the result. A name that cannot be demangled is returned in its original form.
It is not efficient to fill the cache one name at a time; use fillCache first if possible, and then call this function to retrieve the results.
|
inline |
Clear the cache.
Definition at line 73 of file Demangler.h.
References Sawyer::Container::Map< K, T, Cmp, Alloc >::clear().
|
inline |
Number of items in the cache.
Definition at line 76 of file Demangler.h.
References Sawyer::Container::Map< K, T, Cmp, Alloc >::size().
|
inline |
Map of all cached names.
Definition at line 79 of file Demangler.h.
void Rose::BinaryAnalysis::Demangler::insert | ( | const std::string & | mangledName, |
const std::string & | demangledName | ||
) |
Insert a mangled/demangled pair.
Adds (or modifies) the mangled/demangled pair to the cache.