From 6b81fca8153717a836ecee2d4e7ce891b3d32a6e Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Tue, 29 Dec 2009 19:06:50 +0400 Subject: [PATCH] Wrong hw_watchpoint_used_count? (multiple location watchpoints) * breakpoint.c (hw_watchpoint_used_count): Compute the number of hardware watchpoints by iterating over all bp_locations instead of all breakpoints. --- gdb/breakpoint.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 0dc8474..91587cb 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -5820,12 +5820,14 @@ hw_breakpoint_used_count (void) static int hw_watchpoint_used_count (enum bptype type, int *other_type_used) { - struct breakpoint *b; + struct bp_location *loc, **loc_temp; int i = 0; *other_type_used = 0; - ALL_BREAKPOINTS (b) + ALL_BP_LOCATIONS (loc, loc_temp) { + struct breakpoint *b = loc->owner; + if (breakpoint_enabled (b)) { if (b->type == type) -- 1.6.3.3