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: [rfc, rfa/doc] Multi-threaded watchpoint improvements


> Date: Sat, 22 Sep 2007 11:37:09 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: gdb-patches@sourceware.org
> 
> On Sat, Sep 22, 2007 at 04:13:24PM +0200, Eli Zaretskii wrote:
> > > > > +@value{GDBN} only supports process-wide watchpoints.
> > > > 
> > > > "Process-wide watchpoints'' as opposed to what?
> > > 
> > > As opposed to thread-specific watchpoints.  We can make a watchpoint
> > > act like it is thread-specific (or we will be able to once Luis's
> > > patch is done), but we don't support setting hardware watchpoints that
> > > only trigger in a specific thread.  Yet, anyway.
> > 
> > I think you should add something like this explanation, to make the
> > intent clear.
> 
> Is this clearer?
> 
> @value{GDBN} only supports process-wide watchpoints, which trigger in
> all threads.  If the target supports threads, per-thread debug
> registers, and watchpoints which only affect a single thread, it
> should set the per-thread debug registers for all threads to the same
> value.  On @sc{gnu}/Linux native targets, this is accomplished by
> using @code{ALL_LWPS} in @code{target_insert_watchpoint} and
> @code{target_remove_watchpoint} and by using
> @code{linux_set_new_thread} to register a handler for newly created
> threads.

A bit clearer, but not yet where I'd be happy.  The following version
expands the description a little, using your mail explanations almost
intact:

  @value{GDBN} only supports process-wide watchpoints, which trigger
  in all threads.  @value{GDBN} uses the thread ID to make watchpoints
  act as if they were thread-specific, but it cannot set hardware
  watchpoints that only trigger in a specific thread.  Therefore, even
  if the target supports threads, per-thread debug registers, and
  watchpoints which only affect a single thread, it should set the
  per-thread debug registers for all threads to the same value.  On
  @sc{gnu}/Linux native targets, this is accomplished by using
  @code{ALL_LWPS} in @code{target_insert_watchpoint} and
  @code{target_remove_watchpoint} and by using
  @code{linux_set_new_thread} to register a handler for newly created
  threads.

WDYT?


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