From 0bcd3e20560a37fde7d6a76cf129aa65e023a5b4 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 17 Mar 2008 18:41:29 +0000 Subject: [PATCH] * thread.c (print_thread_info): Don't insist on having current thread if there are no threads at all. --- gdb/ChangeLog | 6 ++++++ gdb/thread.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3ead9fa5ab4..cc9020e41ed 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2008-03-17 Vladimir Prus + + * thread.c (print_thread_info): Don't insist + on having current thread if there are no + threads at all. + 2008-03-17 Pedro Alves * infcmd.c (attach_command_post_wait) diff --git a/gdb/thread.c b/gdb/thread.c index 1ce514a2d2e..87dcbd727b8 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -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); } -- 2.30.2