This is the mail archive of the gdb-patches@sources.redhat.com 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: [RFA]: Modified Watchthreads Patch


Eli Zaretskii wrote:
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''?


I'm referring to the act of gdb recognizing the thread. The function itself is called attach_thread but it has a #ifdef governing whether a low-level ATTACH is required or not. Gdb now recognizes it has "attached" to the thread whether a physical attach is needed or not. I can drop the "officially" qualifier if it is confusing.


-- Jeff J.



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