From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) by sourceware.org (Postfix) with ESMTPS id 4AEDA3858C27 for ; Tue, 19 Oct 2021 05:53:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4AEDA3858C27 Received: by mail-qk1-x72d.google.com with SMTP id a13so7793395qkg.11 for ; Mon, 18 Oct 2021 22:53:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=O8ogRoOlrC3Ysi7uTe4NoY6Q6LA8c/S5VWITtuwXiBc=; b=GSqcaahQfSM2YM9vFiuLlYC4q2Bsc6PciVA+TEg0m2rXwD/xZ/IK4QbSr0ZpQy37QH L9dPt45sMjK/mI/hJDWbkzyTZZTNhAe11pvJ7GO2Lkd8HMgeZLb+UfwhMqBovlWCAcS5 gUa3yMubmMYrUhXjyh6D7yWex3nY5lKlQue3hQ2c0eCjSTXmJEBHmB2djbY9SVZUTC9L lDsKZGoare7Q1DCuOk43guDV3gQoApHN9rFbiGWvXbv55uSNWiPYkip7rUnUytNMlF9X pwYIKA8UrYT2Jr4pStT/5pW8imE+HCNTc0eXxEfY6PHQzRptKgeYlPfegBKX4pbEreDk AVtA== X-Gm-Message-State: AOAM533dlNQAYBy6hVsYMYu4kpXc2+mc+SgRoWyluydm8ThW2a93rkZQ NUgHVX7w1XUE5sw/c0YZS447ljw7T142YdHBx6OJF6Q1OOM3RA== X-Google-Smtp-Source: ABdhPJw6KvcU2fuPp2oerVB3HFsgX9Txp1UZwKViH8x/Ppvzwg3SvEamTFVpW9OPTiWBHJ5uJa3DH3+xHF13nZfE1+A= X-Received: by 2002:ae9:de83:: with SMTP id s125mr26035630qkf.248.1634622807700; Mon, 18 Oct 2021 22:53:27 -0700 (PDT) MIME-Version: 1.0 From: Soumyaranjan Sabat Date: Tue, 19 Oct 2021 11:28:12 +0530 Message-ID: Subject: Support and additional information to use GCOV To: gcc-help@gcc.gnu.org X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, 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 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2021 05:53:31 -0000 Hello Team, Had a couple of queries for use of gcov. Requesting for your help !! 1. There are 2 configurations for a file [trigger.c] due to a macro i.e #define TRIGGER which can have values ON and OFF [ and hence 2 configurations ]. By 2 configurations, it is meant that a. Configuration 1 : trigger.c - #define TRIGGER ON b. Configuration 1 : trigger.c - #define TRIGGER OFF Due to 2 different macros, different parts of code are enabled. But a consolidated coverage report is required, i.e which combines both coverage reports of configuration 1 and configuration 2 into a single report to show if any part of the code is missed to test. Is this possible by directly using gcov and/or Gcovr and/or Gcov-tool and/or Gcov-dump? 2. Is it possible to check for coverage of a particular file? i.e in a project there are multiple files such as trigger.c , trigger_internal.c etc but consolidated coverage of only trigger.c is required. Please advise how to proceed on these 2 queries. Regards, Soumyaranjan