This is the mail archive of the gdb@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: MI: reporting of multiple breakpoints


> Date: Sun, 19 Feb 2006 16:54:33 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: Paul Koning <pkoning@equallogic.com>, ghost@cs.msu.su,
> 	gdb@sources.redhat.com
> 
> > > exception will deliver the PC of the instruction doing the store, or
> > > that PC can be deduced.
> > 
> > I think this happens on _all_ platforms that support watchpoints.
> 
> Really?  On x86, I suspect that the exception is always at the
> instruction following the store; so it's possible, although
> non-trivial, to identify the store by backtracking.

The exception happens right when the store is written, and we find the
PC to be after the faulting instruction, when the inferior stops.  The
faulting instruction is the one that corresponds to the previous PC
value.

> > Again, the place that caused the store is known (and shown to the
> > user), but the place where the inferior is stopped is a different
> > place on many architectures, including x86.  Wed are arguing about the
> > latter, not the former.
> 
> Could you give me an example?

What should the example show?

> I think that is desirable, but not at all what we do today - I have
> no idea how to retrieve the address of the store when I stop at a
> watchpoint.  We show the old and new value, but that's it.

We also show the current source line, don't we?  Are you saying that
we show the wrong line?


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