From: Daniel Jacobowitz <drow@false.org>
To: Richard Stuckey <richard.stuckey@arc.com>
Cc: gdb@sourceware.org
Subject: Re: gdb 6.8 selected_byte_order function
Date: Wed, 24 Sep 2008 13:49:00 -0000 [thread overview]
Message-ID: <20080924134904.GA21715@caradoc.them.org> (raw)
In-Reply-To: <1222263394.3506.27.camel@sad-richards.arc.com>
On Wed, Sep 24, 2008 at 02:36:34PM +0100, Richard Stuckey wrote:
> I think that the question I should have asked is why, in function
> gdbsim_open in file remote-sim.c, the switch statement has been changed
> to call selected_byte_order instead of using TARGET_BYTE_ORDER (which is
> #defined to be gdbarch_byte_order (current_gdbarch)) as it did in the
> 6.6 code?
I think you can find a discussion of this on the list archives at
around the time it was made.
> I suppose this change was because in the 6.6 code there was the comment
>
> /* Specify the byte order for the target when it is both selectable
> and explicitly specified by the user (not auto detected). */
>
> and the code was not actually doing this: calling gdbarch_byte_order was
> using auto-detection in the case that the user had not specified the
> byte order.
That's exactly right. I believe the problem was that some simulators
do not support -E little and -E big. They were probably for targets
where switching endianness did not make sense; no need to specify it,
then.
> This change caused a difference in the behaviour of the ARC debugger
> when using the built-in simulator: the 6.6. version used a default of
> little-endian, whereas in the 6.8 version it is now necessary to issue a
> "set endian little" command before the "target sim" command, otherwise a
> "Target byte order unspecified" error is given. Alternatively, using
> the "file <program>" command before the "target sim" command, instead of
> after it, has the desired effect.
If it's the default you're concerned with, try searching for
WITH_DEFAULT_TARGET_BYTE_ORDER ?
--
Daniel Jacobowitz
CodeSourcery
prev parent reply other threads:[~2008-09-24 13:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-24 10:59 Richard Stuckey
2008-09-24 13:08 ` Daniel Jacobowitz
2008-09-24 13:37 ` Richard Stuckey
2008-09-24 13:49 ` Daniel Jacobowitz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080924134904.GA21715@caradoc.them.org \
--to=drow@false.org \
--cc=gdb@sourceware.org \
--cc=richard.stuckey@arc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox