From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sourceware.org, Michael Snyder <msnyder@redhat.com>
Subject: Re: RFC: Correct "paddr_t" in gdb_proc_service.h
Date: Wed, 15 Mar 2006 22:34:00 -0000 [thread overview]
Message-ID: <20060315195025.GA21178@nevyn.them.org> (raw)
In-Reply-To: <44186EF1.8070603@redhat.com> <20060315163650.GA16226@nevyn.them.org>
On Wed, Mar 15, 2006 at 11:36:50AM -0500, Daniel Jacobowitz wrote:
> - ret = target_write_memory (addr, buf, len);
> + ret = target_write_memory ((unsigned long) addr, buf, len);
> else
> - ret = target_read_memory (addr, buf, len);
> + ret = target_read_memory ((unsigned long) addr, buf, len);
On Wed, Mar 15, 2006 at 11:45:53AM -0800, Michael Snyder wrote:
> Seems ok -- except the cast for target_read_memory
> should be (CORE_ADDR) addr, n'est ce pas?
Oh, I'm glad you asked :-) No, it shouldn't be, and yes, it should
raise a red flag. psaddr_t is defined to void * by glibc. That means
that if we cast it directly to a CORE_ADDR, we may get a warning about
it being the wrong size, from GCC.
Ugh, that means on MIPS for correctness we ought to be sign extending
it. I don't know the right way to do that. It didn't affect my
testing, because 32-bit user addresses have the high bit clear.
Um... I'll have to think about it some more :-(
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-03-15 19:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-15 17:01 Daniel Jacobowitz
2006-03-15 19:51 ` Michael Snyder
2006-03-15 22:34 ` Daniel Jacobowitz [this message]
2006-03-15 22:44 ` Mark Kettenis
2006-03-15 22:59 ` Daniel Jacobowitz
2006-03-15 23:40 ` Mark Kettenis
2006-03-16 0:21 ` Daniel Jacobowitz
2006-03-16 15:10 ` Michael Snyder
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=20060315195025.GA21178@nevyn.them.org \
--to=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=msnyder@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