* thread.c (print_thread_info): Don't insist

on having current thread if there are no
    threads at all.
This commit is contained in:
Vladimir Prus 2008-03-17 18:41:29 +00:00
parent 5d96d68f64
commit 0bcd3e2056
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2008-03-17 Vladimir Prus <vladimir@codesourcery.com>
* thread.c (print_thread_info): Don't insist
on having current thread if there are no
threads at all.
2008-03-17 Pedro Alves <pedro@codesourcery.com>
* infcmd.c (attach_command_post_wait)

View file

@ -478,8 +478,8 @@ print_thread_info (struct ui_out *uiout, int requested_thread)
if (requested_thread == -1)
{
gdb_assert (current_thread != -1);
if (ui_out_is_mi_like_p (uiout))
gdb_assert (current_thread != -1 || !thread_list);
if (current_thread != -1 && ui_out_is_mi_like_p (uiout))
ui_out_field_int (uiout, "current-thread-id", current_thread);
}