Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: gdb@sources.redhat.com
Subject: Re: gcov on gdb
Date: Tue, 07 Jan 2003 04:26:00 -0000	[thread overview]
Message-ID: <20030107042659.GB5763@nevyn.them.org> (raw)
In-Reply-To: <15898.15058.796649.984375@localhost.redhat.com>

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


  reply	other threads:[~2003-01-07  4:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-07  2:22 Elena Zannoni
2003-01-07  4:26 ` Daniel Jacobowitz [this message]
2003-01-09  0:42 ` Andrew Cagney
2003-01-07  4:17 Michael Elizabeth Chastain
2003-01-07  4:24 ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030107042659.GB5763@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox