+Fri May 11 13:32:50 2001 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * breakpoint.c: Replace ui_out_list_begin, ui_out_list_end and
+ make_cleanup_ui_out_list_end with ui_out_tuple_begin,
+ ui_out_tuple_end and make_cleanup_ui_out_tuple_begin_end.
+ * cli/cli-setshow.c: Ditto.
+ * printcmd.c: Ditto.
+ * stack.c: Ditto.
+
+ * ui-out.h (enum ui_out_type): Fix tipo - tupple -> tuple.
+ * ui-out.c (ui_out_list_begin): Delete ``lstid'' parameter.
+ (ui_out_tuple_begin): New function.
+ (ui_out_tuple_end): New function.
+ (ui_out_tuple_begin_end): New function.
+ (make_cleanup_ui_out_list_begin_end): Replace
+ make_cleanup_ui_out_list_end function.
+ * ui-out.h (ui_out_list_begin): Update declaration.
+ (make_cleanup_ui_out_list_begin_end): Replace
+ make_cleanup_ui_out_list_end declaration.
+ (ui_out_tuple_begin, ui_out_tuple_end): Declare.
+ (ui_out_tuple_begin_end): Declare.
+
2001-05-11 Jim Blandy <jimb@redhat.com>
* gnu-v2-abi.c: Don't #include "gdb_regex.h". We don't use it.
if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
ui_out_field_string (uiout, "reason", "watchpoint-trigger");
mention (bs->breakpoint_at);
- ui_out_list_begin (uiout, "value");
+ ui_out_tuple_begin (uiout, "value");
ui_out_text (uiout, "\nOld value = ");
value_print (bs->old_val, stb->stream, 0, Val_pretty_default);
ui_out_field_stream (uiout, "old", stb);
ui_out_text (uiout, "\nNew value = ");
value_print (bs->breakpoint_at->val, stb->stream, 0, Val_pretty_default);
ui_out_field_stream (uiout, "new", stb);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
ui_out_text (uiout, "\n");
#else
mention (bs->breakpoint_at);
if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
ui_out_field_string (uiout, "reason", "read-watchpoint-trigger");
mention (bs->breakpoint_at);
- ui_out_list_begin (uiout, "value");
+ ui_out_tuple_begin (uiout, "value");
ui_out_text (uiout, "\nValue = ");
value_print (bs->breakpoint_at->val, stb->stream, 0, Val_pretty_default);
ui_out_field_stream (uiout, "value", stb);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
ui_out_text (uiout, "\n");
#else
mention (bs->breakpoint_at);
if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
ui_out_field_string (uiout, "reason", "access-watchpoint-trigger");
mention (bs->breakpoint_at);
- ui_out_list_begin (uiout, "value");
+ ui_out_tuple_begin (uiout, "value");
ui_out_text (uiout, "\nOld value = ");
value_print (bs->old_val, stb->stream, 0, Val_pretty_default);
ui_out_field_stream (uiout, "old", stb);
mention (bs->breakpoint_at);
if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
ui_out_field_string (uiout, "reason", "access-watchpoint-trigger");
- ui_out_list_begin (uiout, "value");
+ ui_out_tuple_begin (uiout, "value");
ui_out_text (uiout, "\nValue = ");
}
value_print (bs->breakpoint_at->val, stb->stream, 0,Val_pretty_default);
ui_out_field_stream (uiout, "new", stb);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
ui_out_text (uiout, "\n");
#else
if (bs->old_val != NULL)
annotate_record ();
#ifdef UI_OUT
- ui_out_list_begin (uiout, "bkpt");
+ ui_out_tuple_begin (uiout, "bkpt");
#endif
/* 1 */
{
annotate_field (9);
#ifdef UI_OUT
- ui_out_list_begin (uiout, "script");
+ ui_out_tuple_begin (uiout, "script");
print_command_lines (uiout, l, 4);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
#else
while (l)
{
#endif
}
#ifdef UI_OUT
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
do_cleanups (old_chain);
#endif
}
#ifdef UI_OUT
case bp_watchpoint:
ui_out_text (uiout, "Watchpoint ");
- ui_out_list_begin (uiout, "wpt");
+ ui_out_tuple_begin (uiout, "wpt");
ui_out_field_int (uiout, "number", b->number);
ui_out_text (uiout, ": ");
print_expression (b->exp, stb->stream);
ui_out_field_stream (uiout, "exp", stb);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
break;
case bp_hardware_watchpoint:
ui_out_text (uiout, "Hardware watchpoint ");
- ui_out_list_begin (uiout, "wpt");
+ ui_out_tuple_begin (uiout, "wpt");
ui_out_field_int (uiout, "number", b->number);
ui_out_text (uiout, ": ");
print_expression (b->exp, stb->stream);
ui_out_field_stream (uiout, "exp", stb);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
break;
#else
case bp_watchpoint:
#ifdef UI_OUT
case bp_read_watchpoint:
ui_out_text (uiout, "Hardware read watchpoint ");
- ui_out_list_begin (uiout, "hw-rwpt");
+ ui_out_tuple_begin (uiout, "hw-rwpt");
ui_out_field_int (uiout, "number", b->number);
ui_out_text (uiout, ": ");
print_expression (b->exp, stb->stream);
ui_out_field_stream (uiout, "exp", stb);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
break;
case bp_access_watchpoint:
ui_out_text (uiout, "Hardware access (read/write) watchpoint ");
- ui_out_list_begin (uiout, "hw-awpt");
+ ui_out_tuple_begin (uiout, "hw-awpt");
ui_out_field_int (uiout, "number", b->number);
ui_out_text (uiout, ": ");
print_expression (b->exp, stb->stream);
ui_out_field_stream (uiout, "exp", stb);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
break;
#else
case bp_read_watchpoint:
cmd_show_list (struct cmd_list_element *list, int from_tty, char *prefix)
{
#ifdef UI_OUT
- ui_out_list_begin (uiout, "showlist");
+ ui_out_tuple_begin (uiout, "showlist");
#endif
for (; list != NULL; list = list->next)
{
#ifdef UI_OUT
if (list->prefixlist && !list->abbrev_flag)
{
- ui_out_list_begin (uiout, "optionlist");
+ ui_out_tuple_begin (uiout, "optionlist");
ui_out_field_string (uiout, "prefix", list->prefixname + 5);
cmd_show_list (*list->prefixlist, from_tty, list->prefixname + 5);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
}
if (list->type == show_cmd)
{
- ui_out_list_begin (uiout, "option");
+ ui_out_tuple_begin (uiout, "option");
ui_out_text (uiout, prefix);
ui_out_field_string (uiout, "name", list->name);
ui_out_text (uiout, ": ");
do_setshow_command ((char *) NULL, from_tty, list);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
}
#else
if (list->prefixlist && !list->abbrev_flag)
#endif
}
#ifdef UI_OUT
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
#endif
}
+Fri May 11 13:55:07 2001 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * mi-cmd-var.c: Replace ui_out_list_begin, ui_out_list_end and
+ make_cleanup_ui_out_list_end with ui_out_tupple_begin,
+ ui_out_tupple_end and make_cleanup_ui_out_tupple_begin_end.
+ * mi-cmd-stack.c: Ditto.
+ * mi-cmd-disas.c: Ditto.
+ * mi-main.c: Ditto.
+
2001-05-10 Andrew Cagney <ac131313@redhat.com>
* mi-out.c (mi_open, mi_close): Replace list_open and list_close.
for that line. */
next_line = 0; /* Force out first line */
- ui_out_list_begin (uiout, "asm_insns");
+ ui_out_tuple_begin (uiout, "asm_insns");
num_displayed = 0;
for (i = 0; i < newlines; i++)
{
/* Just one line to print. */
if (next_line == mle[i].line)
{
- ui_out_list_begin (uiout, "src_and_asm_line");
+ ui_out_tuple_begin (uiout, "src_and_asm_line");
print_source_lines (symtab, next_line, mle[i].line + 1, 0);
}
else
/* Several source lines w/o asm instructions associated. */
for (; next_line < mle[i].line; next_line++)
{
- ui_out_list_begin (uiout, "src_and_asm_line");
+ ui_out_tuple_begin (uiout, "src_and_asm_line");
print_source_lines (symtab, next_line, mle[i].line + 1, 0);
- ui_out_list_begin (uiout, "line_asm_insn");
- ui_out_list_end (uiout);
- ui_out_list_end (uiout);
+ ui_out_tuple_begin (uiout, "line_asm_insn");
+ ui_out_tuple_end (uiout);
+ ui_out_tuple_end (uiout);
}
/* Print the last line and leave list open for
asm instructions to be added. */
- ui_out_list_begin (uiout, "src_and_asm_line");
+ ui_out_tuple_begin (uiout, "src_and_asm_line");
print_source_lines (symtab, next_line, mle[i].line + 1, 0);
}
}
else
{
- ui_out_list_begin (uiout, "src_and_asm_line");
+ ui_out_tuple_begin (uiout, "src_and_asm_line");
print_source_lines (symtab, mle[i].line, mle[i].line + 1, 0);
}
next_line = mle[i].line + 1;
- ui_out_list_begin (uiout, "line_asm_insn");
+ ui_out_tuple_begin (uiout, "line_asm_insn");
if (i + 1 < newlines && mle[i + 1].line <= mle[i].line)
close_list = 0;
}
else
num_displayed++;
}
- ui_out_list_begin (uiout, NULL);
+ ui_out_tuple_begin (uiout, NULL);
ui_out_field_core_addr (uiout, "address", pc);
if (!build_address_symbolic (pc, 0, &name, &offset, &filename, &line, &unmapped))
pc += (*tm_print_insn) (pc, &di);
ui_out_field_stream (uiout, "inst", stb);
ui_file_rewind (stb->stream);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
}
if (close_list)
{
- ui_out_list_end (uiout);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
+ ui_out_tuple_end (uiout);
close_list = 0;
}
if (how_many >= 0)
if (num_displayed >= how_many)
break;
}
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
}
else
{
assembly_only:
- ui_out_list_begin (uiout, "asm_insns");
+ ui_out_tuple_begin (uiout, "asm_insns");
num_displayed = 0;
for (pc = low; pc < high;)
{
else
num_displayed++;
}
- ui_out_list_begin (uiout, NULL);
+ ui_out_tuple_begin (uiout, NULL);
ui_out_field_core_addr (uiout, "address", pc);
if (!build_address_symbolic (pc, 0, &name, &offset, &filename, &line, &unmapped))
pc += (*tm_print_insn) (pc, &di);
ui_out_field_stream (uiout, "inst", stb);
ui_file_rewind (stb->stream);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
}
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
}
gdb_flush (gdb_stdout);
if (fi == NULL)
error ("mi_cmd_stack_list_frames: Not enough frames in stack.");
- ui_out_list_begin (uiout, "stack");
+ ui_out_tuple_begin (uiout, "stack");
/* Now let;s print the frames up to frame_high, or until there are
frames in the stack. */
0 /* args */ );
}
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
if (i < frame_high)
error ("mi_cmd_stack_list_frames: Not enough frames in stack.");
if (fi == NULL)
error ("mi_cmd_stack_list_args: Not enough frames in stack.");
- ui_out_list_begin (uiout, "stack-args");
+ ui_out_tuple_begin (uiout, "stack-args");
/* Now let's print the frames up to frame_high, or until there are
frames in the stack. */
i++, fi = get_prev_frame (fi))
{
QUIT;
- ui_out_list_begin (uiout, "frame");
+ ui_out_tuple_begin (uiout, "frame");
ui_out_field_int (uiout, "level", i);
list_args_or_locals (0, atoi (argv[0]), fi);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
}
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
if (i < frame_high)
error ("mi_cmd_stack_list_args: Not enough frames in stack.");
block = get_frame_block (fi);
- ui_out_list_begin (uiout, locals ? "locals" : "args");
+ ui_out_tuple_begin (uiout, locals ? "locals" : "args");
while (block != 0)
{
if (print_me)
{
if (values)
- ui_out_list_begin (uiout, NULL);
+ ui_out_tuple_begin (uiout, NULL);
ui_out_field_string (uiout, "name", SYMBOL_NAME (sym));
if (values)
sym2 = sym;
print_variable_value (sym2, fi, stb->stream);
ui_out_field_stream (uiout, "value", stb);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
}
}
}
else
block = BLOCK_SUPERBLOCK (block);
}
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
ui_out_stream_delete (stb);
}
if (numchild <= 0)
return MI_CMD_DONE;
- ui_out_list_begin (uiout, "children");
+ ui_out_tuple_begin (uiout, "children");
cc = childlist;
while (*cc != NULL)
{
- ui_out_list_begin (uiout, "child");
+ ui_out_tuple_begin (uiout, "child");
ui_out_field_string (uiout, "name", varobj_get_objname (*cc));
ui_out_field_string (uiout, "exp", varobj_get_expression (*cc));
ui_out_field_int (uiout, "numchild", varobj_get_num_children (*cc));
/* C++ pseudo-variables (public, private, protected) do not have a type */
if (type)
ui_out_field_string (uiout, "type", varobj_get_type (*cc));
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
cc++;
}
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
xfree (childlist);
return MI_CMD_DONE;
}
if ((*name == '*') && (*(name + 1) == '\0'))
{
nv = varobj_list (&rootlist);
- ui_out_list_begin (uiout, "changelist");
+ ui_out_tuple_begin (uiout, "changelist");
if (nv <= 0)
{
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
return MI_CMD_DONE;
}
cr = rootlist;
cr++;
}
xfree (rootlist);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
}
else
{
if (var == NULL)
error ("mi_cmd_var_update: Variable object not found");
- ui_out_list_begin (uiout, "changelist");
+ ui_out_tuple_begin (uiout, "changelist");
varobj_update_one (var);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
}
return MI_CMD_DONE;
}
numregs = NUM_REGS;
- ui_out_list_begin (uiout, "register-names");
+ ui_out_tuple_begin (uiout, "register-names");
if (argc == 0) /* No args, just do all the regs */
{
return MI_CMD_ERROR;
}
}
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
return MI_CMD_DONE;
}
numregs = NUM_REGS;
- ui_out_list_begin (uiout, "changed-registers");
+ ui_out_tuple_begin (uiout, "changed-registers");
if (argc == 0) /* No args, just do all the regs */
{
return MI_CMD_ERROR;
}
}
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
return MI_CMD_DONE;
}
return MI_CMD_ERROR;
}
- ui_out_list_begin (uiout, "register-values");
+ ui_out_tuple_begin (uiout, "register-values");
if (argc == 1) /* No args, beside the format: do all the regs */
{
if (REGISTER_NAME (regnum) == NULL
|| *(REGISTER_NAME (regnum)) == '\0')
continue;
- ui_out_list_begin (uiout, NULL);
+ ui_out_tuple_begin (uiout, NULL);
ui_out_field_int (uiout, "number", regnum);
result = get_register (regnum, format);
if (result == -1)
return MI_CMD_ERROR;
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
}
}
&& REGISTER_NAME (regnum) != NULL
&& *REGISTER_NAME (regnum) != '\000')
{
- ui_out_list_begin (uiout, NULL);
+ ui_out_tuple_begin (uiout, NULL);
ui_out_field_int (uiout, "number", regnum);
result = get_register (regnum, format);
if (result == -1)
return MI_CMD_ERROR;
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
}
else
{
return MI_CMD_ERROR;
}
}
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
return MI_CMD_DONE;
}
struct ui_stream *stream = ui_out_stream_new (uiout);
int row;
int row_byte;
- ui_out_list_begin (uiout, "memory");
+ ui_out_tuple_begin (uiout, "memory");
for (row = 0, row_byte = 0;
row < nr_rows;
row++, row_byte += nr_cols * word_size)
{
int col;
int col_byte;
- ui_out_list_begin (uiout, NULL);
+ ui_out_tuple_begin (uiout, NULL);
ui_out_field_core_addr (uiout, "addr", addr + row_byte);
/* ui_out_field_core_addr_symbolic (uiout, "saddr", addr + row_byte); */
- ui_out_list_begin (uiout, "data");
+ ui_out_tuple_begin (uiout, "data");
for (col = 0, col_byte = row_byte;
col < nr_cols;
col++, col_byte += word_size)
ui_out_field_stream (uiout, NULL, stream);
}
}
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
if (aschar)
{
int byte;
}
ui_out_field_stream (uiout, "ascii", stream);
}
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
}
ui_out_stream_delete (stream);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
}
do_cleanups (cleanups);
return MI_CMD_DONE;
if (last_async_command)
fputs_unfiltered (last_async_command, raw_stdout);
fputs_unfiltered ("+download", raw_stdout);
- ui_out_list_begin (uiout, NULL);
+ ui_out_tuple_begin (uiout, NULL);
ui_out_field_string (uiout, "section", section_name);
ui_out_field_int (uiout, "section-size", total_section);
ui_out_field_int (uiout, "total-size", grand_total);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
mi_out_put (uiout, raw_stdout);
fputs_unfiltered ("\n", raw_stdout);
gdb_flush (raw_stdout);
if (last_async_command)
fputs_unfiltered (last_async_command, raw_stdout);
fputs_unfiltered ("+download", raw_stdout);
- ui_out_list_begin (uiout, NULL);
+ ui_out_tuple_begin (uiout, NULL);
ui_out_field_string (uiout, "section", section_name);
ui_out_field_int (uiout, "section-sent", sent_so_far);
ui_out_field_int (uiout, "section-size", total_section);
ui_out_field_int (uiout, "total-sent", total_sent);
ui_out_field_int (uiout, "total-size", grand_total);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
mi_out_put (uiout, raw_stdout);
fputs_unfiltered ("\n", raw_stdout);
gdb_flush (raw_stdout);
field_separator (uiout);
if (tblid)
fprintf_unfiltered (data->buffer, "%s=", tblid);
- mi_open (uiout, ui_out_type_tupple);
+ mi_open (uiout, ui_out_type_tuple);
data->first_header = 0;
data->supress_field_separator = 1;
}
struct ui_out_data *data = ui_out_data (uiout);
/* close the table header line if there were any headers */
if (data->first_header)
- mi_close (uiout, ui_out_type_tupple);
+ mi_close (uiout, ui_out_type_tuple);
}
/* Mark end of a table */
mi_table_end (struct ui_out *uiout)
{
struct ui_out_data *data = ui_out_data (uiout);
- mi_close (uiout, ui_out_type_tupple);
+ mi_close (uiout, ui_out_type_tuple);
/* If table was empty this flag did not get reset yet */
data->supress_field_separator = 0;
}
if (!data->first_header++)
{
fputs_unfiltered ("hdr=", data->buffer);
- mi_open (uiout, ui_out_type_tupple);
+ mi_open (uiout, ui_out_type_tuple);
}
mi_field_string (uiout, 0, width, alignment, 0, colhdr);
}
annotate_arg_begin ();
- ui_out_list_begin (uiout, NULL);
- list_chain = make_cleanup_ui_out_list_end (uiout);
+ list_chain = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
fprintf_symbol_filtered (stb->stream, SYMBOL_SOURCE_NAME (sym),
SYMBOL_LANGUAGE (sym), DMGL_PARAMS | DMGL_ANSI);
ui_out_field_stream (uiout, "name", stb);
else
ui_out_text (uiout, "???");
- /* Invoke ui_out_list_end. */
+ /* Invoke ui_out_tuple_end. */
do_cleanups (list_chain);
#else
val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), 0,
annotate_frame_begin (level == -1 ? 0 : level, fi->pc);
#ifdef UI_OUT
- ui_out_list_begin (uiout, "frame");
- list_chain = make_cleanup_ui_out_list_end (uiout);
+ list_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "frame");
#endif
if (level >= 0)
args.func = func;
args.stream = gdb_stdout;
#ifdef UI_OUT
- ui_out_list_begin (uiout, "args");
- args_list_chain = make_cleanup_ui_out_list_end (uiout);
+ args_list_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "args");
catch_errors (print_args_stub, &args, "", RETURN_MASK_ALL);
/* FIXME: args must be a list. If one argument is a string it will
have " that will not be properly escaped. */
- /* Invoke ui_out_list_end. */
+ /* Invoke ui_out_tuple_end. */
do_cleanups (args_list_chain);
#else
catch_errors (print_args_stub, &args, "", RETURN_MASK_ALL);
#endif /* PC_SOLIB */
#ifdef UI_OUT
- /* do_cleanups will call ui_out_list_end() for us. */
+ /* do_cleanups will call ui_out_tuple_end() for us. */
do_cleanups (list_chain);
ui_out_text (uiout, "\n");
do_cleanups (old_chain);
}
void
-ui_out_list_begin (struct ui_out *uiout,
- char *id)
+ui_out_list_begin (struct ui_out *uiout)
{
- ui_out_begin (uiout, ui_out_type_list, id);
+ ui_out_begin (uiout, ui_out_type_list, NULL);
+}
+
+void
+ui_out_tuple_begin (struct ui_out *uiout, const char *id)
+{
+ ui_out_begin (uiout, ui_out_type_tuple, id);
}
void
ui_out_end (uiout, ui_out_type_list);
}
+void
+ui_out_tuple_end (struct ui_out *uiout)
+{
+ ui_out_end (uiout, ui_out_type_tuple);
+}
+
struct ui_out_end_cleanup_data
{
struct ui_out *uiout;
}
struct cleanup *
-make_cleanup_ui_out_list_end (struct ui_out *uiout)
+make_cleanup_ui_out_tuple_begin_end (struct ui_out *uiout,
+ const char *id)
+{
+ ui_out_tuple_begin (uiout, id);
+ return make_cleanup_ui_out_end (uiout, ui_out_type_tuple);
+}
+
+struct cleanup *
+make_cleanup_ui_out_list_begin_end (struct ui_out *uiout)
{
return make_cleanup_ui_out_end (uiout, ui_out_type_list);
}
/* Prototypes for ui-out API. */
/* A result is a recursive data structure consisting of lists and
- tupples. */
+ tuples. */
enum ui_out_type
{
- ui_out_type_tupple,
+ ui_out_type_tuple,
ui_out_type_list
};
enum ui_out_type level_type,
const char *id);
-/* A table can be considered a special tupple/list combination with
+/* A table can be considered a special tuple/list combination with
the implied structure: ``table = { hdr = { header, ... } , body = [ {
field, ... }, ... ] }'' */
/* Compatibility wrappers, new code should use ui_out_begin() and
ui_out_end(). */
-extern void ui_out_list_begin (struct ui_out *uiout, char *lstid);
+extern void ui_out_list_begin (struct ui_out *uiout);
extern void ui_out_list_end (struct ui_out *uiout);
-extern struct cleanup *make_cleanup_ui_out_list_end (struct ui_out *uiout);
+extern struct cleanup *make_cleanup_ui_out_list_begin_end (struct ui_out *uiout);
+
+extern void ui_out_tuple_begin (struct ui_out *uiout, const char *id);
+
+extern void ui_out_tuple_end (struct ui_out *uiout);
+
+extern struct cleanup *make_cleanup_ui_out_tuple_begin_end (struct ui_out *uiout,
+ const char *id);
extern void ui_out_field_int (struct ui_out *uiout, char *fldname, int value);