From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) by sourceware.org (Postfix) with ESMTPS id 826D939A540B for ; Fri, 23 Jul 2021 09:32:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 826D939A540B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embedded-brains.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embedded-brains.de Received: from sslproxy02.your-server.de ([78.47.166.47]) by dedi548.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1m6rXE-0005wr-3Y; Fri, 23 Jul 2021 11:32:00 +0200 Received: from [82.100.198.138] (helo=mail.embedded-brains.de) by sslproxy02.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6rXE-0002ci-0C; Fri, 23 Jul 2021 11:32:00 +0200 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id A89262A1610; Fri, 23 Jul 2021 11:31:59 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id j4LjDYuKNzkP; Fri, 23 Jul 2021 11:31:59 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 50F372A165B; Fri, 23 Jul 2021 11:31:59 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 14LrAmvnxyf2; Fri, 23 Jul 2021 11:31:59 +0200 (CEST) Received: from shuber-nb-linux.eb.localhost (unknown [10.10.171.10]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 2808A2A1610; Fri, 23 Jul 2021 11:31:59 +0200 (CEST) Subject: Re: [PATCH v2] gcov: Add __gcov_info_to_gdca() From: Sebastian Huber To: =?UTF-8?Q?Martin_Li=c5=a1ka?= , gcc-patches@gcc.gnu.org References: <20210713201553.108947-1-sebastian.huber@embedded-brains.de> <946c22c1-af94-713c-6d72-867a50c7bd48@suse.cz> Message-ID: <40644023-8429-06d2-fde5-4f1deec5d707@embedded-brains.de> Date: Fri, 23 Jul 2021 11:31:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: smtp-embedded@poldinet.de X-Virus-Scanned: Clear (ClamAV 0.103.2/26241/Fri Jul 23 10:20:30 2021) X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2021 09:32:02 -0000 On 23/07/2021 11:17, Sebastian Huber wrote: > On 23/07/2021 08:52, Martin Li=C5=A1ka wrote: >>> >>>> It would be nice having a test-case that can test your approach. >>> >>> The problem is that you need the linker set to get access to the gcov= =20 >>> information. The test program of the commit message works on my Linux= =20 >>> machine. I am not sure if it is generic enough for the test suite.=20 >>> Instead of printing the information we could compare it against an=20 >>> expected output so that we have a self-contained test program. >> >> Yep, that would be nice. >=20 > I tried to run the attached test case as=20 > "gcc/testsuite/gcc.dg/gcov-info-to-gcda.c". However, I get this error: >=20 > Invoking the compiler as /tmp/sh/b-gcc-git-linux/gcc/xgcc=20 > -B/tmp/sh/b-gcc-git-linux/gcc/=20 > /home/EB/sebastian_h/src/gcc/gcc/testsuite/gcc.dg/gcov-info-to-gcda.c=20 > =C2=A0-fdiagnostics-plain-output=C2=A0=C2=A0 -fprofile-arcs -fprofile-= info-section=20 > -lm=C2=A0 -o ./gcov-info-to-gcda.exe > Setting timeout to 300 > Executing on host: /tmp/sh/b-gcc-git-linux/gcc/xgcc=20 > -B/tmp/sh/b-gcc-git-linux/gcc/=20 > /home/EB/sebastian_h/src/gcc/gcc/testsuite/gcc.dg/gcov-info-to-gcda.c=20 > =C2=A0-fdiagnostics-plain-output=C2=A0=C2=A0 -fprofile-arcs -fprofile-= info-section=20 > -lm=C2=A0 -o ./gcov-info-to-gcda.exe=C2=A0=C2=A0=C2=A0 (timeout =3D 300= ) > spawn -ignore SIGHUP /tmp/sh/b-gcc-git-linux/gcc/xgcc=20 > -B/tmp/sh/b-gcc-git-linux/gcc/=20 > /home/EB/sebastian_h/src/gcc/gcc/testsuite/gcc.dg/gcov-info-to-gcda.c=20 > -fdiagnostics-plain-output -fprofile-arcs -fprofile-info-section -lm -o= =20 > ./gcov-info-to-gcda.exe >=20 > pid is 79704 -79704 > /home/EB/sebastian_h/src/gcc/gcc/testsuite/gcc.dg/gcov-info-to-gcda.c:5= :10:=20 > fatal error: gcov.h: No such file or directory >=20 > compilation terminated. >=20 >=20 > Is it possible to do such kind of tests? I also have to link to -lgcov? Ok, the linking is not the problem. If I declare __gcov_info_to_gcda()=20 locally, the test runs. --=20 embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.huber@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht M=C3=BCnchen Registernummer: HRB 157899 Vertretungsberechtigte Gesch=C3=A4ftsf=C3=BChrer: Peter Rasmussen, Thomas= D=C3=B6rfler Unsere Datenschutzerkl=C3=A4rung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/