aboutsummaryrefslogtreecommitdiff
path: root/gdb/arch-utils.h
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2009-07-02 17:02:35 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2009-07-02 17:02:35 +0000
commite17c207e88cbd63e9dc9dce1f3458a8ced4ff566 (patch)
tree6e430d068a5c19b425cf75b9c809b445a0e25bd0 /gdb/arch-utils.h
parent50810684816502312a09d6713844c7a63ffd97cc (diff)
downloadbinutils-e17c207e88cbd63e9dc9dce1f3458a8ced4ff566.zip
binutils-e17c207e88cbd63e9dc9dce1f3458a8ced4ff566.tar.gz
binutils-e17c207e88cbd63e9dc9dce1f3458a8ced4ff566.tar.bz2
* 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/arch-utils.h')
-rw-r--r--gdb/arch-utils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index c4e0980..555ff59 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -139,4 +139,12 @@ extern void gdbarch_info_fill (struct gdbarch_info *info);
extern struct gdbarch *gdbarch_from_bfd (bfd *abfd);
+/* Return "current" architecture. If the target is running, this is the
+ architecture of the selected frame. Otherwise, the "current" architecture
+ defaults to the target architecture.
+
+ This function should normally be called solely by the command interpreter
+ routines to determine the architecture to execute a command in. */
+extern struct gdbarch *get_current_arch (void);
+
#endif