aboutsummaryrefslogtreecommitdiff
path: root/gdb/maint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/maint.c')
-rw-r--r--gdb/maint.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/maint.c b/gdb/maint.c
index a4def30..44dcba8 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -283,6 +283,21 @@ maintenance_print_statistics (args, from_tty)
print_symbol_bcache_statistics ();
}
+void
+maintenance_print_architecture (char *args, int from_tty)
+{
+ if (args == NULL)
+ gdbarch_dump (current_gdbarch, gdb_stdout);
+ else
+ {
+ struct ui_file *file = gdb_fopen (args, "w");
+ if (file == NULL)
+ perror_with_name ("maintenance print architecture");
+ gdbarch_dump (current_gdbarch, file);
+ ui_file_delete (file);
+ }
+}
+
/* The "maintenance print" command is defined as a prefix, with
allow_unknown 0. Therefore, its own definition is called only for
"maintenance print" with no args. */
@@ -569,6 +584,11 @@ If a SOURCE file is specified, dump only that file's partial symbols.",
"Print statistics about internal gdb state.",
&maintenanceprintlist);
+ add_cmd ("architecture", class_maintenance, maintenance_print_architecture,
+ "Print the internal architecture configuration.\
+Takes an optional file parameter.",
+ &maintenanceprintlist);
+
add_cmd ("check-symtabs", class_maintenance, maintenance_check_symtabs,
"Check consistency of psymtabs and symtabs.",
&maintenancelist);