diff options
author | Michael Snyder <msnyder@vmware.com> | 1999-01-06 03:08:10 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 1999-01-06 03:08:10 +0000 |
commit | b53a15146cd81163524f09557f199514a987b766 (patch) | |
tree | be9b6f31c6225a1ac9b265b082dcbf58bcaef1dd /gdb/thread.c | |
parent | 1f205f9d6e2d0492e4c76885dd54cb5bdff1f4a3 (diff) | |
download | gdb-b53a15146cd81163524f09557f199514a987b766.zip gdb-b53a15146cd81163524f09557f199514a987b766.tar.gz gdb-b53a15146cd81163524f09557f199514a987b766.tar.bz2 |
* remote.c (record_curthread): Must not modify inferior_pid when
called from wait_for_inferior. Instead, if a new thread-id is
detected, call add_thread. (MAGIC_NULL_PID): new macro, use
instead of the magic number "42000". (remote_find_new_threads):
if inferior_pid is unknown, get and use the current thread id.
(remote_start_remote): on connecting, attempt to get the current
thread id for inferior_pid. (remote_resume): If pid == -1,
then resume any-thread (not the current thread specifically).
* thread.c (info_threads_command): don't initialize current_pid
until after call to FIND_NEW_THREADS (which may change inferior_pid).
Diffstat (limited to 'gdb/thread.c')
-rw-r--r-- | gdb/thread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/thread.c b/gdb/thread.c index 35bccf1..bf4631c 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -465,7 +465,7 @@ info_threads_command (arg, from_tty) int from_tty; { struct thread_info *tp; - int current_pid = inferior_pid; + int current_pid; struct frame_info *cur_frame; int saved_frame_level = selected_frame_level; int counter; @@ -478,7 +478,7 @@ info_threads_command (arg, from_tty) #if defined(FIND_NEW_THREADS) FIND_NEW_THREADS (); #endif - + current_pid = inferior_pid; for (tp = thread_list; tp; tp = tp->next) { if (tp->pid == current_pid) |