This is the mail archive of the
gdb-cvs@sources.redhat.com
mailing list for the GDB project.
src/gdb ChangeLog thread-db.c lin-lwp.c
- To: gdb-cvs at sourceware dot cygnus dot com
- Subject: src/gdb ChangeLog thread-db.c lin-lwp.c
- From: kettenis at sourceware dot cygnus dot com
- Date: 6 May 2001 17:00:46 -0000
CVSROOT: /cvs/src
Module name: src
Changes by: kettenis@sources.redhat.com 2001-05-06 10:00:45
Modified files:
gdb : ChangeLog thread-db.c lin-lwp.c
Log message:
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.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.1219&r2=1.1220
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/thread-db.c.diff?cvsroot=src&r1=1.10&r2=1.11
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/lin-lwp.c.diff?cvsroot=src&r1=1.14&r2=1.15