aboutsummaryrefslogtreecommitdiff
path: root/sim/common/nrun.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2005-01-28 03:28:40 +0000
committerHans-Peter Nilsson <hp@axis.com>2005-01-28 03:28:40 +0000
commitf4f8cce440a38bf606aab597fd9ccb324f0fee87 (patch)
tree02023500e5418a27be53203106a172eb9ba73b13 /sim/common/nrun.c
parent99b2a78e3434fc29300cb219ba382466d4cf6714 (diff)
downloadgdb-f4f8cce440a38bf606aab597fd9ccb324f0fee87.zip
gdb-f4f8cce440a38bf606aab597fd9ccb324f0fee87.tar.gz
gdb-f4f8cce440a38bf606aab597fd9ccb324f0fee87.tar.bz2
* callback.c (default_callback): Initialize target_endian.
(cb_store_target_endian): Renamed from store, new first parameter host_callback *cb, drop last parameter big_p. Take endianness from cb. (cb_host_to_target_stat): Change to use cb_store_target_endian. Remove variable big_p. * nrun.c (main): Initialize default_callback.target_endian.
Diffstat (limited to 'sim/common/nrun.c')
-rw-r--r--sim/common/nrun.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sim/common/nrun.c b/sim/common/nrun.c
index d0c43e6..ed1d1ea 100644
--- a/sim/common/nrun.c
+++ b/sim/common/nrun.c
@@ -82,6 +82,12 @@ main (int argc, char **argv)
abort ();
}
+ /* We can't set the endianness in the callback structure until
+ sim_config is called, which happens in sim_open. */
+ default_callback.target_endian
+ = (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN
+ ? BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE);
+
/* Was there a program to run? */
prog_argv = STATE_PROG_ARGV (sd);
prog_bfd = STATE_PROG_BFD (sd);