From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cd63d1fbf190dd73 X-Google-Attributes: gid103376,public From: "Steve Doiel" Subject: Re: gcov with GNAT 3.11p on Win 95 Date: 1999/07/08 Message-ID: <37854e5e.0@news.pacifier.com>#1/1 X-Deja-AN: 498913050 References: <7m30k3$5eu$1@neptunium.btinternet.com> X-Trace: 8 Jul 1999 18:20:30 PST, 216.65.140.19 Newsgroups: comp.lang.ada X-Mimeole: Produced By Microsoft MimeOLE V4.72.3110.3 Date: 1999-07-08T00:00:00+00:00 List-Id: Graeme English wrote in message <7m30k3$5eu$1@neptunium.btinternet.com>... >I am trying to get gcov to work with a trivial Ada program (I am assuming >this is possible since it comes with the distribution) but when I compile >code with the -gprofile-arcs -ftest-coverage the linker complains with the >following :- > >C:\gnat\lib\gcc-lib\pentium-mingw32msv\2.8.1\libgcc.a(_bb.o) : In function >`_bb_init_prg': >c:/gcc/build/../gcc-2.8.1/libgcc2.c(.text+0x10a7): undefined reference to >`bzero' > >Also is there a version of gprof which can cope with Ada ? > > I was able to resolve the bzero problem by creating the function below in a file named bzero.c, compiling with gcc -c bzero.c and then linking with the object using the following gnatmake switches: -f -fprofile-arcs -cargs -ftest-coverage -largs bzero.o void bzero( char *ptr, int len ) { int ii; for( ii = 0 ; ii < len ; ii++ ) { *ptr = 0; ptr++; } } BTW: I'm working on NT 4.0 with GNAT 3.11p SteveD