From 83ce56d745d0ca10a95086a36f744ef5267cc4ff Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 27 Jun 2008 11:54:21 +0000 Subject: * infrun.c (start_remote): Don't clear thread list here. * monitor.c (monitor_open): Include "gdbthread.h". Clear thread list here. * remote.c (record_currthread): Upgrade the main thread and its entry in the thread list if this is the first time we hear about threads. (remote_thread_alive): Consider magic_null_ptid or a ptid without a tid member always alive. (remote_find_new_threads): Don't update the main thread here. (remote_start_remote): Clear thread list here. Always add the main thread. (extended_remote_attach_1): Add the main thread here. (extended_remote_mourn_1): Re-add the main thread here. (extended_remote_create_inferior_1): Add a main thread. * Makefile.in (monitor.o): Depend on $(gdbthread_h). --- gdb/monitor.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/monitor.c') diff --git a/gdb/monitor.c b/gdb/monitor.c index 41308ded476..43abd02911a 100644 --- a/gdb/monitor.c +++ b/gdb/monitor.c @@ -54,6 +54,7 @@ #include "gdb_regex.h" #include "srec.h" #include "regcache.h" +#include "gdbthread.h" static char *dev_name; static struct target_ops *targ_ops; @@ -804,6 +805,9 @@ monitor_open (char *args, struct monitor_ops *mon_ops, int from_tty) push_target (targ_ops); + /* Start afresh. */ + init_thread_list (); + inferior_ptid = pid_to_ptid (42000); /* Make run command think we are busy... */ /* Give monitor_wait something to read */ -- cgit v1.2.1