Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@codesourcery.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Cut memory address width
Date: Wed, 27 Sep 2006 19:23:00 -0000	[thread overview]
Message-ID: <m3mz8lyuxg.fsf@codesourcery.com> (raw)
In-Reply-To: <20060927161501.GA23340@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Wed, 27 Sep 2006 18:15:01 +0200")


Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> `x/x $ebx' on gdb/amd64 debugging inferior/i386 causes Cannot access memory at
> address 0xffffce70 (or so) as $ebx is considered `int' and sign-extended to
> 64-bit while the resulting address 0xffffffffffffce70 fails to be accessed.
>
> $esp does not exhibit this problem as it is `builtin_type_void_data_ptr' not
> `builtin_type_int' as $ebx is.  Therefore it gets extended as unsigned.
>
> Simulate the part of paddress(); it is questionable how deep in the functions
> calling stack the address width cut should be.

Just as a sanity check: what does 'show architecture' say when you're
debugging an i386 inferior on gdb/amd64?

I'm guessing that x_command calls value_to_address, which passes the
value of $ebx to to gdbarch_integer_to_address, which is where the
conversion is happening.  Is there some code there assuming that host
== target?


      parent reply	other threads:[~2006-09-27 19:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-27 16:15 Jan Kratochvil
2006-09-27 18:20 ` Michael Snyder
2006-09-27 18:22   ` Daniel Jacobowitz
2006-09-27 18:37     ` Jan Kratochvil
2006-09-27 18:55       ` Daniel Jacobowitz
2006-09-27 20:19         ` Jim Blandy
2006-09-27 19:01 ` Mark Kettenis
2006-09-28 17:27   ` Jan Kratochvil
2006-10-05 22:26     ` Daniel Jacobowitz
2006-09-27 19:23 ` Jim Blandy [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=m3mz8lyuxg.fsf@codesourcery.com \
    --to=jimb@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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