summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2020-03-28 15:48:38 -0700
committerFangrui Song <maskray@google.com>2020-04-01 08:04:36 -0700
commitf2036a15d3714fc9cfc8935634814d1c4e4263fa (patch)
tree5803856fa2104b4c70dec2210e3d57b0544519ec /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parentf527e6f2e11dcda8e71c21138fa15e3a3b9e9917 (diff)
[ELF] Print symbols with non-default versions for better "undefined symbol" diagnostics
When reporting an "undefined symbol" diagnostic: * We don't print @ for the reference. * We don't print @ or @@ for the definition. https://bugs.llvm.org/show_bug.cgi?id=45318 This can lead to confusing diagnostics: ``` // foo may be foo@v2 ld.lld: error: undefined symbol: foo >>> referenced by t1.o:(.text+0x1) // foo may be foo@v1 or foo@@v1 >>> did you mean: foo >>> defined in: t.so ``` There are 2 ways a symbol in symtab may get truncated: * A @@ definition may be truncated *early* by SymbolTable::insert(). The name ends with a '\0'. * A @ definition/reference may be truncated *later* by Symbol::parseSymbolVersion(). The name ends with a '@'. This patch detects the second case and improves the diagnostics. The first case is not improved but the second case is sufficient to make diagnostics not confusing. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D76999
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions