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]

Re: [RFA] Re: Linux threads improvements


Hereby I withdraw the following patch:

2000-04-25  Mark Kettenis  <kettenis@gnu.org>

	Make Linux libthread_db-assisted thread debuging module use GDB's
	internal thread list instead of rolling its own.  Take advantage
	of the thread event reporting facility, and make it handle exiting
	threads.  Improve documentation and do some minor cleanups.
	* lin-thread.c (struct private_thread_info): New definition.
	(supply_gregset, fill_gregset, supply_fpregset, fill_fpregset):
	Add missing prototypes.
	(struct ps_prochandle): Change type of pid member to `pid_t'.  Add
	member stopped.
	(THREADINFO, threadinfo): Removed struct and typedef.
	(threadlist, threadlist_max, threadlist_top): Removed variables.
	(THREADLIST_ALLOC): Removed define.
	(insert_thread, empty_threadlist, next_pending_event,
	threadlist_iter): Removed functions.
	(pid_to_thread, pid_to_lwp): New functions.
	(attach_pid): Removed.
	(enable_thread_event_reporting): Disable TD_DEATH event
	reporting.  Cast notify.ubptaddr to CORE_ADDR where necessary.
	(check_for_thread_event): Removed function.
	(thread_db_unpush_target): Add prototype for
	linuxthreads_discard_global_state.
	(thread_db_new_objfile): Adapt to use GDB's internal thread list.
	(thread_db_pid_to_str): Cast thread id to `long'.  Adapt printf
	format string accordingly.
	(handle_new_thread): Removed.  Moved functionality into ...
	(add_new_thread): ... new function.
	(find_new_threads_callback, new_resume_thread_callback): Removed.
	Moved functionality into ...
	(td_find_new_threads_callback): ... new function.
	(thread_db_find_new_threads): Rewrite to use GDB's internal thread
	list and td_find_new_threads_callback callback function.
	(thread_resume_callback): Moved functionality into ...
	(resume_callback): ... new function.
	(last_resume_pid, last_resume_step, last_resume_signo): Removed
	variables.
	(thread_db_resume): Rename to ...
	(lin_thread_resume): ... and rewrite to use GDB's internal thread
	list and resume_callback callback function.
	(stop_or_attach_thread_callback): Removed.  Moved part of the
	functionality into ...
	(stop_callback): ... new function.  Only stops a thread.
	(wait_for_stop): Change type of argument to `lwpid_t'.  Add code
	to deal with exiting threads.
	(wait_thread_callback): Removed.  Moved functionality into ...
	(wait_callback): ... new function.
	(delete_old_thread): New function.
	(check_event): New function.
	(child_wait): New function.
	(lin_thread_wait): Renamed from thread_db_wait.  Reimplemented to
	use GDB's internal thread list.  Adapt to deal with exiting
	kernel threads.
	(thread_db_mourn_inferior): Add call to
	remove_thread_event_breakpoints.
	(init_thread_db_ops): Use lin_thread_wait and lin_thread_resume
	instead of thread_db_wait and thread_db_resume.

It still has too many problems, and I'm unable to fix those.

Instead I'm working on a new threads implementation for Linux.  This
will provide two layers.  The first layer is a low-level LWP layer
(almost finished, but there are some bugs in the core of GDB that I
need to fix) that provides some basic debugging functionality for
debugging multiple processes that share a VM space, which happends to
be Linux's threading model.  On top of it I'll re-implement the
LinuxThreads library support.  Once the low-level layer is stable,
that should be a piece of cake.

Mark

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