From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18996 invoked by alias); 19 Nov 2007 16:35:20 -0000 Received: (qmail 18985 invoked by uid 22791); 19 Nov 2007 16:35:19 -0000 X-Spam-Check-By: sourceware.org Received: from ics.u-strasbg.fr (HELO ics.u-strasbg.fr) (130.79.112.250) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 19 Nov 2007 16:32:25 +0000 Received: from ICSMULLER (laocoon.u-strasbg.fr [130.79.112.72]) by ics.u-strasbg.fr (Postfix) with ESMTP id 0F52C18701A; Mon, 19 Nov 2007 17:36:54 +0100 (CET) From: "Pierre Muller" To: "'Ulrich Weigand'" Cc: References: <003a01c82a95$07659290$1630b7b0$@u-strasbg.fr> from "Pierre Muller" at Nov 19, 2007 11:14:54 AM <200711191138.lAJBc20Z024695@d12av02.megacenter.de.ibm.com> In-Reply-To: <200711191138.lAJBc20Z024695@d12av02.megacenter.de.ibm.com> Subject: RE: [rfc] [0/9] Multi-target support Date: Mon, 19 Nov 2007 16:35:00 -0000 Message-ID: <001101c82ac9$c9ca71a0$5d5f54e0$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Content-Language: en-us Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00367.txt.bz2 Yes, I started in a new directory. mkdir build-all cd build-all ../src/configure --enable-targets=all make all-gdb I checked in bfd/bfd.h and BFD_ARCH_SIZE was set to 32 there. Adding --enable-64-bit-bfd I still needed to add WERROR_CFLAGS="" because I got warnings in win32-nat.c, which implicitly assumes that CORE_ADDR is 32 bit long. ../../src/gdb/win32-nat.c: In function `handle_output_debug_string': ../../src/gdb/win32-nat.c:884: warning: cast from pointer to integer of different size ../../src/gdb/win32-nat.c: In function `handle_exception': ../../src/gdb/win32-nat.c:1091: warning: cast from pointer to integer of different size ../../src/gdb/win32-nat.c: In function `win32_xfer_memory': ../../src/gdb/win32-nat.c:2068: warning: cast to pointer from integer of different size ../../src/gdb/win32-nat.c:2071: warning: cast to pointer from integer of different size ../../src/gdb/win32-nat.c:2077: warning: cast to pointer from integer of different size In win32_xfer_memory, the parameter memaddr of type CORE_ADDR is typecasted to LPVOID as parameter of the windows API function WriteProcessMemory, the fact that this only emits a warning probably means that it does the right thing, (that is, to truncate CORE_ADDR to a 32 bit value, which is it anyhow). Nevertheless, without the WERROR_CFLAGS="", the build fails. Should all nat files be able to handle the case where sizeof(CORE_ADDR) is strictly greater then sizeof( void *) and do explicit conversion for that? I also got a problem with the m2-exp.y yacc file conflicts: 15 shift/reduce, 15 reduce/reduce conflicts: 5 shift/reduce conflicts: 34 shift/reduce /home/Pierre/gdbcvs/build-all/gdb/../../src/gdb/m2-exp.y:354.25-44: warning: rule never reduced because of conflicts: @2: /* empty */ But after checking, this warning is also present for a simple build without option. Pierre > -----Original Message----- > From: Ulrich Weigand [mailto:uweigand@de.ibm.com] > Sent: Monday, November 19, 2007 12:38 PM > To: Pierre Muller > Cc: gdb-patches@sourceware.org > Subject: Re: [rfc] [0/9] Multi-target support > > Pierre Muller wrote: > > > Is the CORE_ADDR size changed according to the target of the > current tdep > > file? > > CORE_ADDR is defined as bfd_vma, and the latter is supposed to be > chosen > according to the selected targets (see the generated bfd/bfd.h file): > > /* The word size used by BFD on the host. This may be 64 with a 32 > bit target if the host is 64 bit, or if other 64 bit targets have > been selected with --enable-targets, or if --enable-64-bit-bfd. */ > #define BFD_ARCH_SIZE 64 > > Not sure why this didn't work for you ... Did you start from a clean > build directory? Could you try whether at least explicitly specifying > --enable-64-bit-bfd works? > > Bye, > Ulrich > > -- > Dr. Ulrich Weigand > GNU Toolchain for Linux on System z and Cell BE > Ulrich.Weigand@de.ibm.com