From: Keith Seitz Date: Tue, 24 May 2011 21:00:45 +0000 (+0000) Subject: PR breakpoint/12803 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e21250dbcb81b1909ba3fbda8931a47c7215beb;p=binutils-gdb.git PR breakpoint/12803 * gdb.cp/cmpd-minsyms.cc (a): New method. (b): New method. (c): New method. * gdb.cp/cmpd-minsyms.exp: Add tests for new methods. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 0c2a6aa46b3..a710243fe4e 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2011-05-24 Keith Seitz + + PR breakpoint/12803 + * gdb.cp/cmpd-minsyms.cc (a): New method. + (b): New method. + (c): New method. + * gdb.cp/cmpd-minsyms.exp: Add tests for new methods. + 2011-05-24 Pedro Alves * gdb.base/commands.exp (watchpoint_command_test): Check that the diff --git a/gdb/testsuite/gdb.cp/cmpd-minsyms.cc b/gdb/testsuite/gdb.cp/cmpd-minsyms.cc index 21d5c4e4db8..fa667861aa7 100644 --- a/gdb/testsuite/gdb.cp/cmpd-minsyms.cc +++ b/gdb/testsuite/gdb.cp/cmpd-minsyms.cc @@ -25,11 +25,17 @@ class GDB static X even_harder (T a) { return static_cast (a); } int operator == (GDB const& other) { return 1; } + void a (void) const { } + void b (void) volatile { } + void c (void) const volatile { } }; int main(int argc, char **argv) { GDB a, b; + a.a (); + a.b (); + a.c (); if (a == b) return GDB::harder('a') + GDB::harder(3) + GDB::even_harder ('a'); diff --git a/gdb/testsuite/gdb.cp/cmpd-minsyms.exp b/gdb/testsuite/gdb.cp/cmpd-minsyms.exp index 36176fc356c..696022e9669 100644 --- a/gdb/testsuite/gdb.cp/cmpd-minsyms.exp +++ b/gdb/testsuite/gdb.cp/cmpd-minsyms.exp @@ -19,13 +19,26 @@ if {[skip_cplus_tests]} { continue } -# Test for c++/12273 +# Tests for c++/12273, breakpoint/12803 set testfile "cmpd-minsyms" # Do NOT compile with debug flag. if {[prepare_for_testing $testfile $testfile $testfile.cc {c++}]} { return -1 } +# Before setting the language, try to set a few simple breakpoints +set min_syms [list \ + "GDB::a() const" \ + "GDB::b() volatile" \ + "GDB::c() const volatile"] +foreach sym $min_syms { + set tst "setting breakpoint at '$sym'" + if {[gdb_breakpoint "'$sym'"]} { + pass $tst + } +} + + gdb_test_no_output "set language c++" # A list of minimal symbol names to check.