From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32170 invoked by alias); 7 Jan 2003 04:26:54 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 32154 invoked from network); 7 Jan 2003 04:26:54 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 209.249.29.67 with SMTP; 7 Jan 2003 04:26:54 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18VnCq-000580-00 for ; Tue, 07 Jan 2003 00:27:20 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18VlKN-0001Vb-00 for ; Mon, 06 Jan 2003 23:26:59 -0500 Date: Tue, 07 Jan 2003 04:26:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Subject: Re: gcov on gdb Message-ID: <20030107042659.GB5763@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com References: <15898.15058.796649.984375@localhost.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15898.15058.796649.984375@localhost.redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-01/txt/msg00059.txt.bz2 On Mon, Jan 06, 2003 at 09:26:26PM -0500, Elena Zannoni wrote: > > I have run gcov on a testsuite run of gdb on my laptop (stock RHL 7.2). > It is really easy, in case somebody wants to try, you just need to compile > gdb like this: > > make CFLAGS='-O0 -fprofile-arcs -ftest-coverage' > > then, after the run, you'll notice all these *.bb, *.bbg, *.da files > in your objdir. For each source file, then you can say 'gcov blah.c' > and this will produce the actually interesting data, in the form of a > copy of the source file (with a .gcov extension) with each line > annotated with the number of times it was executed, or with '###' if > it was never run. I've done this once. I was trying to write a full-coverage (or mostly full coverage...) testsuite for c-typeprint.c; I'll get back to that One Of These Days. > For instance: > [ezannoni@localhost gdb]$ gcov stabsread.c > 52.76% of 2280 source lines executed in file /home/ezannoni/sources/src/gdb/stabsread.c > Creating stabsread.c.gcov. > > In doing so, I've noticed that a lot of lines in the stabread.c file > are never executed because they are old functions (1996) to support > cfront. I think we could obsolete this stuff. I've not found anything > in a google search for cfront that was more recent than 1995. > > Anyway, I think the gcov data is too bulky to post. But it could be a good > way to spot stuff that is old, or stuff that is untested. I think this is a really, really, really good idea. I can absolutely guarantee that the C++ language support won't work with CFront any more, and I've never seen a complaint, so I'm inclined to think it doesn't have current users (or current users interested in GDB). -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer