summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py
diff options
context:
space:
mode:
authorEugene Leviant <evgeny.leviant@gmail.com>2015-11-13 11:00:10 +0000
committerEugene Leviant <evgeny.leviant@gmail.com>2015-11-13 11:00:10 +0000
commitc1ba9fcb2790e07a478700ce78fb08283839634c (patch)
tree6be8b8ba8e93e67de6900a11fd3fbf09075894c3 /lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py
parent2e31ce1ea7ce3a16202bb55130d552b753282a33 (diff)
downloadbcm5719-llvm-c1ba9fcb2790e07a478700ce78fb08283839634c.tar.gz
bcm5719-llvm-c1ba9fcb2790e07a478700ce78fb08283839634c.zip
Fix multiple symbol lookup in the same namespace
llvm-svn: 253028
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py30
1 files changed, 22 insertions, 8 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py
index ab6b83bed9b..a60d8252e9f 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py
@@ -26,6 +26,16 @@ class NamespaceTestCase(TestBase):
# And the line number to break at.
self.line_break = line_number('main.cpp',
'// Set break point at this line.')
+ # Break inside do {} while and evaluate value
+ self.line_break_ns1 = line_number('main.cpp', '// Evaluate ns1::value')
+ self.line_break_ns2 = line_number('main.cpp', '// Evaluate ns2::value')
+
+ def runToBkpt(self, command):
+ self.runCmd(command, RUN_SUCCEEDED)
+ # The stop reason of the thread should be breakpoint.
+ self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+ substrs = ['stopped',
+ 'stop reason = breakpoint'])
# rdar://problem/8668674
@expectedFailureWindows("llvm.org/pr24764")
@@ -34,15 +44,19 @@ class NamespaceTestCase(TestBase):
self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
+ lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line_break_ns1, num_expected_locations=1, loc_exact=True)
+ lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line_break_ns2, num_expected_locations=1, loc_exact=True)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line_break, num_expected_locations=1, loc_exact=True)
- self.runCmd("run", RUN_SUCCEEDED)
-
- # The stop reason of the thread should be breakpoint.
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs = ['stopped',
- 'stop reason = breakpoint'])
+ self.runToBkpt("run")
+ # Evaluate ns1::value
+ self.expect("expression -- value", startstr = "(int) $0 = 100")
+ self.runToBkpt("continue")
+ # Evaluate ns2::value
+ self.expect("expression -- value", startstr = "(int) $1 = 200")
+
+ self.runToBkpt("continue")
# On Mac OS X, gcc 4.2 emits the wrong debug info with respect to types.
slist = ['(int) a = 12', 'anon_uint', 'a_uint', 'b_uint', 'y_uint']
if self.platformIsDarwin() and self.getCompiler() in ['clang', 'llvm-gcc']:
@@ -83,8 +97,8 @@ class NamespaceTestCase(TestBase):
# test/namespace: 'expression -- i+j' not working
# This has been fixed.
self.expect("expression -- i + j",
- startstr = "(int) $0 = 7")
- # (int) $0 = 7
+ startstr = "(int) $2 = 7")
+ # (int) $2 = 7
self.runCmd("expression -- i")
self.runCmd("expression -- j")
OpenPOWER on IntegriCloud