* The threads saga: watchpoints
@ 2003-03-07 14:22 Daniel Jacobowitz
2003-03-07 14:37 ` Elena Zannoni
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2003-03-07 14:22 UTC (permalink / raw)
To: gdb
It was pointed out to me today that watchpoints and threads really don't get
along. It's even in the manual:
_Warning:_ In multi-thread programs, watchpoints have only limited
usefulness. With the current watchpoint implementation, GDB can
only watch the value of an expression _in a single thread_. If
you are confident that the expression can only change due to the
current thread's activity (and if you are also confident that no
other thread can become current), then you can use watchpoints as
usual. However, GDB may not notice when a non-current thread's
activity changes the expression.
I think some of our hardware breakpoint implementations have the same issue.
It seems to me that, in general, this should be pretty easy to fix. But it
requires some definite changes in the current infrastructure. Shouldn't we
be able to insert the watchpoint in all threads?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: The threads saga: watchpoints
2003-03-07 14:22 The threads saga: watchpoints Daniel Jacobowitz
@ 2003-03-07 14:37 ` Elena Zannoni
2003-03-07 14:43 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Elena Zannoni @ 2003-03-07 14:37 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
Daniel Jacobowitz writes:
> It was pointed out to me today that watchpoints and threads really don't get
> along. It's even in the manual:
>
> _Warning:_ In multi-thread programs, watchpoints have only limited
> usefulness. With the current watchpoint implementation, GDB can
> only watch the value of an expression _in a single thread_. If
> you are confident that the expression can only change due to the
> current thread's activity (and if you are also confident that no
> other thread can become current), then you can use watchpoints as
> usual. However, GDB may not notice when a non-current thread's
> activity changes the expression.
>
>
> I think some of our hardware breakpoint implementations have the same issue.
>
> It seems to me that, in general, this should be pretty easy to fix. But it
> requires some definite changes in the current infrastructure. Shouldn't we
> be able to insert the watchpoint in all threads?
>
> --
> Daniel Jacobowitz
> MontaVista Software Debian GNU/Linux Developer
There was a discussion on this some time ago:
http://sources.redhat.com/ml/gdb-patches/2002-01/msg00383.html
and follow-ups.
elena
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: The threads saga: watchpoints
2003-03-07 14:37 ` Elena Zannoni
@ 2003-03-07 14:43 ` Daniel Jacobowitz
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2003-03-07 14:43 UTC (permalink / raw)
To: gdb
On Fri, Mar 07, 2003 at 09:41:33AM -0500, Elena Zannoni wrote:
> Daniel Jacobowitz writes:
> > It was pointed out to me today that watchpoints and threads really don't get
> > along. It's even in the manual:
> >
> > _Warning:_ In multi-thread programs, watchpoints have only limited
> > usefulness. With the current watchpoint implementation, GDB can
> > only watch the value of an expression _in a single thread_. If
> > you are confident that the expression can only change due to the
> > current thread's activity (and if you are also confident that no
> > other thread can become current), then you can use watchpoints as
> > usual. However, GDB may not notice when a non-current thread's
> > activity changes the expression.
> >
> >
> > I think some of our hardware breakpoint implementations have the same issue.
> >
> > It seems to me that, in general, this should be pretty easy to fix. But it
> > requires some definite changes in the current infrastructure. Shouldn't we
> > be able to insert the watchpoint in all threads?
> >
> > --
> > Daniel Jacobowitz
> > MontaVista Software Debian GNU/Linux Developer
>
>
> There was a discussion on this some time ago:
>
> http://sources.redhat.com/ml/gdb-patches/2002-01/msg00383.html
> and follow-ups.
Thanks! I missed that one. I think that perhaps I should audit the
available hardware watchpoint mechanisms for similar problems...
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-03-07 14:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-07 14:22 The threads saga: watchpoints Daniel Jacobowitz
2003-03-07 14:37 ` Elena Zannoni
2003-03-07 14:43 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox