diff options
| author | Evgenii Stepanov <eugenis@google.com> | 2019-11-22 10:56:44 -0800 |
|---|---|---|
| committer | Evgenii Stepanov <eugenis@google.com> | 2019-11-25 14:55:11 -0800 |
| commit | 1c33d7130ef3eec81651d0eaa19bcce8d12c3fb4 (patch) | |
| tree | 96cec1431e19749170e6d593e9f523d93216a8f6 /llvm/lib/DebugInfo | |
| parent | f0558f582a49c932533dba736175fc0699c6e455 (diff) | |
| download | bcm5719-llvm-1c33d7130ef3eec81651d0eaa19bcce8d12c3fb4.tar.gz bcm5719-llvm-1c33d7130ef3eec81651d0eaa19bcce8d12c3fb4.zip | |
llvm-symbolizer: Fix FRAME handling of missing AT_name.
Summary:
llvm-symbolizer protocol is empty string means end-of-output.
Do not emit empty string when a function or a variable do not have a
name for any reason. Emit "??".
Reviewers: pcc, vitalybuka, jdoerfert
Subscribers: srhines, hiraditya, rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70626
Diffstat (limited to 'llvm/lib/DebugInfo')
| -rw-r--r-- | llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp b/llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp index b1a80cbc458..2f3a2500c29 100644 --- a/llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp +++ b/llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp @@ -118,21 +118,32 @@ DIPrinter &DIPrinter::operator<<(const DIGlobal &Global) { } DIPrinter &DIPrinter::operator<<(const DILocal &Local) { - OS << Local.FunctionName << '\n'; - OS << Local.Name << '\n'; + if (Local.FunctionName.empty()) + OS << "??\n"; + else + OS << Local.FunctionName << '\n'; + + if (Local.Name.empty()) + OS << "??\n"; + else + OS << Local.Name << '\n'; + if (Local.DeclFile.empty()) OS << "??"; else OS << Local.DeclFile; OS << ':' << Local.DeclLine << '\n'; + if (Local.FrameOffset) OS << *Local.FrameOffset << ' '; else OS << "?? "; + if (Local.Size) OS << *Local.Size << ' '; else OS << "?? "; + if (Local.TagOffset) OS << *Local.TagOffset << '\n'; else |

