diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2005-01-28 03:28:40 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2005-01-28 03:28:40 +0000 |
commit | f4f8cce440a38bf606aab597fd9ccb324f0fee87 (patch) | |
tree | 02023500e5418a27be53203106a172eb9ba73b13 /sim/common/nrun.c | |
parent | 99b2a78e3434fc29300cb219ba382466d4cf6714 (diff) | |
download | gdb-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.c | 6 |
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); |