diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-06-10 05:37:47 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-06-10 05:37:47 +0000 |
commit | ba807cb0f333532256ccd25bc3a6eecb8b0259c7 (patch) | |
tree | c8ca3255e32dfcc0920c8755f48c784bf0404315 /gdb/maint.c | |
parent | 8ceec764664897c4ac9b9b37a15b5d99255031ac (diff) | |
download | gdb-ba807cb0f333532256ccd25bc3a6eecb8b0259c7.tar.gz |
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.
Diffstat (limited to 'gdb/maint.c')
-rw-r--r-- | gdb/maint.c | 20 |
1 files changed, 20 insertions, 0 deletions
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); |