From: Vladimir Prus Date: Sat, 5 Jul 2008 17:57:24 +0000 (+0000) Subject: * mi/mi-interp.c (mi_on_resume): Don't try to report X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bb599c81ca62830f4794da2db986511c41a30daa;p=binutils-gdb.git * mi/mi-interp.c (mi_on_resume): Don't try to report resumed thread it the thread list is empty. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fae9847b9cb..04fa634dadf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-07-05 Vladimir Prus + + * mi/mi-interp.c (mi_on_resume): Don't try to report + resumed thread it the thread list is empty. + 2008-07-05 Pierre Muller * cli/cli-decode.c (add_setshow_optional_filename_cmd): Set diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index 4a1821d4611..361cf7fd832 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -338,6 +338,12 @@ mi_on_resume (ptid_t ptid) if (PIDGET (ptid) == -1) fprintf_unfiltered (raw_stdout, "*running,thread-id=\"all\"\n"); + else if (thread_count () == 0) + { + /* This is a target where for single-threaded programs the thread + table has zero threads. Don't print any thread-id field. */ + fprintf_unfiltered (raw_stdout, "*running\n"); + } else { struct thread_info *ti = find_thread_pid (ptid);