diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-03-22 23:10:39 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-03-22 23:10:39 +0000 |
commit | 11409fac6b95d71a92848a4499b02d60a4f4c5bb (patch) | |
tree | 0a47f86483d7adc3d01dc4add49563e207bd3ba6 /sim | |
parent | 24f5d24a2369d092830e7f276c70e2b226ba6473 (diff) | |
download | gdb-11409fac6b95d71a92848a4499b02d60a4f4c5bb.zip gdb-11409fac6b95d71a92848a4499b02d60a4f4c5bb.tar.gz gdb-11409fac6b95d71a92848a4499b02d60a4f4c5bb.tar.bz2 |
sim: always enable support for the --endian option
The gdb code always passes down -E <little|big> to the sim core when using
the sim target. But the sim core only recognizes this option when the sim
supports big endian systems. So for little endian simulators, any attempt
to use the sim target fails with:
(gdb) target sim
gdbsim: invalid option -- 'E'
unable to create simulator instance
Since always respecting the option doesn't cause any problems, do just
that. If someone tries to use an invalid endian, they'll get an error
anyways.
Diffstat (limited to 'sim')
-rw-r--r-- | sim/common/ChangeLog | 6 | ||||
-rw-r--r-- | sim/common/sim-options.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 32f4dc3..1b1bd3b 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,9 @@ +2010-03-22 Mike Frysinger <vapier@gentoo.org> + + * sim/common/sim-options.c (enum): Remove SIM_HAVE_BIENDIAN ifdef. + (standard_options): Likewise. + (standard_option_handler): Likewise. + 2010-03-16 Mike Frysinger <vapier@gentoo.org> * hw-ports.c (TRACE): Delete. diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c index 82a502e..3369ca2 100644 --- a/sim/common/sim-options.c +++ b/sim/common/sim-options.c @@ -100,9 +100,7 @@ typedef enum { OPTION_ENVIRONMENT, OPTION_ALIGNMENT, OPTION_VERBOSE, -#if defined (SIM_HAVE_BIENDIAN) OPTION_ENDIAN, -#endif OPTION_DEBUG, #ifdef SIM_HAVE_FLATMEM OPTION_MEM_SIZE, @@ -124,11 +122,9 @@ static const OPTION standard_options[] = 'v', NULL, "Verbose output", standard_option_handler }, -#if defined (SIM_HAVE_BIENDIAN) /* ??? && WITH_TARGET_BYTE_ORDER == 0 */ { {"endian", required_argument, NULL, OPTION_ENDIAN}, 'E', "big|little", "Set endianness", standard_option_handler }, -#endif #ifdef SIM_HAVE_ENVIRONMENT /* This option isn't supported unless all choices are supported in keeping @@ -226,7 +222,6 @@ standard_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt, STATE_VERBOSE_P (sd) = 1; break; -#ifdef SIM_HAVE_BIENDIAN case OPTION_ENDIAN: if (strcmp (arg, "big") == 0) { @@ -254,7 +249,6 @@ standard_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt, return SIM_RC_FAIL; } break; -#endif case OPTION_ENVIRONMENT: if (strcmp (arg, "user") == 0) |