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: Wed, 17 Feb 2010 18:50:00 -0000 [thread overview]
Message-ID: <m3sk8zg0hp.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20100217113400.GA19312@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Wed, 17 Feb 2010 12:34:00 +0100")
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Tom> It seems like you could just call the struct CORE_ADDR.
Jan> I thought it would be good to have different type for _address_ vs. for
Jan> _displacement_. With this difference some math operations are no longer
Jan> valid and I have discovered for example:
Ok, I see. But in that case wouldn't you still need (or want) to make
CORE_ADDR non-scalar, to avoid hidden errors?
Jan> displacement used as address: invalid but used in
Jan> read_type_unit_scope; it should get some cleanup (not investigated
Jan> more).
Yeah. There's a comment:
/* start_symtab needs a low pc, but we don't really have one.
Do what read_file_scope would do in the absence of such info. */
lowpc = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
Tom> Maybe I am being fuzzy today, but I don't follow the logic of this
Tom> statement. Is this just because we don't expect "too much" overflow?
Tom> Is it impossible for overflow to accumulate in a CORE_ADDR?
Jan> In general "displacement + displacement" operation is invalid and thus it
Jan> cannot overflow.
Thanks.
Tom
next prev parent reply other threads:[~2010-02-17 18:50 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
2010-02-17 11:34 ` Jan Kratochvil
2010-02-17 18:50 ` Tom Tromey [this message]
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=m3sk8zg0hp.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