From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5340 invoked by alias); 26 Mar 2009 00:29:56 -0000 Received: (qmail 5332 invoked by uid 22791); 26 Mar 2009 00:29:56 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 26 Mar 2009 00:29:50 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 29A2C2BAB1C; Wed, 25 Mar 2009 20:29:48 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id XhdnSZYMcME2; Wed, 25 Mar 2009 20:29:48 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id E9E872BAAEE; Wed, 25 Mar 2009 20:29:47 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id DEBD85BD21; Wed, 25 Mar 2009 17:29:40 -0700 (PDT) Date: Thu, 26 Mar 2009 00:38:00 -0000 From: Joel Brobecker To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [patch/rfc] Recognize non-DW_AT_location symbols Message-ID: <20090326002940.GI9472@adacore.com> References: <20090316202040.GA27070@host0.dyn.jankratochvil.net> <20090320150248.GA12530@adacore.com> <20090320182215.GC12530@adacore.com> <20090320183838.GA8318@host0.dyn.jankratochvil.net> <20090320191841.GE12530@adacore.com> <20090323173115.GA19319@adacore.com> <20090323173741.GA14334@host0.dyn.jankratochvil.net> <20090323224736.GL9472@adacore.com> <20090324213956.GA10086@host0.dyn.jankratochvil.net> <20090325090154.GA22235@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090325090154.GA22235@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-03/txt/msg00582.txt.bz2 Hi Jan, > gdb/ > 2009-03-24 Joel Brobecker > Jan Kratochvil > > Recognize missing DW_AT_location as . > * dwarf2read.c > (new_symbol ): > Call add_symbol_to_list. I don't understand what you are trying to explain in your comment. The way I came to the conclusion that we shouldn't create a symbol for DIEs that have a non-zero DW_AT_declaration is that the DWARF reference calls them as "incomplete, or non-defining" declarations. As such, we don't have all the information about our variable yet, and the absence of a DW_AT_location attribute can be normal. Normally, the full definition should be provided elsewhere and this what we will use to create the associated symbol. In your comment, you are hinting at a C++ situation, so I'm guessing that this situation is relevant to this thread and gave you a little bit of trouble. Would you like to elaborate? If you want to, we can commit the patch as is, with or without the comment, and then work on a comment that we can both understand. I would tend towards committing the patch without the comment. I'd rather have no comment than a comment I don't understand. > gdb/testsuite/ > 2009-03-25 Jan Kratochvil > > * gdb.dwarf2/dw2-noloc-main.c: New file. > * gdb.dwarf2/dw2-noloc.S: New symbols matrix. > (.text): Remove. > (.data): New. > (DW_AT_stmt_list, .debug_line, DW_AT_frame_base): Remove. > (DW_AT_low_pc, DW_AT_high_pc): Reference `dw2-noloc-main.c'. > (DW_TAG_subprogram func_cu1, noloc): Remove. > (main): New. > * gdb.dwarf2/dw2-noloc.exp: Use prepare_for_testing, compile also > `dw2-noloc-main.c'. Test the new DIEs from `dw2-noloc.S'. > (file_symbols): New procedure. This part looks OK to me as well. -- Joel