]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove dead code and "current" field from MI thread output doc
authorSimon Marchi <simon.marchi@ericsson.com>
Sat, 22 Apr 2017 01:45:15 +0000 (21:45 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sat, 22 Apr 2017 01:45:15 +0000 (21:45 -0400)
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/ChangeLog
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/thread.c

index b6576853df2784cef8ce8a6bc4ceec201de92988..2aa0b5945ffe5ac1e7b5826e66e9cae5efbadbc4 100644 (file)
@@ -1,3 +1,7 @@
+2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * thread.c (print_thread_info_1): Remove dead code.
+
 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
index c542c0b46ff79e1f3cd1bd0062c10d40febddb97..efce1c0a11edfcb59bb334d1780bc49a7cfbac76 100644 (file)
@@ -1,3 +1,8 @@
+2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * gdb.texinfo (GDB/MI Thread Commands): Remove "current" field
+       from -thread-info output.
+
 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
 
        * gdb.texinfo (Synopsys ARC): Document "set debug arc 2".
index 300d78eefb857e257d241db3bf9a65af83dd0a39..9e872763b271e165ecd84bd27a7e16a3f06e0a78 100644 (file)
@@ -28088,9 +28088,6 @@ The result is a list of threads.  The following attributes are
 defined for a given thread:
 
 @table @samp
-@item current
-This field exists only for the current thread.  It has the value @samp{*}.
-
 @item id
 The global identifier that @value{GDBN} uses to refer to the thread.
 
index e4113c29d2fb5185d12c4db090a0ddde56088c6c..7ce65ff4453c936fddc0b229373f8adff9e2947c 100644 (file)
@@ -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", "*");