This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Can't build ppc32 GDB
> From: PAUL GILLIAM <pgilliam@us.ibm.com>
> Date: Fri, 05 May 2006 13:20:12 -0700
>
> On Fri, 2006-05-05 at 21:54 +0200, Mark Kettenis wrote:
> > > From: PAUL GILLIAM <pgilliam@us.ibm.com>
> > > Date: Fri, 05 May 2006 11:32:18 -0700
> > >
> > > OK, How about this? I tried to make everyone happy :-)
> > >
> > > Here is an excerpt:
> > >
> > > #ifdef HAVE_STDINT_H
> > > #include <stdint.h>
> > > #define CORE_ADDR_CAST (uintptr_t)
> > > #else
> > > #define CORE_ADDR_CAST (CORE_ADDR)(unsigned long)
> > > #endif
> > > . . .
> > > last_stopped_data_address = CORE_ADDR_CAST siginfo.si_addr;
> > >
> > > Then when there is a gdb_stdint.h, I'll submit another patch to include
> > > it and replace CORE_ADDR_CAST with just (uintptr_t).
> > >
> > > Ok to commit?
> >
> > Sorry Paul, this is silly. Just include <stdint.h> and use uintptr_t
> > unconditionally. Or use unsigned long (the extra CORE_ADDR cast isn't
> > necessary) if you're really scared that someone will try to compile
> > GDB on a system with glibc 2.0.x.
>
> Alright, I admit it is a little silly. I thought it would fit right in
> with a lot of what I see on this mailing list :-)
>
> Anyway, I changed it as you suggested: OK to commit?
Could you do me a favour, and replace:
*(long *) & buf[bytes_transferred]
with
*(long *) &buf[bytes_transferred]
?
That extra space has been there ever since the code was reindented
using indent(1), but really shouldn't be there. It makes me think
it's a bitwise and instead of address off operator.
Otherwise, yes, ok with that change.
Mark