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 | 4b9b395931f9b9ed5bff797fad1e128fe9da136b (patch) | |
tree | 5fc33561e02978b777ebd0105af0d555347d7831 /gdb/maint.c | |
parent | dee8b1a1c52bb43245e6b0ac2958ea6de4f6ba29 (diff) | |
download | gdb-4b9b395931f9b9ed5bff797fad1e128fe9da136b.zip gdb-4b9b395931f9b9ed5bff797fad1e128fe9da136b.tar.gz gdb-4b9b395931f9b9ed5bff797fad1e128fe9da136b.tar.bz2 |
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 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); |