* gdb.cp/namespace.exp: Add breakpoint tests for functions
authorKeith Seitz <keiths@redhat.com>
Wed, 28 Mar 2012 17:29:42 +0000 (17:29 +0000)
committerKeith Seitz <keiths@redhat.com>
Wed, 28 Mar 2012 17:29:42 +0000 (17:29 +0000)
starting with the global namespace.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.cp/namespace.exp

index 23fd940c2061c07bb70ec7f10b7270cfdce75098..97037efd7c216fdc3e79ae07b076fccc945f5f15 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-26  Keith Seitz  <keiths@redhat.com>
+
+       * gdb.cp/namespace.exp: Add breakpoint tests for functions
+       starting with the global namespace.
+
 2012-03-23  Doug Evans  <dje@google.com>
 
        * lib/gdb.exp (BUILD_DATA_DIRECTORY): New global.
index ccbd97f9135325d8b99e53d54f058965b022c09d..cf5a85899e5b06b0a10a885fafb5710a4feb0c34 100644 (file)
@@ -138,6 +138,11 @@ gdb_test "print AAA::xyzq('x')" \
 gdb_test "break AAA::xyzq" \
     "Breakpoint.*at $hex: file.*namespace.cc, line 47\\."
 
+# Break on a function in the global namespace.
+
+gdb_test "break ::ensureOtherRefs" \
+    "Breakpoint.*at $hex: file.*$srcfile1, line $decimal\\."
+
 # Call a function in a nested namespace
 
 gdb_test "print 'BBB::CCC::xyzq'('x')" \
@@ -153,6 +158,11 @@ gdb_test "print BBB::CCC::xyzq('x')" \
 gdb_test "break BBB::CCC::xyzq" \
     "Breakpoint.*at $hex: file.*namespace.cc, line 63\\."
 
+# Break on the same function, starting with the global namespace.
+
+gdb_test "break ::BBB::CCC::xyzq" \
+    ".*Breakpoint.*at $hex: file.*$srcfile, line 63\\."
+
 # Print address of a function in a class in a namespace
 
 gdb_test "print 'BBB::Class::xyzq'" \
This page took 0.057979 seconds and 4 git commands to generate.