This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] [4/7] Modernize AIX target: inf-ptrace build fix
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: mark dot kettenis at xs4all dot nl (Mark Kettenis)
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 25 Apr 2007 02:26:26 +0200 (CEST)
- Subject: Re: [rfc] [4/7] Modernize AIX target: inf-ptrace build fix
Mark Kettenis wrote:
> > Date: Tue, 24 Apr 2007 23:37:24 +0200 (CEST)
> > From: "Ulrich Weigand" <uweigand@de.ibm.com>
> >
> > Hello,
> >
> > this is another small build fix that is a pre-requisite for the
> > next patch (which adds inf-ptrace.c on AIX). The problem is that
> > on AIX, PTRACE_TYPE_ARG3 is a pointer, and trying to cast a
> > CORE_ADDR directly to it gives a compile warning.
> >
> > The patch adds an intermediate cast to "long" to fix this problem;
> > there is precedent for this method in inf_ptrace_xfer_partial.
>
> I don't like this, but I guess this is unavoidable, I think it's more
> correct to use uintptr_t instead of long though.
I don't particularly like it either ...
Can we assume every system where inf-ptrace.c is built has uintptr_t?
I notice the type isn't frequently used elsewhere in GDB today.
If we decide to use uintptr_t, I guess the existing uses of long in
inf_ptrace_xfer_partial should be changed as well.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com