aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Kolesov <Anton.Kolesov@synopsys.com>2017-02-10 14:12:01 +0300
committerAnton Kolesov <Anton.Kolesov@synopsys.com>2017-03-28 21:02:34 +0300
commit3be78afdeddd3ebf57eb0df8b029cf596f468c7a (patch)
tree54c56ab748a2dd06d2798e153cc8bba6bb9303d8 /gdb/arc-tdep.c
parentarc: Align internal regnums with architectural regnums (diff)
downloadbinutils-gdb-3be78afdeddd3ebf57eb0df8b029cf596f468c7a.tar.gz
binutils-gdb-3be78afdeddd3ebf57eb0df8b029cf596f468c7a.tar.bz2
binutils-gdb-3be78afdeddd3ebf57eb0df8b029cf596f468c7a.zip
arc: Add "maintenance print arc" command prefix
Add an "arc" sublist to "maintenance print" command list. The list is empty for now, its purpose is to contain commands that print internal state of some ARC-specific structures. gdb/ChangeLog: yyyy-mm-dd Anton Kolesov <anton.kolesov@synopsys.com> * arc-tdep (maintenance_print_arc_list): New variable. (maintenance_print_arc_command): New function.
Diffstat (limited to 'gdb/arc-tdep.c')
-rw-r--r--gdb/arc-tdep.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c
index f78e3a9fe30..f4fd71f2173 100644
--- a/gdb/arc-tdep.c
+++ b/gdb/arc-tdep.c
@@ -59,6 +59,10 @@ struct arc_frame_cache
int arc_debug;
+/* List of "maintenance print arc" commands. */
+
+static struct cmd_list_element *maintenance_print_arc_list = NULL;
+
/* XML target description features. */
static const char core_v2_feature_name[] = "org.gnu.gdb.arc.core.v2";
@@ -1308,6 +1312,14 @@ arc_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
fprintf_unfiltered (file, "arc_dump_tdep: jb_pc = %i\n", tdep->jb_pc);
}
+/* Wrapper for "maintenance print arc" list of commands. */
+
+static void
+maintenance_print_arc_command (char *args, int from_tty)
+{
+ cmd_show_list (maintenance_print_arc_list, from_tty, "");
+}
+
/* Suppress warning from -Wmissing-prototypes. */
extern initialize_file_ftype _initialize_arc_tdep;
@@ -1321,6 +1333,13 @@ _initialize_arc_tdep (void)
/* Register ARC-specific commands with gdb. */
+ /* Add root prefix command for "maintenance print arc" commands. */
+ add_prefix_cmd ("arc", class_maintenance, maintenance_print_arc_command,
+ _("ARC-specific maintenance commands for printing GDB "
+ "internal state."),
+ &maintenance_print_arc_list, "maintenance print arc ", 0,
+ &maintenanceprintlist);
+
/* Debug internals for ARC GDB. */
add_setshow_zinteger_cmd ("arc", class_maintenance,
&arc_debug,