From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5883 invoked by alias); 22 Oct 2002 23:02:37 -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 5875 invoked from network); 22 Oct 2002 23:02:36 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by sources.redhat.com with SMTP; 22 Oct 2002 23:02:36 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id g9MN2TK26737; Tue, 22 Oct 2002 16:02:29 -0700 X-Authentication-Warning: jackfruit.Stanford.EDU: carlton set sender to carlton@math.stanford.edu using -f To: Elena Zannoni Cc: gdb-patches@sources.redhat.com, Jim Blandy Subject: Re: [rfc/rfa] accept DW_TAG_namespace and friends, possibly on 5.3 References: <15797.53437.183222.336553@localhost.redhat.com> From: David Carlton Date: Tue, 22 Oct 2002 16:02:00 -0000 In-Reply-To: <15797.53437.183222.336553@localhost.redhat.com> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-10/txt/msg00442.txt.bz2 On Tue, 22 Oct 2002 18:27:09 -0400, Elena Zannoni said: > David Carlton writes: >> @@ -1376,37 +1384,54 @@ scan_partial_symbols (char *info_ptr, st >> case DW_TAG_enumerator: >> /* File scope enumerators are added to the partial symbol >> table. */ > Could you add a comment here about why/how we know that the level > should be 2 here? How about if I add a sentence like "They're children of the enumeration type die, so they occur at a level one higher than we normally look for." to the end of the comment? >> if (pdi.tag == 0) >> { >> nesting_level--; >> + /* If this is the end of a DW_TAG_namespace entry, then >> + decrease the file_scope_level, too. */ >> + if (nesting_level < file_scope_level) >> + { >> + file_scope_level--; >> + gdb_assert (nesting_level == file_scope_level); >> + } >> } >> } >> > Can you explain a bit about the levels? I am getting confused. How about the following change to the comment before the definition of file_scope_level: /* We only want to read in symbols corresponding to variables or other similar objects that are global or static. Normally, these are all children of the DW_TAG_compile_unit die, so are all at level 1. But C++ namespaces give ries to DW_TAG_namespace dies whose children are global objects. So we keep track of what level we currently think of as referring to file scope; this should always equal 1 plus the number of namespaces that we are currently nested within. */ > About the new DW_TAGs etc. Are they handled by objdump and readelf? > If not, you should add those to binutils and dwarf2.h as well. readelf seems okay, and they're certainly all in dwarf2.h. (In fact, that's what I looked at to get the new names.) I can't convince objdump to give me any information at all about DWARF 2 info; am I missing something? I've never used the program before, so I could well be. David Carlton carlton@math.stanford.edu