Commit Graph

18 Commits

Author SHA1 Message Date
Mark Kettenis 21bf60feee * thread-db.c: Fix a few formatting mistakes. 2001-10-13 15:04:02 +00:00
Mark Kettenis 936742abbe * thread-db.c (enable_thread_event_reporting): Correct warning
message about getting thread death breakpoint.
Reported by John S Kallal <jskallal@home.com>.
2001-07-11 09:14:51 +00:00
Michael Snyder 5d12882f43 2001-07-03 Michael Snyder <msnyder@redhat.com>
* thread_db (find_new_threads_callback, thread_db_thread_alive,
        attach_thread): Update comments.
2001-07-03 21:04:49 +00:00
Michael Snyder 00783ba94c 2001-06-29 Ken Whaley <ken@believe.com>
* thread-db.c (attach_thread): Check for TD_THR_ZOMBIE in addition
	to TD_THR_UNKNOWN when looking for defunct zombie threads.
	(thread_db_thread_alive): Ditto.
	(find_new_threads_callback): Ditto.
2001-07-03 21:01:59 +00:00
Michael Snyder 5fd913cc66 2001-05-22 Michael Snyder <msnyder@redhat.com>
* thread-db.c: Allow for defunct zombie threads.
	(attach_thread): Do not attempt to attach zombie thread.
	(thread_db_thread_alive): Return false for defunct zombie thread.
	(find_new_threads_callback): Don't add defunct zombie thread to list.
2001-05-23 00:06:15 +00:00
Kevin Buettner ca6724c16a Redefine ptid_t to be a struct rather than an int. 2001-05-15 00:03:38 +00:00
Kevin Buettner ce696e0556 Consolidate save_inferior_ptid/restore_inferior_ptid implementation to
one source file.
2001-05-06 22:22:03 +00:00
Mark Kettenis c194fbe18b Implement attach/detach for multi-threaded programs on Linux.
* thread-db.c (keep_thread_db): Adjust comment.
(deactivate_target): Removed.
(thread_db_new_objfile): Don't call deactivate_target.  Implement
guts of deactivate_target inline instead.
(attach_thread): Call ATTACH_LWP unconditionally if defined.
(thread_db_attach): New function.
(thread_db_detach): Don't call deactivate_target.  Do necessary
cleanup inline instead.  Set inferior_ptid to LWP corresponding to
the current user-level thread.
(thread_db_kill): Set inferior_ptid to LWP corresponding to the
current user-level thread.
(thread_db_create_inferior): Deactivate target vector if
KEEP_THREAD_DB is zero.
(thread_db_mourn_inferior): Don't call deactivate_target.  Do
necessary cleanup inline instead.
(init_thread_db_ops): Initialize to_attach field to
thread_db_attach.
* lin-lwp.c (lin_lwp_mourn_inferior): Remove prototype.
(stop_wait_callback): Add prototype.
(init_lwp_list): Add comment about when to re-initialize the LWP
list.
(lin_lwp_attach_lwp): Only call ptrace for cloned processes.
Avoid adding publicates to the LWP list.  Only mark an LWP as
signalled if it doesn't correspond to a cloned process.
(lin_lwp_attach): Add initial process to the LWP list.  Make sure
it's stopped and fake a SIGSTOP.
(detach_callback): New function.
(lin_lwp_detach): Implement.
(lin_lwp_create_inferior): Don't re-initialize LWP list here.
Call child_ops.to_create_inferior directly instead of via
target_beneath local.
(lin_lwp_mourn_inferior): Call child_ops.to_mourn_inferior
directly instead of via target_beneath local.
2001-05-06 17:00:44 +00:00
Kevin Buettner 39f770628a Phase 1 of the ptid_t changes. 2001-05-04 04:15:33 +00:00
Michael Snyder 540af40015 2001-04-30 Michael Snyder <msnyder@redhat.com>
* thread-db.c: Revert 2001-04-26 change for debugging output.
	* lin-lwp.c:   Ditto.
2001-04-30 18:21:17 +00:00
Michael Snyder 20b8570d73 2001-04-26 Michael Snyder <msnyder@redhat.com>
* thread-db.c (_initialize_thread_db): Add set/show command
	"debug-linux-threads" for debugging output.
	* lin-lwp.c (various): Use global "debug_linux_threads to
	turn on extra debugging output.
2001-04-26 23:14:20 +00:00
Michael Snyder b95697738e 2001-04-17 Michael Snyder <msnyder@redhat.com>
* thread-db.c (check_thread_signals): When looping over all
	signals, ignore signal zero.
	(disable_thread_signals): Ditto.
2001-04-17 19:14:54 +00:00
Mark Kettenis 95a856212b * thread-db.c (check_event): Don't report an error if we encounter
a thread creation event for a thread that's already in the thread
list, since that may legitemately happen.  Instead only call
attach_thread if it's not already in the thread list.
2001-03-30 19:36:35 +00:00
Andrew Cagney 4e052eda91 Create new file regcache.h. Update all uses. 2001-03-01 01:39:22 +00:00
J.T. Conklin e5da8f389f * lin-lwp.c (lin_lwp_xfer_memory): Add attrib argument.
* thread-db.c (thread_db_xfer_memory): Likewise.
2001-01-24 00:26:46 +00:00
Mark Kettenis bda9cb723c Fix debugging programs statically linked against the thread library.
* thread-db.c: Various comment fixes and additions.
Include "bfd.h", "symfile.h" and "objfiles.h".
(keep_thread_db): New variable.
(find_new_threads_callback): Remove prototype.
(thread_db_find_new_threads): New prototype.
(thread_db_push_target, thread_db_unpush_target): Remove
functions.
(deactivate_target): New function.
(thread_db_new_objfile): If OBJFILE == NULL, force deactivation of
target vector.  Activate target vector directly instead of calling
thread_db_push_target.  Set keep_thread_db if thread library is
detected in the main symbol file.  Only enable thread event
reporting if there actually is a child process.  Likewise for
detecting new threads, done by calling thread_db_find_new_threads
instead of iterating over the threads ourselves.
(thread_db_detach): Call deactivate_target instead of
thread_db_unpush_target.
(thread_db_wait): Bail out early if we're not debugging the
multi-threaded child process yet.
(thread_db_post_startup_inferior): New function.
(thread_db_mourn_inferior): Call deactivate_target instead of
thread_db_unpush_target.
(init_thread_db_ops): Add thread_db_post_startup_inferior to
thread_db_ops.
2000-12-27 21:37:57 +00:00
Kevin Buettner b8c9b27d1e Replace free() with xfree(). 2000-12-15 01:01:51 +00:00
Mark Kettenis fb0e1ba780 * config/i386/nm-linux.h (PREPARE_TO_PROCEED, ATTCH_LWP,
GET_THREAD_SIGNALS): New defines.
* config/i386/linux.mh (NATDEPFILES): Remove lin-thread.o and
linux-threads.o.  Add proc-service.o, thread-db.o and lin-lwp.o.
* proc-service.c: New file.
* thread-db.c: New file.
* lin-lwp.c: New file.
2000-09-03 18:41:28 +00:00