From: Daniel Jacobowitz <drow@mvista.com>
To: J K <ellips@yahoo.com>
Cc: gdb@sources.redhat.com
Subject: Re: gdb print /x always big endian order?
Date: Thu, 05 Feb 2004 18:04:00 -0000 [thread overview]
Message-ID: <20040205180424.GA24460@nevyn.them.org> (raw)
In-Reply-To: <20040205180043.68640.qmail@web13509.mail.yahoo.com>
On Thu, Feb 05, 2004 at 10:00:42AM -0800, J K wrote:
>
> Hello,
>
> I've used a simple code to examine the storage
> of a short on a big and little endian machine.
>
> It seems in GNU gdb Red Hat Linux (5.1-1) when
> I do a print /x the order is Big Endian regardless
> of the host architecture. Just wondering if this
> is expected, I didn't see anything in the docs.
Yes, this is expected. Consider:
> short short_val = 31415;
What would C do if you said short_val = 0x7ab7?
> on Little Endian machine:
> Short bytes 0xb7 0x7a
Precisely the same thing :)
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2004-02-05 18:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-05 18:00 J K
2004-02-05 18:04 ` Daniel Jacobowitz [this message]
2004-02-06 1:03 ` Andreas Schwab
2004-02-06 1:14 ` Bill Gatliff
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=20040205180424.GA24460@nevyn.them.org \
--to=drow@mvista.com \
--cc=ellips@yahoo.com \
--cc=gdb@sources.redhat.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