From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8322 invoked by alias); 7 Jul 2003 18:35:17 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 8315 invoked from network); 7 Jul 2003 18:35:16 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 7 Jul 2003 18:35:16 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h67IZGH08366 for ; Mon, 7 Jul 2003 14:35:16 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h67IZGI21238 for ; Mon, 7 Jul 2003 14:35:16 -0400 Received: from localhost.redhat.com (romulus-int.sfbay.redhat.com [172.16.27.46]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h67IZEl04135; Mon, 7 Jul 2003 14:35:14 -0400 Received: by localhost.redhat.com (Postfix, from userid 469) id 79DFE2CAB9; Mon, 7 Jul 2003 14:42:12 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16137.48900.330777.468485@localhost.redhat.com> Date: Mon, 07 Jul 2003 18:35:00 -0000 To: Mark Kettenis Cc: Elena Zannoni , gdb-patches@sources.redhat.com Subject: Re: [PATCH/RFC] gag some compiler warnings In-Reply-To: <86el17wd2k.fsf@elgar.kettenis.dyndns.org> References: <16132.24210.943200.572653@localhost.redhat.com> <86el17wd2k.fsf@elgar.kettenis.dyndns.org> X-SW-Source: 2003-07/txt/msg00138.txt.bz2 Mark Kettenis writes: > Elena Zannoni writes: > > > I am seeing these on a 64 bit system, when building gdb in 32-bit mode: > > > > /home/cygnus/ezannoni/gdb-6/src/gdb/infptrace.c: In function `child_xfer_memory': > > /home/cygnus/ezannoni/gdb-6/src/gdb/infptrace.c:570: warning: cast to pointer from integer of different size > > > > The problem is that we pass a CORE_ADDR (which is 8 bytes long) to > > ptrace and we cast it to PTRACE_ARG3_TYPE (which is 4 bytes long). > > > > Is this ok? Not too pretty, I know. > > * infptrace.c (child_xfer_memory): Cast ptrace argument to long, > > for cases in which CORE_ADDR size and pointer size don't agree. > > Hmm. I don't think this is OK. This could easily hide genuine > problems. What system is this? Or perhaps a better question: what is > the prototype of ptrace() in 32-bit mode on this system, and what is > your definition of PTRACE_ARG3_TYPE on this system? > > Mark This is a ppc64 system. But I think I have some local screw ups in the way the machine is set up. PTRACE_ARG3_TYPE is void * (4 bytes) from config/powerpc/nm-ppc64-linux.h while CORE_ADDR is 8 bytes. Ignore this patch until I figure out what is really going on. elena