RFA: Breakpoint infrastructure cleanups [1/8] - define impl_breakpoint

Michael Snyder msnyder@redhat.com
Thu Oct 9 19:16:00 GMT 2003


Daniel Jacobowitz wrote:
> On Wed, Oct 08, 2003 at 07:58:35PM +0200, Eli Zaretskii wrote:
> 
>>>Date: Wed, 8 Oct 2003 13:02:33 -0400
>>>From: Daniel Jacobowitz <drow@mvista.com>
>>>+
>>>+enum impl_bptype
>>>+{
>>>+  impl_bp_software_breakpoint,
>>>+  impl_bp_hardware_breakpoint,
>>>+  impl_bp_hardware_watchpoint,
>>>+  impl_bp_other			/* Miscellaneous...  */
>>>+};
>>
>>Why did you decide to leave the subclasses of hardware watchpoints
>>(read, access, and write) in the parent structure, instead of moving
>>that distinction here?  That seems like you are spreading related
>>information between several places instead of having it in a single
>>place.
> 
> 
> I'm actually planning to move it to the impl_breakpoint.  I haven't
> done it yet because I wanted to postpone watchpoints until the
> one-to-many support was in place.
> 
> For instance, according to my interpretation, rwatch **foo should be:
>   a read watchpoint on the address *foo
>   a write watchpoint on the address foo, in case it is moved.
> I don't know if that matches GDB's current interpreation of such
> expressions, though - I haven't looked yet.

For software watchpoints, you'd probably just evaluate the expression
and see if the result changed.  For hardware watchpoints, you'd need
to watch every location that would be referenced in evaluating the
expression.  IMO...




More information about the Gdb-patches mailing list