diff options
author | David Blaikie <dblaikie@gmail.com> | 2017-02-06 20:19:02 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2017-02-06 20:19:02 +0000 |
commit | efc4eba816264a4e109b4ee49ffb38ba1ae1a1a8 (patch) | |
tree | 7d60a8b375d26e0682eea6a9e5b1c7525748b7f8 /llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp | |
parent | 1b4eed4c1e11ea5f51b00ad18cbc45c4169ba8a4 (diff) | |
download | bcm5719-llvm-efc4eba816264a4e109b4ee49ffb38ba1ae1a1a8.tar.gz bcm5719-llvm-efc4eba816264a4e109b4ee49ffb38ba1ae1a1a8.zip |
Get function start line number from DWARF info
DWARF info contains info about the line number at which a function starts (DW_AT_decl_line).
This patch creates a function to look up the start line number for a function, and returns it in
DILineInfo when looking up debug info for a particular address.
Patch by Simon Que!
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D27962
llvm-svn: 294231
Diffstat (limited to 'llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp b/llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp index aae009ecb16..c1e2536d6e2 100644 --- a/llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp +++ b/llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp @@ -84,6 +84,8 @@ void DIPrinter::print(const DILineInfo &Info, bool Inlined) { return; } OS << " Filename: " << Filename << "\n"; + if (Info.StartLine) + OS << "Function start line: " << Info.StartLine << "\n"; OS << " Line: " << Info.Line << "\n"; OS << " Column: " << Info.Column << "\n"; if (Info.Discriminator) |