From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16599 invoked by alias); 9 Jan 2003 00:42:42 -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 16591 invoked from network); 9 Jan 2003 00:42:38 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by 209.249.29.67 with SMTP; 9 Jan 2003 00:42:38 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 6140A3EC2; Wed, 8 Jan 2003 19:42:27 -0500 (EST) Message-ID: <3E1CC573.2050801@redhat.com> Date: Thu, 09 Jan 2003 00:42:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.1) Gecko/20021211 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Elena Zannoni Cc: gdb@sources.redhat.com Subject: Re: gcov on gdb References: <15898.15058.796649.984375@localhost.redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-01/txt/msg00105.txt.bz2 > 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. > > 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. Don't know of a script that can convert the gcov into html so that it is web browsable? Anyway, what about putting it on the ftp server? Andrew