From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29902 invoked by alias); 8 Nov 2011 15:15:46 -0000 Received: (qmail 29892 invoked by uid 22791); 8 Nov 2011 15:15:44 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-yw0-f41.google.com (HELO mail-yw0-f41.google.com) (209.85.213.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Nov 2011 15:15:31 +0000 Received: by ywa17 with SMTP id 17so776236ywa.0 for ; Tue, 08 Nov 2011 07:15:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.101.105.15 with SMTP id h15mr7008582anm.105.1320765330134; Tue, 08 Nov 2011 07:15:30 -0800 (PST) Received: by 10.100.133.1 with HTTP; Tue, 8 Nov 2011 07:15:30 -0800 (PST) In-Reply-To: <32D0F62F-19CA-486F-99F6-9159D23C418F@adacore.com> References: <4E000397.6030601@alum.mit.edu> <20110621042025.GD26656@adacore.com> <32D0F62F-19CA-486F-99F6-9159D23C418F@adacore.com> Date: Tue, 08 Nov 2011 15:15:00 -0000 Message-ID: Subject: Re: Building on Darwin From: kidoshisama To: Tristan Gingold Cc: Marty McGowan , gdb@sourceware.org, Joel Brobecker Content-Type: text/plain; charset=ISO-8859-1 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/msg00064.txt.bz2 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 ?? ()'. 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: sectname = (char *)oso->symbols[i]->section->name; sect = bfd_get_section_by_name (abfd, sectname); if (sect == NULL) { warning (_("can't find section '%s' in OSO file %s"), sectname, oso->name); continue; } The section name is successfully read, but bfd_get_section_by_name() returns NULL, apparently. 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? Any and all help would be greatly appreciated. Thanks, Keith