Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Nathan Froyd <froydnj@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] fix py-inferior.exp for remote cross-endian testing
Date: Fri, 29 Oct 2010 19:49:00 -0000	[thread overview]
Message-ID: <AANLkTi=5wwYUF0zuvftWwr=vd3sXSuvivz7mURdNc38n@mail.gmail.com> (raw)
In-Reply-To: <1288380039-21997-1-git-send-email-froydnj@codesourcery.com>

On Fri, Oct 29, 2010 at 7:20 PM, Nathan Froyd <froydnj@codesourcery.com> wrote:
> The patch below fixes a problem seen when doing remote testing on a
> target that has a different endianness from the host.  Python's pack
> function will pack according to host endianness, but the search_memory
> function searches according to target endianness.  Searching for a value
> from the former with the latter, then, does not work correctly.
>
> The solution taken is to discover the target endianness early on using
> 'show endian' (the Python interface ought to have a method for this...)
> and then use that knowledge to explicitly indicate what endianness
> Python's pack function should use for multi-byte values.  Strictly
> speaking, the change in the final hunk is unnecessary (endianness will
> always match in native testing), but is done for completeness.
>
> Tested with cross to powerpc-linux-gnu from i686-pc-linux-gnu.  OK to
> commit?
>
> -Nathan
>
>        * gdb.python/py-inferior.exp: Pack values in target endianness.

Hi.  This patch is ok with me.

[btw, one could get the value of endianness from python with
gdb.parameter("endian").
Or at least should.  On my machine it returns "".
We probably want to fix that.  Your patch is fine with me as is though.]


  reply	other threads:[~2010-10-29 19:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-29 19:20 Nathan Froyd
2010-10-29 19:49 ` Doug Evans [this message]
2010-10-29 20:16   ` Daniel Jacobowitz
2010-11-01 20:13     ` Tom Tromey
2010-11-03 17:24       ` Doug Evans

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='AANLkTi=5wwYUF0zuvftWwr=vd3sXSuvivz7mURdNc38n@mail.gmail.com' \
    --to=dje@google.com \
    --cc=froydnj@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /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