Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: gcov on gdb
@ 2003-01-07  4:17 Michael Elizabeth Chastain
  2003-01-07  4:24 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Elizabeth Chastain @ 2003-01-07  4:17 UTC (permalink / raw)
  To: ezannoni, gdb

Elena Zannoni writes:
> 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.

More generally, I wish gdb had documentation about which compilers,
assemblers, and linkers that gdb supports, especially for C++.

Personally, I take the view that I prefer to test-bed gdb with other
Free Software.  Specifically that means these licenses:

  http://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses
  http://www.gnu.org/licenses/license-list.html#GPLIncompatibleLicenses

I don't know what FSF policy is on this.

Michael C
apologies to elena z for the tangent on her thread


^ permalink raw reply	[flat|nested] 5+ messages in thread
* gcov on gdb
@ 2003-01-07  2:22 Elena Zannoni
  2003-01-07  4:26 ` Daniel Jacobowitz
  2003-01-09  0:42 ` Andrew Cagney
  0 siblings, 2 replies; 5+ messages in thread
From: Elena Zannoni @ 2003-01-07  2:22 UTC (permalink / raw)
  To: gdb


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-01-09  0:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-07  4:17 gcov on gdb Michael Elizabeth Chastain
2003-01-07  4:24 ` Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2003-01-07  2:22 Elena Zannoni
2003-01-07  4:26 ` Daniel Jacobowitz
2003-01-09  0:42 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox