1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00
llvm-mirror/lib/DebugInfo
Matt Davis 3c8119efc1 [symbolizer] Avoid collecting symbols belonging to invalid sections.
Summary:
llvm-symbolizer would originally report symbols that belonged to an invalid object file section.
Specifically the case where: `*Symbol.getSection() == ObjFile.section_end()`
This patch prevents the Symbolizer from collecting symbols that belong to invalid sections.

The test  (from PR40591) introduces a case where two symbols have address 0,
one symbol is defined, 'foo', and the other is not defined, 'bar'.  This patch will cause
the Symbolizer to keep 'foo' and ignore 'bar'.

As a side note, the logic for adding symbols to the Symbolizer's store
(`SymbolizableObjectFile::addSymbol`) replaces symbols with the
same <address, size> pair.  At some point that logic should be revisited as in the
aforementioned case, 'bar' was overwriting 'foo' in the Symbolizer's store,
and 'foo' was forgotten.

This fixes PR40591

Reviewers: jhenderson, rupprecht

Reviewed By: rupprecht

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D58146

llvm-svn: 354083
2019-02-14 23:50:35 +00:00
..
CodeView Move some classes into anonymous namespaces. NFC. 2019-02-11 15:16:21 +00:00
DWARF [DebugInfo]Print correct value for special opcode address increment 2019-02-06 10:31:50 +00:00
MSF Move some classes into anonymous namespaces. NFC. 2019-02-11 15:16:21 +00:00
PDB Move some classes into anonymous namespaces. NFC. 2019-02-11 15:16:21 +00:00
Symbolize [symbolizer] Avoid collecting symbols belonging to invalid sections. 2019-02-14 23:50:35 +00:00
CMakeLists.txt [msf] Resubmit "Rename Msf -> MSF". 2016-07-29 20:56:36 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00