From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18093 invoked by alias); 9 Nov 2011 07:51:32 -0000 Received: (qmail 18084 invoked by uid 22791); 9 Nov 2011 07:51:31 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 Nov 2011 07:51:17 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id C4CF1CB02CD; Wed, 9 Nov 2011 08:51:18 +0100 (CET) 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 ve2Fqne1ZBxT; Wed, 9 Nov 2011 08:51:09 +0100 (CET) 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 91A58CB027F; Wed, 9 Nov 2011 08:51:08 +0100 (CET) Subject: Re: Building on Darwin Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=iso-8859-1 From: Tristan Gingold In-Reply-To: Date: Wed, 09 Nov 2011 07:51:00 -0000 Cc: Marty McGowan , gdb@sourceware.org, Joel Brobecker Content-Transfer-Encoding: quoted-printable Message-Id: <0D2ED480-E928-4795-B905-049CAC3DEA05@adacore.com> References: <4E000397.6030601@alum.mit.edu> <20110621042025.GD26656@adacore.com> <32D0F62F-19CA-486F-99F6-9159D23C418F@adacore.com> To: kidoshisama 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: 2011-11/txt/msg00074.txt.bz2 On Nov 8, 2011, at 4:15 PM, kidoshisama wrote: > I am having the same problem on my MBP, running Snow Leopard. I am no > longer getting the part about not being able to attach, but the > messages 'warning: can't find section '.const' in OSO file ...' and > 'warning: can't find section '__DATA.__common' in OSO file...' are > still there, and any backtrace has no symbol info, i.e. '#0 > 0x00007fff8646d196 in ?? ()'. >=20 > If one looks in machoread.c, the failure seems to be in > macho_add_oso_symfile(); the code is looping through > oso->num_sections, and for each section it gets a name and then tries > to load a struct. Here is the code: >=20 >=20 > sectname =3D (char *)oso->symbols[i]->section->name; > sect =3D bfd_get_section_by_name (abfd, sectname); >=20 > if (sect =3D=3D NULL) > { > warning (_("can't find section '%s' in OSO file %s"), > sectname, oso->name); > continue; > } >=20 > The section name is successfully read, but bfd_get_section_by_name() > returns NULL, apparently. >=20 > So this is as much as I know - can anyone please help me understand > the failure paths for this call (bfd_get_section_by_name)? Is there a > compilation flag being missed, or is it perhaps an incompatibility > with the gcc shipped wit XCode and the gdb I am building? >=20 > Any and all help would be greatly appreciated. The mechanism to map OSO addresses in the executable is indeed not yet bull= et proof. We have also seen some issues, and in particular it is broken on= Lion. I plan to do a partial rewrite for Lion and I hope to fix some weakness. For such issues, the work-around (and big hammer) is to use dsymutil to gen= erate a dsym file. Tristan.