From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14536 invoked by alias); 7 Nov 2005 22:50:56 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 14522 invoked by uid 22791); 7 Nov 2005 22:50:53 -0000 Received: from mail-out4.apple.com (HELO mail-out4.apple.com) (17.254.13.23) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 07 Nov 2005 22:50:53 +0000 Received: from relay5.apple.com (a17-128-113-35.apple.com [17.128.113.35]) by mail-out4.apple.com (8.12.11/8.12.11) with ESMTP id jA7MopZP005661; Mon, 7 Nov 2005 14:50:51 -0800 (PST) Received: from [17.201.22.240] (inghji.apple.com [17.201.22.240]) by relay5.apple.com (Apple SCV relay) with ESMTP id 608CF324013; Mon, 7 Nov 2005 14:50:51 -0800 (PST) In-Reply-To: <200511072245.jA7MjnIL005849@elgar.sibelius.xs4all.nl> References: <200511072245.jA7MjnIL005849@elgar.sibelius.xs4all.nl> Mime-Version: 1.0 (Apple Message framework v733) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <6324540E-2A63-412D-99AA-04E99054A2A9@apple.com> Cc: gdb@sourceware.org Content-Transfer-Encoding: 7bit From: Jim Ingham Subject: Re: [RFC] The never ending 32-bit vs. 64-bit blues Date: Mon, 07 Nov 2005 22:50:00 -0000 To: Mark Kettenis X-SW-Source: 2005-11/txt/msg00181.txt.bz2 Just as a point of information, Apple's PPC gdb (built 32 bit) can debug both 32 and 64 bit PPC apps. We have a 32 bit native gdb with a 32 bit and a 64 bit gdbarch. Seems to work okay so far. Jim On Nov 7, 2005, at 2:45 PM, Mark Kettenis wrote: > In the past we have had a lot of bug reports from people trying to > debug 64-bit programs with a native 32-bit gdb. As far as I know we > don't support any native configuration that allows this. I've never > quite managed to come up with a satisfactory solution to deal with > this. Here's an attempt to deal with it by making configure complain. > > Any opinions about this? > > Mark > > > Index: configure.ac > =================================================================== > RCS file: /cvs/src/src/gdb/configure.ac,v > retrieving revision 1.24 > diff -u -p -r1.24 configure.ac > --- configure.ac 25 Jul 2005 15:08:40 -0000 1.24 > +++ configure.ac 7 Nov 2005 22:34:19 -0000 > @@ -34,6 +34,19 @@ AM_PROG_CC_STDC > AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..) > AC_CANONICAL_SYSTEM > > +# Sanity check; refuse to build a native GDB for a 64-bit target with > +# a 32-bit compiler. > +AC_CHECK_SIZEOF(void *) > +if test "${target}" = "${host}"; then > + case "$host_cpu" in > + hppa64|mips64*|powerpc64|sparc64|x86_64) > + if test $ac_cv_sizeof_void_p != 8; then > + AC_MSG_ERROR( > +[building native target ${host} with a 32-bit compiler is not > supported]) > + fi > + esac > +fi > + > dnl List of object files and targets accumulated by configure. > > CONFIG_OBS= >