* Problems with gcov
@ 2007-01-30 14:06 igor.prakljacic
2007-01-30 20:35 ` Jeffrey Creem
2007-02-01 6:39 ` Simon Wright
0 siblings, 2 replies; 3+ messages in thread
From: igor.prakljacic @ 2007-01-30 14:06 UTC (permalink / raw)
Hello,
i`m trying to use the gcov tool to measure the code coverage of my ada-
code, but it seems no to work.
I tried to measure the following code: (helloworld.adb)
with Ada.Text_IO;
use Ada.Text_IO;
procedure helloworld is
begin
Put_Line("Hello World");
end helloworld;
The next steps are:
% gnatmake -fprofile-arcs -ftest-coverage helloworld.adb
gnatgcc -c -fprofile-arcs -ftest-coverage helloworld.adb
gnatbind -x helloworld.ali
gnatlink helloworld.ali
% ls
helloworld helloworld.adb helloworld.ali helloworld.bb
helloworld.bbg helloworld.o
% ./helloworld
Hello World
% ls
helloworld helloworld.adb helloworld.ali helloworld.bb
helloworld.bbg helloworld.o
There is no helloworld.gcno file.
What am i doing wrong.
Thanks
flux
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problems with gcov
2007-01-30 14:06 Problems with gcov igor.prakljacic
@ 2007-01-30 20:35 ` Jeffrey Creem
2007-02-01 6:39 ` Simon Wright
1 sibling, 0 replies; 3+ messages in thread
From: Jeffrey Creem @ 2007-01-30 20:35 UTC (permalink / raw)
igor.prakljacic@gmail.com wrote:
> Hello,
>
> i`m trying to use the gcov tool to measure the code coverage of my ada-
> code, but it seems no to work.
> I tried to measure the following code: (helloworld.adb)
>
> with Ada.Text_IO;
> use Ada.Text_IO;
> procedure helloworld is
> begin
> Put_Line("Hello World");
> end helloworld;
>
> The next steps are:
>
> % gnatmake -fprofile-arcs -ftest-coverage helloworld.adb
> gnatgcc -c -fprofile-arcs -ftest-coverage helloworld.adb
> gnatbind -x helloworld.ali
> gnatlink helloworld.ali
>
> % ls
> helloworld helloworld.adb helloworld.ali helloworld.bb
> helloworld.bbg helloworld.o
>
> % ./helloworld
> Hello World
>
> % ls
> helloworld helloworld.adb helloworld.ali helloworld.bb
> helloworld.bbg helloworld.o
>
>
> There is no helloworld.gcno file.
> What am i doing wrong.
>
> Thanks
>
> flux
>
Not sure. The same sequence of steps works for me on Centos.
What GCC/GNAT version are you using and what OS?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problems with gcov
2007-01-30 14:06 Problems with gcov igor.prakljacic
2007-01-30 20:35 ` Jeffrey Creem
@ 2007-02-01 6:39 ` Simon Wright
1 sibling, 0 replies; 3+ messages in thread
From: Simon Wright @ 2007-02-01 6:39 UTC (permalink / raw)
igor.prakljacic@gmail.com writes:
> % gnatmake -fprofile-arcs -ftest-coverage helloworld.adb
> gnatgcc -c -fprofile-arcs -ftest-coverage helloworld.adb
> gnatbind -x helloworld.ali
> gnatlink helloworld.ali
>
> % ls
> helloworld helloworld.adb helloworld.ali helloworld.bb
> helloworld.bbg helloworld.o
>
> % ./helloworld
> Hello World
>
> % ls
> helloworld helloworld.adb helloworld.ali helloworld.bb
> helloworld.bbg helloworld.o
GNATs based on GCC 2 (eg, GNAT 3.15p) use the .bb and .bbg files, and
the output would be in .da files. GNAT GPL 2006 (on Mac OS X at any
rate) uses the .gcno and .gcda files.
Ah! On this machine I get
$ gnatmake -fprofile-arcs -ftest-coverage helloworld.adb -f
gcc -c -fprofile-arcs -ftest-coverage helloworld.adb
gnatbind -x helloworld.ali
gnatlink helloworld.ali -fprofile-arcs -ftest-coverage
so the gnatlink call is different ...
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-02-01 6:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-30 14:06 Problems with gcov igor.prakljacic
2007-01-30 20:35 ` Jeffrey Creem
2007-02-01 6:39 ` Simon Wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox