This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Remove mi_out_data::suppress_output


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=233c8c27eb81b0a3ab5182dcb59c7306ba9bd3f3

commit 233c8c27eb81b0a3ab5182dcb59c7306ba9bd3f3
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Fri Dec 2 09:55:09 2016 -0500

    Remove mi_out_data::suppress_output
    
    The suppress_output field of the mi_ui_out_data structure is never actually
    set to 1/true.  We can therefore remove it, and remove all the
    
      if (suppress_output)
    
    checks.
    
    gdb/ChangeLog:
    
    	* mi/mi-out.c (mi_ui_out_data) <suppress_output>: Remove.
    	(mi_table_body): Remove suppress_output check.
    	(mi_table_end): Likewise.
    	(mi_table_header): Likewise.
    	(mi_begin): Likewise.
    	(mi_end): Likewise.
    	(mi_field_int): Likewise.
    	(mi_field_string): Likewise.
    	(mi_field_fmt): Likewise.
    	(mi_out_data_ctor): Likewise.

Diff:
---
 gdb/ChangeLog   | 13 +++++++++++++
 gdb/mi/mi-out.c | 23 -----------------------
 2 files changed, 13 insertions(+), 23 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 72eeea4..2f8e611 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,16 @@
+2016-12-02  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* mi/mi-out.c (mi_ui_out_data) <suppress_output>: Remove.
+	(mi_table_body): Remove suppress_output check.
+	(mi_table_end): Likewise.
+	(mi_table_header): Likewise.
+	(mi_begin): Likewise.
+	(mi_end): Likewise.
+	(mi_field_int): Likewise.
+	(mi_field_string): Likewise.
+	(mi_field_fmt): Likewise.
+	(mi_out_data_ctor): Likewise.
+
 2016-12-02  Yao Qi  <yao.qi@linaro.org>
 	    Pedro Alves  <palves@redhat.com>
 
diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c
index b6d25d3..6e69d7c 100644
--- a/gdb/mi/mi-out.c
+++ b/gdb/mi/mi-out.c
@@ -27,7 +27,6 @@
 struct mi_ui_out_data
   {
     int suppress_field_separator;
-    int suppress_output;
     int mi_version;
     std::vector<ui_file *> streams;
   };
@@ -118,8 +117,6 @@ mi_table_body (struct ui_out *uiout)
 {
   mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
 
-  if (data->suppress_output)
-    return;
   /* close the table header line if there were any headers */
   mi_close (uiout, ui_out_type_list);
   mi_open (uiout, "body", ui_out_type_list);
@@ -132,7 +129,6 @@ mi_table_end (struct ui_out *uiout)
 {
   mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
 
-  data->suppress_output = 0;
   mi_close (uiout, ui_out_type_list); /* body */
   mi_close (uiout, ui_out_type_tuple);
 }
@@ -145,9 +141,6 @@ mi_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
 {
   mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
 
-  if (data->suppress_output)
-    return;
-
   mi_open (uiout, NULL, ui_out_type_tuple);
   mi_field_int (uiout, 0, 0, ui_center, "width", width);
   mi_field_int (uiout, 0, 0, ui_center, "alignment", alignment);
@@ -163,9 +156,6 @@ mi_begin (struct ui_out *uiout, enum ui_out_type type, const char *id)
 {
   mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
 
-  if (data->suppress_output)
-    return;
-
   mi_open (uiout, id, type);
 }
 
@@ -176,9 +166,6 @@ mi_end (struct ui_out *uiout, enum ui_out_type type)
 {
   mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
 
-  if (data->suppress_output)
-    return;
-
   mi_close (uiout, type);
 }
 
@@ -191,9 +178,6 @@ mi_field_int (struct ui_out *uiout, int fldno, int width,
   char buffer[20];	/* FIXME: how many chars long a %d can become? */
   mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
 
-  if (data->suppress_output)
-    return;
-
   xsnprintf (buffer, sizeof (buffer), "%d", value);
   mi_field_string (uiout, fldno, width, alignment, fldname, buffer);
 }
@@ -216,9 +200,6 @@ mi_field_string (struct ui_out *uiout, int fldno, int width,
   mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
   struct ui_file *stream;
 
-  if (data->suppress_output)
-    return;
-
   stream = data->streams.back ();
   field_separator (uiout);
   if (fldname)
@@ -239,9 +220,6 @@ mi_field_fmt (struct ui_out *uiout, int fldno, int width,
   mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
   struct ui_file *stream;
 
-  if (data->suppress_output)
-    return;
-
   stream = data->streams.back ();
   field_separator (uiout);
   if (fldname)
@@ -397,7 +375,6 @@ mi_out_data_ctor (mi_out_data *self, int mi_version, struct ui_file *stream)
   self->streams.push_back (stream);
 
   self->suppress_field_separator = 0;
-  self->suppress_output = 0;
   self->mi_version = mi_version;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]