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: Re: [patch] Fix for 'info threads' crashes if zombie threads exist


> Date: Thu, 13 Jul 2006 00:01:35 -0400
> From: Daniel Jacobowitz <drow@false.org>
>
> The main change is to remove the thread_db_thread_alive function.  My
> ptid_t representation change means that we can call the linux-nat.c
> implementation directly.  This change means we might have two threads
> "live" at the same time with the same TID - but they'll have different
> LWP IDs, so different PTIDs, so GDB won't get confused.

Probably a good idea, given the fact that it's unlikely we'll see a
N:M threads library on Linux is the near future.

> It also (long overdue) removes the dependence on fill_gregset, and
> removes a not especially useful call into libthread_db for converting
> threads to strings.  There are a number of more possible cleanups,
> but this hits the big ones.

Doesn't your simplification of thread_db_pid_to_str() lose some useful
information about the extra system thread that the LinuxThreads
library used to have (I'm not sure if that wart is still present in
NPTL)?

You might want to look at implementing to_extra_thread_info() to give
some state information; see bsd-uthread.c for an example.

Mark

> 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
> 
> 	* linux-thread-db.c (td_thr_getfpregs_p, td_thr_getgregs_p)
> 	(td_thr_setfpregs_p, td_thr_setgregs_p, thread_db_get_info)
> 	(thread_db_fetch_registers, thread_db_store_registers)
> 	(thread_db_thread_alive): Delete.
> 	(thread_db_load): Don't look up regset functions.
> 	(thread_db_pid_to_str): Simplify.
> 	(init_thread_db_ops): Do not set to_fetch_registers,
> 	to_store_registers, or to_thread_alive.


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