[Lldb-commits] [lldb] r326130 - Partial fix for TestConflictingSymbol.py on Windows

Adrian McCarthy via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 26 13:22:39 PST 2018


Author: amccarth
Date: Mon Feb 26 13:22:39 2018
New Revision: 326130

URL: http://llvm.org/viewvc/llvm-project?rev=326130&view=rev
Log:
Partial fix for TestConflictingSymbol.py on Windows

Without this fix, the test ERRORs because the link of the inferior fails. This
patch adds the LLDB_TEST_API macro where needed and uses the new -2 magic
value for num_expected_locations to account for lazy-loading of module symbols
on Windows.

With this fix, the test itself still fails:  conflicting_symbol isn't in the
debug info nor the export table, and Windows binaries don't have an equivalent
of the ELF .symtab.  We need to understand why the test works to keep the
symbol out of the debug info.  In the mean time, having the test fail at this
point is a better indication of the remaining problem than a build error.

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

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.h
    lldb/trunk/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py
    lldb/trunk/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.h

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.h?rev=326130&r1=326129&r2=326130&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.h (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.h Mon Feb 26 13:22:39 2018
@@ -1,4 +1,4 @@
 #ifndef ONE_H
 #define ONE_H
-void one();
+LLDB_TEST_API void one();
 #endif

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py?rev=326130&r1=326129&r2=326130&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py Mon Feb 26 13:22:39 2018
@@ -33,9 +33,9 @@ class TestConflictingSymbols(TestBase):
             target, ['One', 'Two'])
 
         lldbutil.run_break_set_by_source_regexp(self, '// break here',
-                extra_options='-f One.c')
+                extra_options='-f One.c', num_expected_locations=-2)
         lldbutil.run_break_set_by_source_regexp(self, '// break here',
-                extra_options='-f Two.c')
+                extra_options='-f Two.c', num_expected_locations=-2)
         lldbutil.run_break_set_by_source_regexp(self, '// break here',
                 extra_options='-f main.c', num_expected_locations=1)
 

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.h?rev=326130&r1=326129&r2=326130&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.h (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.h Mon Feb 26 13:22:39 2018
@@ -1,4 +1,4 @@
 #ifndef TWO_H
 #define TWO_H
-void two();
+LLDB_TEST_API void two();
 #endif




More information about the lldb-commits mailing list