From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2542 invoked by alias); 21 Dec 2001 16:51:24 -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 2216 invoked from network); 21 Dec 2001 16:50:04 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 21 Dec 2001 16:50:04 -0000 Received: from telocity.telocity.com (taarna.cygnus.com [205.180.230.102]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with SMTP id IAA26536; Fri, 21 Dec 2001 08:49:52 -0800 (PST) Message-ID: <3C23674E.4A40@redhat.com> Date: Fri, 21 Dec 2001 08:51:00 -0000 From: Michael Snyder X-Mailer: Mozilla 3.04 (Win95; I) MIME-Version: 1.0 To: Pierre Muller CC: Michael Snyder , gdb-patches@sources.redhat.com Subject: Re: [PATCH] Further extend "maint info sections" cmd with ALLOBJ References: <4.2.0.58.20011221115135.00acb908@ics.u-strasbg.fr> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by cygnus.com id IAA26536 X-SW-Source: 2001-12/txt/msg00561.txt.bz2 Pierre Muller wrote: >=20 > At 23:30 20/12/2001 , Michael Snyder a =E9crit: >=20 > >As a further extension, the "maint info sections" command > >will now accept an argument "ALLOBJ" to iterate over all > >known object files (which includes shared libraries. > >You can now do (for instance): > > > > (gdb) maint info sect .bss ALLOBJ > > > >to see info on the .bss sections of all loaded object files. >=20 > Great job! >=20 > Just a little remark, I would have expected that I get the same output > for the main executable in >=20 > "maint info sect" > and > "maint info sect ALLOBJ" > but when I tried it out on a freshly compiled GDB, > the seciond command didn't should > the .stab and .stabstr sections that were shown for the first command. >=20 > This is intentional? Hmm! No. And I hadn't noticed it, thanks for pointing it out. What's happening is, to do the ALLOBJ version, I use the=20 section table in the objfile struct rather than the section list in the bfd. I do that because I want the relocated=20 addresses of the shared libraries, not the raw addresses that are in the bfd section table. What I did not notice=20 is that the .stabs sections are (apparently) omitted from the objfile section table. I suppose it's likely that the dwarf debugging sections are too. Well, fortunately I did not change the behavior of the=20 original form of the command. I'll mull this over, and if I can think of a way to bring the new form into=20 compliance, I will. Otherwise we may just have to=20 document the short-coming.