This is the mail archive of the gdb-patches@sourceware.org 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: [RFA] Clarify infrun variable naming.


On Friday 23 November 2007 18:41:55 Pierre Muller wrote:
> > >   But this is the reason of the failure to catch watchpoints
> > > that happen at the point where we are just stepping over a
> > breakpoint,
> > > because we step with the watchpoints disabled.
> > >   Why don't we enable all break- and watchpoints but the
> > > ones that do have the same PC we are currently?
> > 
> > Because that's extra work, and I haven't got around to that yet ;-)
> > In case of watchpoints, you probably meant enabling all watchpoint
> > at different data address, not PC?
>   Stepping over watchpoint is architechture dependent, 
> for i386 this is not needed as the watchpoint is generated with PC 
> at the instruction after the one that triggered the watchpoint... 

Yes. What I mean is that there are two situations now:

1. When we step over breakpoint, we disable everything, including watchpoints.
2. When we hit watchpoint, and the PC is at the instruction itself, we disable
all breakpoints and watchpoints when stepping.

(2) might not be a problem now, but if we wish to interact with one thread,
while others are running, it might become a problem -- other threads
might miss unrelated breakpoints and watchpoints. So, we need to:

   - Remove breakpoints at current PC
   - Remove watchpoint a the address being accessed
   - Single step

I suspect you was more interested in (1), but that's basically two sides
of the coin.

- Volodya


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