aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi/mi-interp.c
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2008-07-05 17:57:24 +0000
committerVladimir Prus <vladimir@codesourcery.com>2008-07-05 17:57:24 +0000
commitbb599c81ca62830f4794da2db986511c41a30daa (patch)
tree5c4d8506ded63ac983b684640d98e55e30065565 /gdb/mi/mi-interp.c
parented5e9466121bd867fd8b9ceae6c8eb45fa4c4c4b (diff)
downloadgdb-bb599c81ca62830f4794da2db986511c41a30daa.zip
gdb-bb599c81ca62830f4794da2db986511c41a30daa.tar.gz
gdb-bb599c81ca62830f4794da2db986511c41a30daa.tar.bz2
* mi/mi-interp.c (mi_on_resume): Don't try to report
resumed thread it the thread list is empty.
Diffstat (limited to 'gdb/mi/mi-interp.c')
-rw-r--r--gdb/mi/mi-interp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index 4a1821d..361cf7f 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);