This is the mail archive of the gdb-patches@sources.redhat.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: Remote watchpoint support.


> From: jtc@redback.com (J.T. Conklin)
> Date: 30 Oct 2000 12:39:53 -0800
> 
> One thing I dislike about it is that the debug agent never explicitly
> tells GDB that a watchpoint has been hit, but rather it is implicitly
> coded in the return value of the query.

I agree that this is not a good design.

> The second is the return value of 0 if the target stopped for another
> reason.  I (now) know that this is the current behavior of the target_
> stopped_data_address() macro, but it use the one address that I think
> might be very important to watch on targets where the zero page isn't
> unmapped (in which case a reference would cause a exception/trap).

I would actually be very happy if we could change the interface of
target_stopped_data_address so that zero would not be treated
specially.  One problem with the current design is that I cannot catch
NULL pointer dereferences on Windows, where the null page cannot be
unmapped from the address space of DJGPP programs.  This prevents me
from finding such bugs by setting a watchpoint at address 0.

> While it might not be possible to fix in GDB's internals for some
> time

What would it take to change that?  Perhaps it would be a good idea to
have the list of the obstacles, in case someone might try to negotiate
them one by one.

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