From ba807cb0f333532256ccd25bc3a6eecb8b0259c7 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sat, 10 Jun 2000 05:37:47 +0000 Subject: Re-implement gdbach_dump() so that it prints out the macro values. Add ``maint print arch'' command. Add ``gdbarch_register()'' function that also takes gdbarch_dump_tdep(). Use in mips-tdep.c. --- gdb/maint.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'gdb/maint.c') diff --git a/gdb/maint.c b/gdb/maint.c index a4def305b5b..44dcba8e18e 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); -- cgit v1.2.1