From 9be21bb4d4f30975766dfaa7d40b53ba10dcc3a0 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 21 Apr 2017 21:45:15 -0400 Subject: Remove dead code and "current" field from MI thread output doc The MI documentation says that -thread-info output contains a "current" field in the current thread tuple, with the value "*". Current GDB master does not do this, and I couldn't find any GDB version that did. I suspect that it was never the case. The code that would correspond to this in print_thread_info_1 is essentially dead code. The calls to uiout->text end up in mi_out::do_text, which is empty. This patch removes the documentation bit and the dead code. This "current" field is not necessary, since -thread-info outputs a "current-thread-id" field. gdb/ChangeLog: * thread.c (print_thread_info_1): Remove dead code. gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Thread Commands): Remove "current" field from -thread-info output. --- gdb/thread.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'gdb/thread.c') diff --git a/gdb/thread.c b/gdb/thread.c index e4113c2..7ce65ff 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -1308,15 +1308,7 @@ print_thread_info_1 (struct ui_out *uiout, char *requested_threads, chain2 = make_cleanup_ui_out_tuple_begin_end (uiout, NULL); - if (uiout->is_mi_like_p ()) - { - /* Compatibility. */ - if (tp->ptid == current_ptid) - uiout->text ("* "); - else - uiout->text (" "); - } - else + if (!uiout->is_mi_like_p ()) { if (tp->ptid == current_ptid) uiout->field_string ("current", "*"); -- cgit v1.1