From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14761 invoked by alias); 6 Aug 2009 11:14:11 -0000 Received: (qmail 14750 invoked by uid 22791); 6 Aug 2009 11:14:10 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_65 X-Spam-Check-By: sourceware.org Received: from gmp-eb-inf-2.sun.com (HELO gmp-eb-inf-2.sun.com) (192.18.6.24) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 06 Aug 2009 11:14:05 +0000 Received: from fe-emea-09.sun.com (gmp-eb-lb-1-fe1.eu.sun.com [192.18.6.7] (may be forged)) by gmp-eb-inf-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id n76BE2NG029800 for ; Thu, 6 Aug 2009 11:14:02 GMT MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from conversion-daemon.fe-emea-09.sun.com by fe-emea-09.sun.com (Sun Java(tm) System Messaging Server 7u2-7.02 64bit (built Apr 16 2009)) id <0KNY00I00CAILF00@fe-emea-09.sun.com> for gdb@sourceware.org; Thu, 06 Aug 2009 12:13:53 +0100 (BST) Received: from [10.0.0.3] ([unknown] [91.113.88.245]) by fe-emea-09.sun.com (Sun Java(tm) System Messaging Server 7u2-7.02 64bit (built Apr 16 2009)) with ESMTPSA id <0KNY00ALVCJ42G40@fe-emea-09.sun.com>; Thu, 06 Aug 2009 12:13:53 +0100 (BST) Date: Thu, 06 Aug 2009 11:14:00 -0000 From: Christian Thalinger Subject: Re: status of Darwin support In-reply-to: <20090805044504.GJ4370@adacore.com> To: Joel Brobecker Cc: Thiago Jung Bauermann , gdb@sourceware.org, tromey@redhat.com, Tristan Gingold Message-id: <4A7ABAF0.7010004@Sun.COM> References: <4A5F8D9E.1060307@Sun.COM> <200908041804.30240.thiago.bauermann@gmail.com> <20090805044504.GJ4370@adacore.com> User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-08/txt/msg00042.txt.bz2 Joel Brobecker wrote: >> Joel would probably know. My best guess is that even if Darwin support >> is much better now, the MI incompatibilities would mean that you >> wouldn't be able to drop FSF's GDB in place of Apple's for Xcode. > > Actually, I won't know that much more. Tristan is the one who looks > after that port. As far as I know, we're using it internally, to > debug GNAT for instance, and it seems to be working well. Thiago > is right about the bunch of local additions that Apple made to GDB, > though. Hmm, I have problems with shared libraries. One thing is that the shared library is only found when it's in the current directory, otherwise: (gdb) r Starting program: /Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/gamma dyld: Library not loaded: libjvm.dylib Referenced from: /Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/gamma Reason: image not found Even if the path to the library is in DYLD_LIBRARY_PATH. The other problem is that debugging symbols for shared libraries are not loaded. I can set a breakpoint in the main executable and debug it: (gdb) c Continuing. Breakpoint 2, CreateExecutionEnvironment (_argcp=0xbffff630, _argvp=0xbffff634, jrepath=0xbffff194 "", so_jrepath=1024, jvmpath=0xbfffed94 "", so_jvmpath=1024, original_argv=0x1005c0) at /Users/twisti/bsd-port/hotspot/src/os/bsd/launcher/java_md.c:238 238 char *execname = NULL; (gdb) bt #0 CreateExecutionEnvironment (_argcp=0xbffff630, _argvp=0xbffff634, jrepath=0xbffff194 "", so_jrepath=1024, jvmpath=0xbfffed94 "", so_jvmpath=1024, original_argv=0x1005c0) at /Users/twisti/bsd-port/hotspot/src/os/bsd/launcher/java_md.c:238 #1 0x00001ce6 in main (argc=2, argv=0xbffff654) at /Users/twisti/bsd-port/hotspot/src/os/bsd/launcher/java.c:250 But an assert in the shared library gives: Current thread is 2954858496 Dumping core ... [New Thread 0x1f03 of process 71094] [New Thread 0x2003 of process 71094] [New Thread 0x2103 of process 71094] [New Thread 0x2203 of process 71094] [New Thread 0x2303 of process 71094] [New Thread 0x2403 of process 71094] Program received signal SIGABRT, Aborted. 0x95bd046e in ?? () (gdb) info threads 7 Thread 0x2403 of process 71094 0x95bd046e in ?? () 6 Thread 0x2303 of process 71094 0x95ca5136 in ?? () 5 Thread 0x2203 of process 71094 0x95bc92c2 in ?? () 4 Thread 0x2103 of process 71094 0x95bd046e in ?? () 3 Thread 0x2003 of process 71094 0x95bd046e in ?? () 2 Thread 0x1f03 of process 71094 0x95bd046e in ?? () * 1 Thread 0x1d03 of process 71094 0x95bd046e in ?? () (gdb) bt #0 0x95bd046e in ?? () #1 0x95bfb3e6 in ?? () #2 0x00001803 in ?? () #3 0x00001903 in ?? () #4 0x00000000 in ?? () And yes, it has debugging symbols. Anything I can do to change that? -- Christian