summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.h
diff options
context:
space:
mode:
authorAlexey Lapshin <a.v.lapshin@mail.ru>2019-02-27 13:17:36 +0000
committerAlexey Lapshin <a.v.lapshin@mail.ru>2019-02-27 13:17:36 +0000
commit77fc1f6049a7414ec193c9ff8226eeb5662a5878 (patch)
treeb2bffed96e676b25942dbe39194e0f08a153f638 /llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.h
parentef920358277603c69f4f548d2e5c40842972dd71 (diff)
downloadbcm5719-llvm-77fc1f6049a7414ec193c9ff8226eeb5662a5878.tar.gz
bcm5719-llvm-77fc1f6049a7414ec193c9ff8226eeb5662a5878.zip
[DebugInfo] add SectionedAddress to DebugInfo interfaces.
That patch is the fix for https://bugs.llvm.org/show_bug.cgi?id=40703 "wrong line number info for obj file compiled with -ffunction-sections" bug. The problem happened with only .o files. If object file contains several .text sections then line number information showed incorrectly. The reason for this is that DwarfLineTable could not detect section which corresponds to specified address(because address is the local to the section). And as the result it could not select proper sequence in the line table. The fix is to pass SectionIndex with the address. So that it would be possible to differentiate addresses from various sections. With this fix llvm-objdump shows correct line numbers for disassembled code. Differential review: https://reviews.llvm.org/D58194 llvm-svn: 354972
Diffstat (limited to 'llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.h')
-rw-r--r--llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.h b/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.h
index 69da0f3e145..a49ab000131 100644
--- a/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.h
+++ b/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.h
@@ -33,12 +33,13 @@ public:
static ErrorOr<std::unique_ptr<SymbolizableObjectFile>>
create(object::ObjectFile *Obj, std::unique_ptr<DIContext> DICtx);
- DILineInfo symbolizeCode(uint64_t ModuleOffset, FunctionNameKind FNKind,
+ DILineInfo symbolizeCode(object::SectionedAddress ModuleOffset,
+ FunctionNameKind FNKind,
bool UseSymbolTable) const override;
- DIInliningInfo symbolizeInlinedCode(uint64_t ModuleOffset,
+ DIInliningInfo symbolizeInlinedCode(object::SectionedAddress ModuleOffset,
FunctionNameKind FNKind,
bool UseSymbolTable) const override;
- DIGlobal symbolizeData(uint64_t ModuleOffset) const override;
+ DIGlobal symbolizeData(object::SectionedAddress ModuleOffset) const override;
// Return true if this is a 32-bit x86 PE COFF module.
bool isWin32Module() const override;
OpenPOWER on IntegriCloud