Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Elena Zannoni <ezannoni@redhat.com>
To: gdb@sources.redhat.com
Subject: gcov on gdb
Date: Tue, 07 Jan 2003 02:22:00 -0000	[thread overview]
Message-ID: <15898.15058.796649.984375@localhost.redhat.com> (raw)


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.

Elena


             reply	other threads:[~2003-01-07  2:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-07  2:22 Elena Zannoni [this message]
2003-01-07  4:26 ` Daniel Jacobowitz
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=15898.15058.796649.984375@localhost.redhat.com \
    --to=ezannoni@redhat.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