From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] bfd/: bfd_elf_bfd_from_remote_memory 32bit &= 0xffffffff
Date: Tue, 16 Feb 2010 23:24:00 -0000 [thread overview]
Message-ID: <m3ocjohii6.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20100211124302.GA8435__38068.0548646071$1265892205$gmane$org@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Thu, 11 Feb 2010 13:43:02 +0100")
Jan> +typedef struct
Jan> + {
Jan> + CORE_ADDR a;
Jan> + }
Jan> +addr_offset_t;
I like this idea. It is slightly less convenient, but also lets us
control the operations more tightly.
Math on an addr_offset_t would seem to depend on the current target (or
address space). This is a little gross ... but still it seems like a
decent step.
It seems like you could just call the struct CORE_ADDR.
I am curious to hear what others think of this.
Jan> But as I see now fixing few GDB places to always sign-extend the
Jan> displacement CORE_ADDR will permit using the current standard 64bit
Jan> math operators even for 32bit inferiors.
Maybe I am being fuzzy today, but I don't follow the logic of this
statement. Is this just because we don't expect "too much" overflow?
Is it impossible for overflow to accumulate in a CORE_ADDR?
Tom
next prev parent reply other threads:[~2010-02-16 23:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-11 11:57 Jan Kratochvil
2010-02-11 12:13 ` Andreas Schwab
2010-02-11 12:43 ` Jan Kratochvil
[not found] ` <20100211124302.GA8435__38068.0548646071$1265892205$gmane$org@host0.dyn.jankratochvil.net>
2010-02-16 23:24 ` Tom Tromey [this message]
2010-02-17 11:34 ` Jan Kratochvil
2010-02-17 18:50 ` Tom Tromey
2010-02-20 0:43 ` Jan Kratochvil
2010-02-11 12:51 ` Mark Kettenis
2010-02-11 13:30 ` [cancelled] " Jan Kratochvil
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=m3ocjohii6.fsf@fleche.redhat.com \
--to=tromey@redhat.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