This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Code in can_use_hardware_watchpoint()



> If I understand things, if an expression contains a memory variable
> that can be watched by the target's debug registers and another that
> cannot, can_use_hardware_watchpoint() will return a value, which GDB
> will interpret as the target can implement the watchpoint expression
> in hardware.

Exactly.  And when the time comes to actually insert the watchpoint,
GDB complains that it cannot.

I posted today to gdb-patches a bunch of watchpoint-related patches.
One of them makes can_use_hardware_watchpoint return zero as soon as
it sees one value on the value chain that cannot be watched.  I also
introduced a new macro TARGET_REGION_OK_FOR_HW_WATCHPOINT which
accepts the address of the value to be watched as well as its size,
because the ability to watch large regions depends on the alignment of
their address (the number of required debug registers is different).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]