[Lldb-commits] [PATCH] D43688: Partial fix for TestConflictingSymbol.py on Windows
Adrian McCarthy via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 23 11:13:39 PST 2018
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43688.135668.patch
Type: text/x-patch
Size: 1701 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180223/9b0b35df/attachment.bin>
More information about the lldb-commits
mailing list