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: Keeping breakpoints inserted


On Friday 30 November 2007 04:12:14 you wrote:
> On Thu, 2007-11-29 at 22:24 +0300, Vladimir Prus wrote:
> > One of the infrastructure bits necessary for the non-stop threads
> > debugging is always-inserted-breakpoints mode. If GDB has stopped
> > one thread, and other threads are running, we want those other threads
> > to still hit breakpoints and watchpoints. However, current GDB removes
> > all breakpoints from the target before giving user a prompt, and this
> > has to change.
> >
> > I've spend quite time examining breakpoint.c and infrun.c and
> > cleaning/localizing the decisions as to when breakpoints are
> > inserted/removed, and I believe I now have a fully workable plan
> > to make breakpoints always inserted.
> >
> > [...]
> >
> > Anybody has comments on this approach?
>
> Might there be a user preference, under some circumstances,
> to NOT have them inserted while some threads run and some
> are stopped?

Honestly, originally I planned to have breakpoints always inserted,
unconditionally. Unfortunately, that does not work with remote targets --
since the Z0 packet may use memory breakpoints, and remote protocol does
not requires the memory read packet to return original memory content,
without breakpoints, we'd need to explicitly read the memory ourself --
which is not necessary without non-stop mode.

At the same time, I don't yet know any scenario when 
always-inserted-breakpoints mode should not be used in non-stop mode -- 
as non-stop mode needs some support from remote side anyway, we might
as well demand "right" behaviour from Z0/m.

- Volodya


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