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
Eli Zaretskii wrote:
>
> t could do this if it gets the info about all
> the watchpoints and hardware breakpoints defined previously.
> Currently, it only gets information about one single watchpoint at a
> time, and that is not enough, at least on x86.
>
You are absolutely right. I missed that. We can add a field in the breakpoint
structure and store the number of hw registers used by a hw watchpoint.
Then we can fix hw_watchpoint_used_count() to add them up.
Does it sound right?
> I completely agree. It took me quite a while, at the time, to
> untangle the logic of the decisions made by
> can_use_hardware_watchpoint and TARGET_CAN_USE_HARDWARE_WATCHPOINT,
> and then get them right by introducing
> TARGET_REGION_OK_FOR_HW_WATCHPOINT (before this, GDB only tested the
> size of the region with TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT).
>
> One problem with that code is that, originally, it was written for
> Sparc Lite (I think) where the hardware watchpoints are handled in a
> very different way.
Right again. We will probably have to fix things a bit to make them more
generic. But I guess this will only happen if we try to use it for good.
No pain, no gain :-)
I am merging my Pentium III changes to the current sourceware code.
I will retest things and post some patches as soon as I get them to
work again. We can start from that.
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@cygnus.com
2323 Yonge Street, Suite #300 Tel: 416-482-2661 ext. 311
Toronto, Ontario M4P 2C9 Fax: 416-482-6299