diff options
author | Sandra Loosemore <sandra@codesourcery.com> | 2008-12-26 19:11:53 +0000 |
---|---|---|
committer | Sandra Loosemore <sandra@codesourcery.com> | 2008-12-26 19:11:53 +0000 |
commit | ca2d49e8224092d0f8a6ab8ccbc21be8f9b77404 (patch) | |
tree | 3a0e80fd5f36ef5f7932f8b6d0bd0c6885938bfe /gdb/breakpoint.c | |
parent | 393be9d09632a3390cb8d3f9937fb27a8dc7333d (diff) | |
download | gdb-ca2d49e8224092d0f8a6ab8ccbc21be8f9b77404.zip gdb-ca2d49e8224092d0f8a6ab8ccbc21be8f9b77404.tar.gz gdb-ca2d49e8224092d0f8a6ab8ccbc21be8f9b77404.tar.bz2 |
2008-12-26 Sandra Loosemore <sandra@codesourcery.com>
gdb/
* breakpoint.c (update_watchpoint): Refactor to avoid compiler
warning.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index d0619c1..30c89bd 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -898,19 +898,23 @@ update_watchpoint (struct breakpoint *b, int reparse) if ((b->type == bp_watchpoint || b->type == bp_hardware_watchpoint) && reparse) { - int i, mem_cnt, target_resources_ok, other_type_used; + int i, mem_cnt, other_type_used; i = hw_watchpoint_used_count (bp_hardware_watchpoint, &other_type_used); mem_cnt = can_use_hardware_watchpoint (val_chain); - if (mem_cnt) - target_resources_ok = TARGET_CAN_USE_HARDWARE_WATCHPOINT - (bp_hardware_watchpoint, i + mem_cnt, other_type_used); - if (!mem_cnt || target_resources_ok <= 0) + if (!mem_cnt) b->type = bp_watchpoint; else - b->type = bp_hardware_watchpoint; + { + int target_resources_ok = TARGET_CAN_USE_HARDWARE_WATCHPOINT + (bp_hardware_watchpoint, i + mem_cnt, other_type_used); + if (target_resources_ok <= 0) + b->type = bp_watchpoint; + else + b->type = bp_hardware_watchpoint; + } } /* Look at each value on the value chain. */ |