Mike Dodd | 8cfa702 | 2010-11-17 11:12:26 -0800 | [diff] [blame] | 1 | /** |
| 2 | * @file demangle_symbol.h |
| 3 | * Demangle a C++ symbol |
| 4 | * |
| 5 | * @remark Copyright 2002 OProfile authors |
| 6 | * @remark Read the file COPYING |
| 7 | * |
| 8 | * @author John Levon |
| 9 | */ |
| 10 | |
| 11 | #ifndef DEMANGLE_SYMBOL_H |
| 12 | #define DEMANGLE_SYMBOL_H |
| 13 | |
| 14 | #include <string> |
| 15 | |
| 16 | /// demangle type: specify what demangling we use |
| 17 | enum demangle_type { |
| 18 | /// no demangling. |
| 19 | dmt_none, |
| 20 | /// use cplus_demangle() |
| 21 | dmt_normal, |
| 22 | /// normal plus a pass through the regular expression to simplify |
| 23 | /// the mangled name |
| 24 | dmt_smart |
| 25 | }; |
| 26 | |
| 27 | /** |
| 28 | * demangle_symbol - demangle a symbol |
| 29 | * @param name the mangled symbol name |
| 30 | * @return the demangled name |
| 31 | * |
| 32 | * Demangle the symbol name, if the global |
| 33 | * variable demangle is true. |
| 34 | * |
| 35 | * The demangled name lists the parameters and type |
| 36 | * qualifiers such as "const". |
| 37 | */ |
| 38 | std::string const demangle_symbol(std::string const & name); |
| 39 | |
| 40 | #endif // DEMANGLE_SYMBOL_H |