aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2019-06-24 20:03:23 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2019-06-24 20:03:23 +0000
commit9c8282a9b33084d95c579e9f76daddfcd2f74c32 (patch)
tree31ff6a19c89f57ee9f3d040c93823bc5a5a3e6dd /llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
parent94b43160963daa7fbbf561f00f3a4e682f60d91d (diff)
downloadllvm-9c8282a9b33084d95c579e9f76daddfcd2f74c32.zip
llvm-9c8282a9b33084d95c579e9f76daddfcd2f74c32.tar.gz
llvm-9c8282a9b33084d95c579e9f76daddfcd2f74c32.tar.bz2
llvm-symbolizer: Add a FRAME command.
This command prints a description of the referenced function's stack frame. For each formal parameter and local variable, the tool prints: - function name - variable name - file/line of declaration - FP-relative variable location (if available) - size in bytes - HWASAN tag offset This information will be used by the HWASAN runtime to identify local variables in UAR reports. Differential Revision: https://reviews.llvm.org/D63468 llvm-svn: 364225
Diffstat (limited to 'llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp')
-rw-r--r--llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp b/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
index 62f849f..6092584 100644
--- a/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
+++ b/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
@@ -298,6 +298,14 @@ DIGlobal SymbolizableObjectFile::symbolizeData(
return Res;
}
+std::vector<DILocal> SymbolizableObjectFile::symbolizeFrame(
+ object::SectionedAddress ModuleOffset) const {
+ if (ModuleOffset.SectionIndex == object::SectionedAddress::UndefSection)
+ ModuleOffset.SectionIndex =
+ getModuleSectionIndexForAddress(ModuleOffset.Address);
+ return DebugInfoContext->getLocalsForAddress(ModuleOffset);
+}
+
/// Search for the first occurence of specified Address in ObjectFile.
uint64_t SymbolizableObjectFile::getModuleSectionIndexForAddress(
uint64_t Address) const {