From: Andrew Cagney Date: Mon, 14 May 2001 16:59:49 +0000 (+0000) Subject: Output ``[...]'' when a list. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5a9aa5dc6fe1f5d84bcf3b7b412a415a3e23c907;p=binutils-gdb.git Output ``[...]'' when a list. --- diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog index 617e0cd6b97..3398252398d 100644 --- a/gdb/mi/ChangeLog +++ b/gdb/mi/ChangeLog @@ -1,3 +1,7 @@ +2001-05-12 Andrew Cagney + + * mi-out.c (mi_close, mi_open): Output ``[]'' when a list. + Fri May 11 13:55:07 2001 Andrew Cagney * mi-cmd-var.c: Replace ui_out_list_begin, ui_out_list_end and diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c index e9208123bbd..b2bfaed39d8 100644 --- a/gdb/mi/mi-out.c +++ b/gdb/mi/mi-out.c @@ -307,7 +307,17 @@ mi_open (struct ui_out *uiout, enum ui_out_type type) { struct ui_out_data *data = ui_out_data (uiout); - fputc_unfiltered ('{', data->buffer); + switch (type) + { + case ui_out_type_tuple: + fputc_unfiltered ('{', data->buffer); + break; + case ui_out_type_list: + fputc_unfiltered ('[', data->buffer); + break; + default: + internal_error (__FILE__, __LINE__, "bad switch"); + } } static void @@ -315,7 +325,17 @@ mi_close (struct ui_out *uiout, enum ui_out_type type) { struct ui_out_data *data = ui_out_data (uiout); - fputc_unfiltered ('}', data->buffer); + switch (type) + { + case ui_out_type_tuple: + fputc_unfiltered ('}', data->buffer); + break; + case ui_out_type_list: + fputc_unfiltered (']', data->buffer); + break; + default: + internal_error (__FILE__, __LINE__, "bad switch"); + } } /* add a string to the buffer */