From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8584 invoked by alias); 23 Mar 2004 20:48:34 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 8571 invoked from network); 23 Mar 2004 20:48:32 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 23 Mar 2004 20:48:32 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1B5sp5-000847-Sm; Tue, 23 Mar 2004 15:48:31 -0500 Date: Tue, 23 Mar 2004 22:42:00 -0000 From: Daniel Jacobowitz To: Brian Ford Cc: gdb@sources.redhat.com Subject: Re: Are mixed debug formats in one exe supported? Message-ID: <20040323204831.GA30982@nevyn.them.org> Mail-Followup-To: Brian Ford , gdb@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2004-03/txt/msg00216.txt.bz2 On Tue, Mar 23, 2004 at 02:41:01PM -0600, Brian Ford wrote: > I am trying to add DWARF2 support to PE/COFF for Cygwin/Mingw. They > currently use stabs. > > While testing, executables end up having mixed stabs/DWARF2 debugging > info if any system/gcc/previously compiled static libs are linked in. > The result causes gdb to SEGV while traversing the partial symbol tables > looking for symbol main. > > The problem is that init_psymbol_list is called for the executable twice > due to mainline being set at dbxread.c:562, and again at > dwarf2read.c:1076. > > So, the question. Is this meant to work? I assume the reason mainline is > used here is: > > /* If we are reinitializing, or if we have never loaded syms yet, init */ > > Why does reinitializing not clean up after itself (ie. reset the > [global|static]_psymbols.size to 0)? Is that a leak? > > I'm going to keep digging, but since I have zero knowledge of gdb > internals, I thought I'd ask and save some time. Thanks. I can't answer any of the more detailed questions, but yes, this is supposed to work. It's easy to produce binaries with both stabs and DWARF-2 on GNU/Linux, and it generally works OK. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer