diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-11-13 19:06:26 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-11-13 19:06:26 +0000 |
commit | a8cf2722eab033c833d822db6892038f570303ad (patch) | |
tree | 6d6ca21a62084f585e61f02afcf618140ed50528 /gdb/remote-sim.c | |
parent | 475b6ddd329a54a32907a55cf4f2efc9013f5973 (diff) | |
download | gdb-a8cf2722eab033c833d822db6892038f570303ad.zip gdb-a8cf2722eab033c833d822db6892038f570303ad.tar.gz gdb-a8cf2722eab033c833d822db6892038f570303ad.tar.bz2 |
2003-11-13 Andrew Cagney <cagney@redhat.com>
* arch-utils.h (selected_architecture_name): Declare.
(selected_byte_order): Declare.
* arch-utils.c (selected_byte_order): New function.
(selected_architecture_name): New function.
(target_architecture_auto): Make static.
(set_architecture_string): Make static.
(target_byte_order): Make static.
(target_byte_order_auto): Make static.
* gdbarch.sh (TARGET_BYTE_ORDER, TARGET_ARCHITECTURE): Delete
non-multi-arch definition.
(TARGET_ARCHITECTURE_AUTO, TARGET_BYTE_ORDER_AUTO): Delete.
(target_byte_order, target_architecture): Delete declaration.
(target_byte_order_auto, target_architecture_auto): Ditto.
* gdbarch.h: Re-generate.
* remote-sim.c (gdbsim_open): Use "selected_architecture_name" and
"selected_byte_order".
Diffstat (limited to 'gdb/remote-sim.c')
-rw-r--r-- | gdb/remote-sim.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index 538f8a4..b1dc94e 100644 --- a/gdb/remote-sim.c +++ b/gdb/remote-sim.c @@ -42,6 +42,7 @@ #include "regcache.h" #include "gdb_assert.h" #include "sim-regno.h" +#include "arch-utils.h" /* Prototypes */ @@ -504,27 +505,23 @@ gdbsim_open (char *args, int from_tty) strcpy (arg_buf, "gdbsim"); /* 7 */ /* Specify the byte order for the target when it is both selectable and explicitly specified by the user (not auto detected). */ - if (!TARGET_BYTE_ORDER_AUTO) + switch (selected_byte_order ()) { - switch (TARGET_BYTE_ORDER) - { - case BFD_ENDIAN_BIG: - strcat (arg_buf, " -E big"); - break; - case BFD_ENDIAN_LITTLE: - strcat (arg_buf, " -E little"); - break; - default: - internal_error (__FILE__, __LINE__, - "Value of TARGET_BYTE_ORDER unknown"); - } + case BFD_ENDIAN_BIG: + strcat (arg_buf, " -E big"); + break; + case BFD_ENDIAN_LITTLE: + strcat (arg_buf, " -E little"); + break; + case BFD_ENDIAN_UNKNOWN: + break; } /* Specify the architecture of the target when it has been explicitly specified */ - if (!TARGET_ARCHITECTURE_AUTO) + if (selected_architecture_name () != NULL) { strcat (arg_buf, " --architecture="); - strcat (arg_buf, TARGET_ARCHITECTURE->printable_name); + strcat (arg_buf, selected_architecture_name ()); } /* finally, any explicit args */ if (args) |