mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
* 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:
@ -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)
|
||||
|
Reference in New Issue
Block a user