From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12297 invoked by alias); 22 Oct 2002 23:10:25 -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 12290 invoked from network); 22 Oct 2002 23:10:24 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 22 Oct 2002 23:10:24 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g9MMn4w21714 for ; Tue, 22 Oct 2002 18:49:04 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g9MNANf08088 for ; Tue, 22 Oct 2002 19:10:23 -0400 Received: from localhost.redhat.com (IDENT:MHzaC3ILbj4twSGYyd21+WQUUoFtUKHe@tooth.toronto.redhat.com [172.16.14.29]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g9MNAL026221; Tue, 22 Oct 2002 19:10:21 -0400 Received: by localhost.redhat.com (Postfix, from userid 469) id C3450FF79; Tue, 22 Oct 2002 19:07:37 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15797.55864.443242.623352@localhost.redhat.com> Date: Tue, 22 Oct 2002 16:10:00 -0000 To: David Carlton Cc: Elena Zannoni , gdb-patches@sources.redhat.com, Jim Blandy Subject: Re: [rfc/rfa] accept DW_TAG_namespace and friends, possibly on 5.3 In-Reply-To: References: <15797.53437.183222.336553@localhost.redhat.com> X-SW-Source: 2002-10/txt/msg00443.txt.bz2 David Carlton writes: > 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? > yes thanks. > >> 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. */ > yes, much clearer. > > 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. > Oh yeah sorry. No, objdump doesn't give you dwarf2. Brain blackout. I think it can go in now. Elena > David Carlton > carlton@math.stanford.edu