diff options
Diffstat (limited to 'gdb/mi/mi-cmd-info.c')
-rw-r--r-- | gdb/mi/mi-cmd-info.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/gdb/mi/mi-cmd-info.c b/gdb/mi/mi-cmd-info.c index fa0d16e..032d38a 100644 --- a/gdb/mi/mi-cmd-info.c +++ b/gdb/mi/mi-cmd-info.c @@ -30,10 +30,6 @@ mi_cmd_info_ada_exceptions (const char *command, char **argv, int argc) struct ui_out *uiout = current_uiout; struct gdbarch *gdbarch = get_current_arch (); char *regexp; - struct cleanup *old_chain; - VEC(ada_exc_info) *exceptions; - int ix; - struct ada_exc_info *info; switch (argc) { @@ -48,24 +44,21 @@ mi_cmd_info_ada_exceptions (const char *command, char **argv, int argc) break; } - exceptions = ada_exceptions_list (regexp); - old_chain = make_cleanup (VEC_cleanup (ada_exc_info), &exceptions); + std::vector<ada_exc_info> exceptions = ada_exceptions_list (regexp); ui_out_emit_table table_emitter (uiout, 2, - VEC_length (ada_exc_info, exceptions), + exceptions.size (), "ada-exceptions"); uiout->table_header (1, ui_left, "name", "Name"); uiout->table_header (1, ui_left, "address", "Address"); uiout->table_body (); - for (ix = 0; VEC_iterate(ada_exc_info, exceptions, ix, info); ix++) + for (const ada_exc_info &info : exceptions) { ui_out_emit_tuple tuple_emitter (uiout, NULL); - uiout->field_string ("name", info->name); - uiout->field_core_addr ("address", gdbarch, info->addr); + uiout->field_string ("name", info.name); + uiout->field_core_addr ("address", gdbarch, info.addr); } - - do_cleanups (old_chain); } /* Implement the "-info-gdb-mi-command" GDB/MI command. */ |