[Lldb-commits] [PATCH] D22369: DWARFDeclContext: Don't add '::' in front of symbol names
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 14 10:03:21 PDT 2016
labath created this revision.
labath added a reviewer: clayborg.
labath added a subscriber: lldb-commits.
I believe the symbol names more consistent.
In case a symbol has DW_AT_linkage_name (e.g. clang puts it everywhere), we print the demangled
linkage name, which does not contain the '::'. If it does not have the attribute (gcc does not
put it for symbols with internal linkage) then we used to prefix it with '::'. Now we don't.
Also, we used to put the '::' only in front of names which are not in a namespace ('::foo' vs 'A::foo'). Now we are consistent and don't put the leading :: anywhere.
https://reviews.llvm.org/D22369
Files:
packages/Python/lldbsuite/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py
packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py
packages/Python/lldbsuite/test/lang/mixed/TestMixedLanguages.py
source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp
Index: source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp
===================================================================
--- source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp
+++ source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp
@@ -26,7 +26,6 @@
{
if (m_entries[0].name)
{
- m_qualified_name.append("::");
m_qualified_name.append(m_entries[0].name);
}
}
Index: packages/Python/lldbsuite/test/lang/mixed/TestMixedLanguages.py
===================================================================
--- packages/Python/lldbsuite/test/lang/mixed/TestMixedLanguages.py
+++ packages/Python/lldbsuite/test/lang/mixed/TestMixedLanguages.py
@@ -49,7 +49,7 @@
self.runCmd("breakpoint set -n foo")
self.runCmd("continue")
self.expect("thread backtrace",
- substrs = ["`::foo()", "lang=c++"])
+ substrs = ["`foo()", "lang=c++"])
# Make sure we can evaluate an expression requiring C++11
# (note: C++11 is enabled by default for C++).
self.expect("expr foo != nullptr",
Index: packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py
===================================================================
--- packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py
+++ packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py
@@ -16,7 +16,6 @@
mydir = TestBase.compute_mydir(__file__)
- @expectedFailureAll(bugnumber="llvm.org/pr28548", compiler="gcc")
def test_breakpoints_func_auto(self):
"""Test that we can set breakpoints correctly by basename to find all functions whose basename is "func"."""
self.build()
@@ -36,7 +35,6 @@
name = bp_loc.GetAddress().GetFunction().GetName()
self.assertTrue(name in names, "make sure breakpoint locations are correct for 'func' with eFunctionNameTypeAuto")
- @expectedFailureAll(bugnumber="llvm.org/pr28548", compiler="gcc")
def test_breakpoints_func_full(self):
"""Test that we can set breakpoints correctly by fullname to find all functions whose fully qualified name is "func"
(no namespaces)."""
Index: packages/Python/lldbsuite/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py
===================================================================
--- packages/Python/lldbsuite/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py
+++ packages/Python/lldbsuite/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py
@@ -76,4 +76,4 @@
# Continue and expect to find the output emitted by the firing of our stop hook.
child.sendline('continue')
- child.expect_exact('(uint32_t) ::g_val = ')
+ child.expect_exact('(uint32_t) g_val = ')
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22369.63999.patch
Type: text/x-patch
Size: 2907 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160714/bbda3f44/attachment-0001.bin>
More information about the lldb-commits
mailing list