summaryrefslogtreecommitdiff
path: root/gdb/maint.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2009-07-02 17:02:29 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2009-07-02 17:02:29 +0000
commit515bf956a2831e7e1798992f62328719ec945316 (patch)
tree79de09c23e52190db1f74404ab5f418e74dda02f /gdb/maint.c
parent5b86fd99d277d035b218d3f7e6df6a36cebe8624 (diff)
downloadgdb-515bf956a2831e7e1798992f62328719ec945316.tar.gz
* arch-utils.c (selected_byte_order): Return target_byte_order_user.
(show_endian): Use target_byte_order_user if specified; otherwise use get_current_arch () instead of current_gdbarch. (show_architecture): Use set_architecture_string if specified; otherwise use get_current_arch () instead of current_gdbarch. (get_current_arch): New function. * arch-utils.h (get_current_arch): Add prototype. * osabi.c (show_osabi): Use get_current_arch () instead of current_gdbarch. * findcmd.c: Include "arch-utils.h". (parse_find_args): Add BIG_P argument. Use it instead of byte order of current_gdbarch. (find_command): Use get_current_arch () instead of current_gdbarch. Pass byte order to parse_find_args. * maint.c: Include "arch-utils.h". (maintenance_print_architecture): Use get_current_arch () instead of current_gdbarch. * reggroups.c: Include "arch-utils.h". (maintenance_print_reggroups): Use get_current_arch () instead of current_gdbarch. * symfile.c: Include "arch-utils.h". (overlay_load_command): Use get_current_arch () instead of current_gdbarch. * value.c: Include "arch-utils.h". (show_convenience): Use get_current_arch () instead of current_gdbarch. * tui/tui-regs.c: Include "arch-utils.h". (tui_reg_next_command): Use get_current_arch () instead of current_gdbarch. * mi/mi-main.c: Include "arch-utils.h". (mi_cmd_data_read_memory): Use get_current_arch () instead of current_gdbarch. * parse.c: Include "arch-utils.h". (parse_exp_in_context): Use get_current_arch () instead of current_gdbarch.
Diffstat (limited to 'gdb/maint.c')
-rw-r--r--gdb/maint.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/maint.c b/gdb/maint.c
index 56cafe9ae3e..ae465ce638c 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -22,6 +22,7 @@
#include "defs.h"
+#include "arch-utils.h"
#include <ctype.h>
#include <signal.h>
#include "command.h"
@@ -411,8 +412,10 @@ maintenance_print_statistics (char *args, int from_tty)
static void
maintenance_print_architecture (char *args, int from_tty)
{
+ struct gdbarch *gdbarch = get_current_arch ();
+
if (args == NULL)
- gdbarch_dump (current_gdbarch, gdb_stdout);
+ gdbarch_dump (gdbarch, gdb_stdout);
else
{
struct cleanup *cleanups;
@@ -420,7 +423,7 @@ maintenance_print_architecture (char *args, int from_tty)
if (file == NULL)
perror_with_name (_("maintenance print architecture"));
cleanups = make_cleanup_ui_file_delete (file);
- gdbarch_dump (current_gdbarch, file);
+ gdbarch_dump (gdbarch, file);
do_cleanups (cleanups);
}
}