diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-03-28 20:19:02 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-03-28 20:19:02 +0000 |
commit | d0fb5eaead43c6b5e73b113227b1be71c07fd213 (patch) | |
tree | 2231c45d70b956bc538f4231a45fa0fdb24ed053 /gdb/testsuite/gdb.base/watchpoint-delete.c | |
parent | 20106cfbdb78a987e33d0ebc38946c01be275c26 (diff) | |
download | gdb-d0fb5eaead43c6b5e73b113227b1be71c07fd213.zip gdb-d0fb5eaead43c6b5e73b113227b1be71c07fd213.tar.gz gdb-d0fb5eaead43c6b5e73b113227b1be71c07fd213.tar.bz2 |
gdb/
Support a ring of related breakpoints.
* breakpoint.c (watchpoint_del_at_next_stop): New, move here code from
other functions, add gdb_assert.
(update_watchpoint, watchpoint_check): Add gdb_assert. Use
watchpoint_del_at_next_stop.
(bpstat_check_watchpoint): Use watchpoint_del_at_next_stop.
(bpstat_stop_status): Handle ring in related_breakpoint.
(set_raw_breakpoint_without_location): Initialize ring in
related_breakpoint.
(delete_breakpoint): Handle ring in related_breakpoint, use
watchpoint_del_at_next_stop.
(map_breakpoint_numbers): Handle ring in related_breakpoint.
gdb/testsuite/
Support a ring of related breakpoints.
* gdb.base/watchpoint-delete.c: New file.
* gdb.base/watchpoint-delete.exp: New file.
Diffstat (limited to 'gdb/testsuite/gdb.base/watchpoint-delete.c')
-rw-r--r-- | gdb/testsuite/gdb.base/watchpoint-delete.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/watchpoint-delete.c b/gdb/testsuite/gdb.base/watchpoint-delete.c new file mode 100644 index 0000000..20c9929 --- /dev/null +++ b/gdb/testsuite/gdb.base/watchpoint-delete.c @@ -0,0 +1,33 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2010, 2011 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +void +func (void) +{ + volatile int x = 0; + + x++; /* break-here */ + x++; +} + +int +main (void) +{ + func (); + + return 0; +} |