From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: drow@false.org
Cc: pgilliam@us.ibm.com, gdb-patches@sources.redhat.com
Subject: Re: [patch] Can't build ppc32 GDB
Date: Fri, 05 May 2006 16:50:00 -0000 [thread overview]
Message-ID: <200605051649.k45GnKob023219@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <20060505162955.GB31029@nevyn.them.org> (message from Daniel Jacobowitz on Fri, 5 May 2006 12:29:55 -0400)
> Date: Fri, 5 May 2006 12:29:55 -0400
> From: Daniel Jacobowitz <drow@false.org>
>
> On Thu, May 04, 2006 at 09:12:14AM +0200, Mark Kettenis wrote:
> > This is where the new ISO C99 <stdint.h> types come in handy. Instead of
> > casting to CORE_ADDR, try casting to uintptr_t.
>
> Can we rely on <stdint.h> on GNU/Linux? I know we can't in general.
> Conveniently, I have a patch on one of my pending branches that
> provides a gdb_stdint.h.
Having a gdb_stdint.h would be cool ;-).
> But for this case there's an easier solution, which IIRC is roughly
> what Paul did: I can pretty much promise you that sizeof (long) ==
> sizeof (void *) on any GNU/Linux system. So either I can merge
> gdb_stdint.h and we can start using that, which might be a nice idea in
> general, or for now I think "long" is fine.
Well, we already use uintptr_t in linux-thread-db.c, and
gdb_thread_db.h errors out if it isn't available (and has been doing
so for ages). So we can be pretty sure that nobody is trying to
compile on systems with libc5 or really old glibc versions.
That said, it is probably safe to assume that all (powerpc) Linux
ports are either ILP32 or LP64, so casting to (unsigned long) should
be perfectly safe. It's just that I think that a uintptr_t cast
better expresses what's happening here. But either way is fine with
me.
Mark
next prev parent reply other threads:[~2006-05-05 16:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-25 0:18 PAUL GILLIAM
2006-04-25 0:22 ` PAUL GILLIAM
2006-04-25 19:38 ` Mark Kettenis
2006-05-03 23:32 ` PAUL GILLIAM
2006-05-04 7:12 ` Mark Kettenis
2006-05-05 16:30 ` Daniel Jacobowitz
2006-05-05 16:50 ` Mark Kettenis [this message]
2006-05-05 18:31 ` PAUL GILLIAM
2006-05-05 19:55 ` Mark Kettenis
2006-05-05 20:18 ` PAUL GILLIAM
2006-05-05 20:21 ` PAUL GILLIAM
2006-05-05 20:29 ` Mark Kettenis
2006-05-05 20:47 ` PAUL GILLIAM
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=200605051649.k45GnKob023219@elgar.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=pgilliam@us.ibm.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