diff options
author | Keith Seitz <keiths@redhat.com> | 2012-03-28 17:29:42 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2012-03-28 17:29:42 +0000 |
commit | 0e4acfccb3f3c95de08e6bc8d41378fcf441f825 (patch) | |
tree | d88c8b2e136bd672b62ed433c78fa2571da24344 /gdb | |
parent | 5a75128f9392f216b3d07753d6a90bca365a29be (diff) | |
download | gdb-0e4acfccb3f3c95de08e6bc8d41378fcf441f825.zip gdb-0e4acfccb3f3c95de08e6bc8d41378fcf441f825.tar.gz gdb-0e4acfccb3f3c95de08e6bc8d41378fcf441f825.tar.bz2 |
* gdb.cp/namespace.exp: Add breakpoint tests for functions
starting with the global namespace.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/namespace.exp | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 23fd940..97037ef 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -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. diff --git a/gdb/testsuite/gdb.cp/namespace.exp b/gdb/testsuite/gdb.cp/namespace.exp index ccbd97f..cf5a858 100644 --- a/gdb/testsuite/gdb.cp/namespace.exp +++ b/gdb/testsuite/gdb.cp/namespace.exp @@ -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'" \ |