This is the mail archive of the gdb@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]
Other format: [Raw text]

Re: watchpoint troubles


>>>>> Paul Koning writes:

> I'm having all sorts of watchpoint troubles with gdb 5.3 and a remote
> target.   These are things I'm running into as I'm working to improve
> the implementation of watchpoints in my remote stub.

...

> Without that flag, the first thing that gdb does after the watchpoint
> entry is to read the address being watched.  Needless to say, that
> causes a watchpoint recursion within the target stub.  In the case
> where HAVE_NONSTEPPABLE_WATCHPOINT is defined, things work because the
> watchpoint is removed before the memory read request is made.

> Since gdb normally removes and reinserts watch/break points on every
> entry, I figured it's gdb's job to do things in the right order.  Bad
> assumption?  I can certainly hack up the stub to remove the
> watchpoints before acting on any memory access requests from gdb, but
> is that kind of hackery supposed to be done?

This has come up before:

  http://sources.redhat.com/ml/gdb-patches/2001-03/msg00506.html

I think the answer is that the stub should disable watchpoints
anytime the target stops and reenable them when stepping or
continuing.

--Mark


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