amccarth created this revision.
amccarth added a reviewer: labath.
Herald added subscribers: aprantl, sanjoy.

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 (at least, not as a global). 
 This indicates an incomplete implementation somewhere, and having the test 
fail at this point is more useful than a build error.


https://reviews.llvm.org/D43688

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


Index: lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.h
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.h
+++ lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.h
@@ -1,4 +1,4 @@
 #ifndef TWO_H
 #define TWO_H
-void two();
+LLDB_TEST_API void two();
 #endif
Index: 
lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py
===================================================================
--- 
lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py
+++ 
lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py
@@ -33,9 +33,9 @@
             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)
 
Index: lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.h
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.h
+++ lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.h
@@ -1,4 +1,4 @@
 #ifndef ONE_H
 #define ONE_H
-void one();
+LLDB_TEST_API void one();
 #endif


Index: lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.h
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.h
+++ lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.h
@@ -1,4 +1,4 @@
 #ifndef TWO_H
 #define TWO_H
-void two();
+LLDB_TEST_API void two();
 #endif
Index: lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py
+++ lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py
@@ -33,9 +33,9 @@
             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)
 
Index: lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.h
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.h
+++ lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.h
@@ -1,4 +1,4 @@
 #ifndef ONE_H
 #define ONE_H
-void one();
+LLDB_TEST_API void one();
 #endif
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to