[DWARF parser] Teach DIContext to fetch short (non-linkage) function names for a given address.

Change --functions option in llvm-symbolizer tool to accept
values "none", "short" or "linkage". Update the tests and docs
accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209050 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alexey Samsonov
2014-05-17 00:07:48 +00:00
parent 2d1fa5f718
commit bf6e3f9257
7 changed files with 40 additions and 24 deletions

View File

@@ -24,6 +24,7 @@
namespace llvm {
typedef DILineInfoSpecifier::FunctionNameKind FunctionNameKind;
using namespace object;
namespace symbolize {
@@ -34,17 +35,17 @@ class LLVMSymbolizer {
public:
struct Options {
bool UseSymbolTable : 1;
bool PrintFunctions : 1;
FunctionNameKind PrintFunctions;
bool PrintInlining : 1;
bool Demangle : 1;
std::string DefaultArch;
Options(bool UseSymbolTable = true, bool PrintFunctions = true,
Options(bool UseSymbolTable = true,
FunctionNameKind PrintFunctions = FunctionNameKind::LinkageName,
bool PrintInlining = true, bool Demangle = true,
std::string DefaultArch = "")
: UseSymbolTable(UseSymbolTable), PrintFunctions(PrintFunctions),
PrintInlining(PrintInlining), Demangle(Demangle),
DefaultArch(DefaultArch) {
}
DefaultArch(DefaultArch) {}
};
LLVMSymbolizer(const Options &Opts = Options()) : Opts(Opts) {}