From: Daniel Jacobowitz <drow@mvista.com>
To: Klee Dienes <klee@apple.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Use read_memory_unsigned_integer when reading to CORE_ADDR
Date: Sat, 05 Oct 2002 19:56:00 -0000 [thread overview]
Message-ID: <20021006025716.GA27734@nevyn.them.org> (raw)
In-Reply-To: <1BE45412-D8D6-11D6-9DA9-00039396EEB8@apple.com>
On Sat, Oct 05, 2002 at 10:48:35PM -0400, Klee Dienes wrote:
> The following patch converts several instances of read_memory_integer
> to read_memory_unsigned_integer.
> In all cases except one, the value is being read into a CORE_ADDR,
> which will cause sign-extension lossage if read_memory_integer is used
> with a 64-bit bfd (the final case is reading into an unsigned int, but
> I believe the change is still correct).
>
> 2002-10-05 Klee Dienes <kdienes@apple.com>
>
> * blockframe.c (sigtramp_saved_pc): Use
> read_memory_unsigned_integer to read a value destined for a
> CORE_ADDR, not read_memory_integer.
> * f-valprint.c (f77_get_dynamic_upperbound): Ditto.
> (f77_get_dynamic_lowerbound): Ditto.
> * symfile.c (simple_read_overlay_region_table): Ditto (this
> function is reading to an unsigned int, not a CORE_ADDR, and is
> commented out, but I believe reading as unsigned is still
> correct).
Well, I'm a little concerned about this. MIPS generally wants the
result to be sign extended; the MIPS 32-bit ABIs map onto the lowest
and highest 2G segments of the 64-bit address space, not the low 4G
segment. Isn't there an appropriate function somewhere to read a CORE_ADDR?
Answer: Yes, there is, but it has the same problem. You're just
extending current practice, so I don't see a problem with your patch.
Andrew, is my understanding right? Is there some reason this isn't a
problem?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-10-06 2:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-05 19:48 Klee Dienes
2002-10-05 19:56 ` Daniel Jacobowitz [this message]
2002-10-05 23:52 ` Klee Dienes
2002-10-06 8:09 ` Daniel Jacobowitz
2002-10-06 9:41 ` Klee Dienes
2002-10-06 9:51 ` Daniel Jacobowitz
2002-10-07 14:19 ` Jim Blandy
2002-10-21 12:08 ` Andrew Cagney
2002-11-04 19:45 ` Klee Dienes
2002-11-06 14:37 ` Andrew Cagney
2002-10-21 12:08 ` Andrew Cagney
2002-10-07 14:14 ` Jim Blandy
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=20021006025716.GA27734@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=klee@apple.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