gdb/gdb-ppc-hw-watchpoint-twice...

22 lines
644 B
Diff
Executable File

pcc regression from:
http://sourceware.org/ml/gdb-patches/2008-12/msg00143.html
gdb/
2009-12-21 Jan Kratochvil <jan.kratochvil@redhat.com>
* breakpoint.c (update_watchpoint): Set B->TYPE to bp_watchpoint before
calling hw_watchpoint_used_count.
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1152,6 +1152,9 @@ update_watchpoint (struct breakpoint *b, int reparse)
{
int i, mem_cnt, other_type_used;
+ /* Do not count with B twice below. */
+ b->type = bp_watchpoint;
+
i = hw_watchpoint_used_count (bp_hardware_watchpoint,
&other_type_used);
mem_cnt = can_use_hardware_watchpoint (val_chain);