* mi/mi-interp.c (mi_on_resume): Don't try to report

resumed thread it the thread list is empty.
This commit is contained in:
Vladimir Prus 2008-07-05 17:57:24 +00:00
parent ed5e946612
commit bb599c81ca
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2008-07-05 Vladimir Prus <vladimir@codesourcery.com>
* 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 <muller@ics.u-strasbg.fr>
* cli/cli-decode.c (add_setshow_optional_filename_cmd): Set

View File

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