[RFA]: Modified Watchthreads Patch

Eli Zaretskii eliz@gnu.org
Fri Dec 10 13:31:00 GMT 2004


> Date: Thu, 09 Dec 2004 18:36:13 -0500
> From: Jeff Johnston <jjohnstn@redhat.com>
> 
> The following is a modified version of my thread watchpoint patch from 
> October/November.  It removes the code I had used to switch between lwp ptids 
> and thread ptids now that Daniel's lwp patch is in place.  It uses the former 
> version of my observer that is linux-specific and is activated in attach_thread 
> in linux-thread-db.c.  Eli, I renamed the observer as asked to indicate this.

Thanks.

>          * breakpoint.c (insert_watchpoints_for_new_thread): New function.
>          (print_it_typical): Do not issue an error for bp_thread_event
>          if a subsequent event is on the chain.
>          * breakpoint.h (insert_watchpoints_for_new_thread): New prototype.

Hmm... the new function insert_watchpoints_for_new_thread is called
only by ia64_linux_new_thread.  Is there any policy for functions that
are only used by a single port?  Do we care that all the other GDB
builds will get a useless function compiled into them?  Should we
perhaps #ifdef it away conditioned on some symbol?

> +@deftypefun void linux_new_thread (ptid_t @var{ptid})
> +A new linux thread described by @var{ptid} has been officially attached
> +to by gdb.
> +@end deftypefun

What does it mean ``officially attached''?  Can a thread be attached
to ``unofficially''?



More information about the Gdb-patches mailing list