This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Runtiming hw watchpoints; Was: Split up Z packet enable/disable cmd
> Date: Thu, 03 Aug 2000 19:06:12 +0000
> From: Fernando Nasser <fnasser@cygnus.com>
>
> Here is the change (note that the number of hw breakpoints has been included):
>
> if (mem_cnt != 0)
> {
> + j = hw_watchpoint_used_count ();
I'm guessing you meant hw_breakpoint_used_count here.
> i = hw_watchpoint_used_count (bp_type, &other_type_used);
> target_resources_ok =
> ! TARGET_CAN_USE_HARDWARE_WATCHPOINT (bp_type, j, i + mem_cnt,
> other_type_used);
The problem here is that the mere _count_ of the used up break- and
watch-points is not enough to return an accurate answer to the
question asked by TARGET_CAN_USE_HARDWARE_WATCHPOINT. At least in the
DJGPP case (and I believe for every other x86 target, too), I need to
know the addresses and the size of watched regions of all watchpoints,
and also the addresses of all hardware-assisted breakpoints. If
TARGET_CAN_USE_HARDWARE_WATCHPOINT will get that info, it could be
implemented so as to return a meaningful result.