* 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).
This commit is contained in:
Michael Snyder
1999-01-06 03:08:10 +00:00
parent 1f205f9d6e
commit b53a15146c
3 changed files with 55 additions and 9 deletions

View File

@ -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)