From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28953 invoked by alias); 10 Aug 2009 09:41:30 -0000 Received: (qmail 28943 invoked by uid 22791); 10 Aug 2009 09:41:29 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_65 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Aug 2009 09:41:23 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id E4A562900DB; Mon, 10 Aug 2009 11:41:20 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VltJcTURDHKD; Mon, 10 Aug 2009 11:41:20 +0200 (CEST) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 0523429007E; Mon, 10 Aug 2009 11:41:20 +0200 (CEST) Cc: Joel Brobecker , Thiago Jung Bauermann , gdb@sourceware.org, tromey@redhat.com Message-Id: From: Tristan Gingold To: Christian Thalinger In-Reply-To: <4A7ABAF0.7010004@Sun.COM> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: status of Darwin support Date: Mon, 10 Aug 2009 09:41:00 -0000 References: <4A5F8D9E.1060307@Sun.COM> <200908041804.30240.thiago.bauermann@gmail.com> <20090805044504.GJ4370@adacore.com> <4A7ABAF0.7010004@Sun.COM> 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/msg00054.txt.bz2 On Aug 6, 2009, at 1:13 PM, Christian Thalinger wrote: > 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. Unknown issue. Can you try to investigate by yourself (ie, check that your program can see DYLD_LIBRARY_PATH and is not setuid/setgid) ? You may also post a tiny reproducer and I will look at this when I have spare time. > 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: > > And yes, it has debugging symbols. Anything I can do to change that? I have just committed a patch that may fix this issue. Do not hesitate to report issues also gdb for Darwin is not yet feature full. Tristan.