Use ui_out_emit_list
This changes some spots to use ui_out_emit_list. This only touches "easy" cases, where the cleanup was used in a block-structured way. There's also one more use of ui_out_emit_tuple in here. ChangeLog 2017-04-22 Tom Tromey <tom@tromey.com> * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use ui_out_emit_list. * stack.c (print_frame): Use ui_out_emit_list. * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use ui_out_emit_list. * mi/mi-main.c (print_one_inferior) (mi_cmd_data_list_register_names) (mi_cmd_data_list_register_values, mi_cmd_list_features) (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use ui_out_emit_list. * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list. (mi_output_solib_attribs): Use ui_out_emit_list, ui_out_emit_tuple. * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list. * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames) (mi_cmd_stack_list_args, list_args_or_locals): Use ui_out_emit_list. * disasm.c (do_assembly_only): Use ui_out_emit_list. * breakpoint.c (print_solib_event, output_thread_groups): Use ui_out_emit_list.
This commit is contained in:
parent
0092b74da6
commit
10f489e576
10 changed files with 57 additions and 96 deletions
27
gdb/stack.c
27
gdb/stack.c
|
@ -1196,7 +1196,6 @@ print_frame (struct frame_info *frame, int print_level,
|
|||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
int numargs;
|
||||
struct cleanup *args_list_chain;
|
||||
|
||||
if (gdbarch_frame_num_args_p (gdbarch))
|
||||
{
|
||||
|
@ -1206,20 +1205,20 @@ print_frame (struct frame_info *frame, int print_level,
|
|||
else
|
||||
numargs = -1;
|
||||
|
||||
args_list_chain = make_cleanup_ui_out_list_begin_end (uiout, "args");
|
||||
TRY
|
||||
{
|
||||
print_frame_args (func, frame, numargs, gdb_stdout);
|
||||
}
|
||||
CATCH (e, RETURN_MASK_ERROR)
|
||||
{
|
||||
}
|
||||
END_CATCH
|
||||
{
|
||||
ui_out_emit_list list_emitter (uiout, "args");
|
||||
TRY
|
||||
{
|
||||
print_frame_args (func, frame, numargs, gdb_stdout);
|
||||
}
|
||||
CATCH (e, RETURN_MASK_ERROR)
|
||||
{
|
||||
}
|
||||
END_CATCH
|
||||
|
||||
/* FIXME: ARGS must be a list. If one argument is a string it
|
||||
will have " that will not be properly escaped. */
|
||||
/* Invoke ui_out_tuple_end. */
|
||||
do_cleanups (args_list_chain);
|
||||
/* FIXME: ARGS must be a list. If one argument is a string it
|
||||
will have " that will not be properly escaped. */
|
||||
}
|
||||
QUIT;
|
||||
}
|
||||
uiout->text (")");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue