aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-10-01 21:15:43 +0000
committerAndrew Cagney <cagney@redhat.com>2002-10-01 21:15:43 +0000
commitda0f9dcdbea04f3552fab2dcbf081045b824afa8 (patch)
tree58aee8a22591dee82df07f6e2fc8d08a630c2160 /gdb/mi
parentbdf64bacd5b198ebda7fd581a5b26547ec6a925b (diff)
downloadgdb-da0f9dcdbea04f3552fab2dcbf081045b824afa8.zip
gdb-da0f9dcdbea04f3552fab2dcbf081045b824afa8.tar.gz
gdb-da0f9dcdbea04f3552fab2dcbf081045b824afa8.tar.bz2
2002-10-01 Andrew Cagney <ac131313@redhat.com>
* NEWS: Mention that MI syntax, selected by "mi" changed to "mi2" and that "mi0" syntax has been removed. 2002-10-01 Andrew Cagney <ac131313@redhat.com> * gdb.texinfo (Mode Options): Update --interpreter option. "mi2" and "mi1" instead of "mi1" and "mi0". 2002-10-01 Andrew Cagney <ac131313@redhat.com> * mi-main.c (mi2_command_loop): New function. (mi0_command_loop): Delete function. (_initialize_mi_main): Recognize, and default to, "mi2". Do not recognize "mi0". * mi-out.c (mi_table_begin): Remove mi0 code. (mi_table_body, mi_table_end): Ditto. (mi_table_header, mi_open, mi_close): Ditto.
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/ChangeLog10
-rw-r--r--gdb/mi/mi-main.c17
-rw-r--r--gdb/mi/mi-out.c30
3 files changed, 21 insertions, 36 deletions
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index dca5af3..6376bf0 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -1,3 +1,13 @@
+2002-10-01 Andrew Cagney <ac131313@redhat.com>
+
+ * mi-main.c (mi2_command_loop): New function.
+ (mi0_command_loop): Delete function.
+ (_initialize_mi_main): Recognize, and default to, "mi2". Do not
+ recognize "mi0".
+ * mi-out.c (mi_table_begin): Remove mi0 code.
+ (mi_table_body, mi_table_end): Ditto.
+ (mi_table_header, mi_open, mi_close): Ditto.
+
2002-09-29 Andrew Cagney <ac131313@redhat.com>
* mi-out.c (mi_version): New function.
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 69dcc3e..b92ebf8 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -1514,15 +1514,15 @@ mi_command_loop (int mi_version)
}
static void
-mi0_command_loop (void)
+mi1_command_loop (void)
{
- mi_command_loop (0);
+ mi_command_loop (1);
}
static void
-mi1_command_loop (void)
+mi2_command_loop (void)
{
- mi_command_loop (1);
+ mi_command_loop (2);
}
static void
@@ -1547,11 +1547,12 @@ _initialize_mi_main (void)
return;
/* If we're _the_ interpreter, take control. */
- if (strcmp (interpreter_p, "mi0") == 0)
- command_loop_hook = mi0_command_loop;
- else if (strcmp (interpreter_p, "mi") == 0
- || strcmp (interpreter_p, "mi1") == 0)
+ if (strcmp (interpreter_p, "mi") == 0)
+ command_loop_hook = mi2_command_loop;
+ else if (strcmp (interpreter_p, "mi1") == 0)
command_loop_hook = mi1_command_loop;
+ else if (strcmp (interpreter_p, "mi2") == 0)
+ command_loop_hook = mi2_command_loop;
else
return;
diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c
index f7ed7ec..f7156ca 100644
--- a/gdb/mi/mi-out.c
+++ b/gdb/mi/mi-out.c
@@ -109,14 +109,6 @@ mi_table_begin (struct ui_out *uiout,
{
struct ui_out_data *data = ui_out_data (uiout);
mi_open (uiout, tblid, ui_out_type_tuple);
- if (data->mi_version == 0)
- {
- if (nr_rows == 0)
- data->suppress_output = 1;
- else
- mi_open (uiout, "hdr", ui_out_type_list);
- return;
- }
mi_field_int (uiout, -1/*fldno*/, -1/*width*/, -1/*alin*/,
"nr_rows", nr_rows);
mi_field_int (uiout, -1/*fldno*/, -1/*width*/, -1/*alin*/,
@@ -134,8 +126,6 @@ mi_table_body (struct ui_out *uiout)
return;
/* close the table header line if there were any headers */
mi_close (uiout, ui_out_type_list);
- if (data->mi_version == 0)
- return;
mi_open (uiout, "body", ui_out_type_list);
}
@@ -146,11 +136,6 @@ mi_table_end (struct ui_out *uiout)
{
struct ui_out_data *data = ui_out_data (uiout);
data->suppress_output = 0;
- if (data->mi_version == 0)
- {
- mi_close (uiout, ui_out_type_tuple);
- return;
- }
mi_close (uiout, ui_out_type_list); /* body */
mi_close (uiout, ui_out_type_tuple);
}
@@ -165,11 +150,6 @@ mi_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
struct ui_out_data *data = ui_out_data (uiout);
if (data->suppress_output)
return;
- if (data->mi_version == 0)
- {
- mi_field_string (uiout, 0, width, alignment, 0, colhdr);
- return;
- }
mi_open (uiout, NULL, ui_out_type_tuple);
mi_field_int (uiout, 0, 0, 0, "width", width);
mi_field_int (uiout, 0, 0, 0, "alignment", alignment);
@@ -361,10 +341,7 @@ mi_open (struct ui_out *uiout,
fputc_unfiltered ('{', data->buffer);
break;
case ui_out_type_list:
- if (data->mi_version == 0)
- fputc_unfiltered ('{', data->buffer);
- else
- fputc_unfiltered ('[', data->buffer);
+ fputc_unfiltered ('[', data->buffer);
break;
default:
internal_error (__FILE__, __LINE__, "bad switch");
@@ -382,10 +359,7 @@ mi_close (struct ui_out *uiout,
fputc_unfiltered ('}', data->buffer);
break;
case ui_out_type_list:
- if (data->mi_version == 0)
- fputc_unfiltered ('}', data->buffer);
- else
- fputc_unfiltered (']', data->buffer);
+ fputc_unfiltered (']', data->buffer);
break;
default:
internal_error (__FILE__, __LINE__, "bad switch");