From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19872 invoked by alias); 10 Nov 2002 19:03:56 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 19864 invoked from network); 10 Nov 2002 19:03:55 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 10 Nov 2002 19:03:55 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18AzFT-0006YA-00; Sun, 10 Nov 2002 15:04:03 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18AxO6-000238-00; Sun, 10 Nov 2002 14:04:50 -0500 Date: Sun, 10 Nov 2002 11:03:00 -0000 From: Daniel Jacobowitz To: Elias Athanasopoulos Cc: Michael Snyder , gdb-patches@sources.redhat.com Subject: Re: [PATCH/RFC] faster language identification Message-ID: <20021110190450.GA7860@nevyn.them.org> Mail-Followup-To: Elias Athanasopoulos , Michael Snyder , gdb-patches@sources.redhat.com References: <20021107224622.D1136@neutrino.particles.org> <20021107193409.GA25879@nevyn.them.org> <20021107230321.F1136@neutrino.particles.org> <20021107194838.GA26711@nevyn.them.org> <20021107231840.G1136@neutrino.particles.org> <3DCAD353.E5C2A968@redhat.com> <20021110170125.A29343@neutrino.particles.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021110170125.A29343@neutrino.particles.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-11/txt/msg00291.txt.bz2 On Sun, Nov 10, 2002 at 05:01:25PM +0200, Elias Athanasopoulos wrote: > Hi Michael, > > On Thu, Nov 07, 2002 at 12:55:47PM -0800, Michael Snyder wrote: > > Elias Athanasopoulos wrote: > > > On Thu, Nov 07, 2002 at 02:48:38PM -0500, Daniel Jacobowitz wrote: > > > > No, the patch converts the psymtab to a symtab and uses the language in > > > > the symtab. That's what I want you NOT to do. psymtab_to_symtab is > > > > expensive! > > Perhaps the patch could be added to psymtab_to_symtab, > > so that it would not try to get the language until > > the symbols were going to be read anyway? > > Yes, that may work, although I don't know exactly where gdb *really* needs > to set the language. > > I was thinking of what Daniel proposed; a psymtab_language() function. But, > even in the DWARF case, consider this: > > % gcc -Wa,-gdwarf2 bar.s foo.c -o foo > > Now, the language should be set to 'asm'? This is what you'll get if you try > to parse the .debug_info section. Currently, gdb in the above case sets it > to 'c'. > > Also, there is the case that you enable DWARF in both as and gcc, but I think > this shouldn't be allowed by gcc. Well, it _should_ be asm. We don't have line number information for the .c source. IMHO. (Also IMHO, the user just shouldn't do that...) -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer