From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9505 invoked by alias); 30 Jul 2004 19:01:05 -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 9496 invoked from network); 30 Jul 2004 19:01:05 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by sourceware.org with SMTP; 30 Jul 2004 19:01:05 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id A909547D91; Fri, 30 Jul 2004 12:01:04 -0700 (PDT) Date: Fri, 30 Jul 2004 19:01:00 -0000 From: Joel Brobecker To: Jim Blandy Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA/dwarf2] Small problem scanning line table for included files Message-ID: <20040730190104.GU1167@gnat.com> References: <20040725151137.GT20596@gnat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-SW-Source: 2004-07/txt/msg00514.txt.bz2 Hello Jim, Thanks for your careful review. > This is getting a bit hairy. I can't agree more. I was just fixated on having an exact fix, as opposed to an approximate fix where we assume that the compiler is not going to do anything meaningless. > It would be simpler to simply delete the "!decode_for_pst_p && " > towards the top of dwarf2_decode_lines, and always create a psymtab > for the first file. This could conceivably result in creating > psymtabs for source files that have no line number entries in them, > but that's probably not going to be a big deal. > > (To be picky, we can make that mistake now anyway: consider what would > happen if the line number program contained two consecutive > DW_LNS_set_file instructions: the first file gets a psymtab, even > though it's never used.) > > To get everything exactly right, we would need to delay setting a file > table entry's included_p flag until just before we actually call > record_line. I think you are right. Looking for DW_LNS_set_file was a mistake, since it is not fullproof as you demonstrated above. I looked at the dwarf3 (draft7) reference again, and setting that flag everytime we need to record a line seems to be the perfect place to do (it's a bit complicated to explain my resoning, I was concerned mostly because I was a bit fuzzy on certain details which were cleared by rereding the dwarf3 reference document). I shall give this a try, and report back. -- Joel