From patchwork Thu Aug 29 12:13:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 96674 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C843B385ED71 for ; Thu, 29 Aug 2024 12:13:33 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 95C5C3858429 for ; Thu, 29 Aug 2024 12:13:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 95C5C3858429 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 95C5C3858429 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724933607; cv=none; b=GqxSK69z8R85rm9M8pprOmUrpLziezWSQZXwMEO9vNJQVujNNgTmiA9VSU1QPz5sS2MKfzUgSv3TNUx+2T0rzWs9UHR+4zCQOp/SQ2CI44DcuXfijiSiNSfdofDQotfx6hpgJrXi+mCoKGgI0tZ68ZyKTWKSmmvmzfgRPT6MRfs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724933607; c=relaxed/simple; bh=bo+Ib/SwEq5NTB0aUsOs1oFj5Sc+tHJtb2ZwcfHRX6w=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Z5rmCfOH6zGUIDUrqP7Dzu4v9MYItYF1wshESFhDAeqNsf82WZy181LTMdukXP/a1vS1pVa6L27Ay2HP/6HuUaGslbggSkE67oqDk863AIUdvPDpRU4hDCTmlXKemVEIFJVxIYjs5I2ON/ucKLJqzucqrSOA1RPLT2q2VrruxP8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724933605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=VpXL4DoT5T+rIs+Xomcix3VsOdFdLQ/O4n6ekPI1vp0=; b=BhkywwX1FRWkev7erRZNsJfTUm+EE1iYQocKiJePbZNGxQy6RgsS2MY33iPrRpvLC/fRCt 0kX7k6cA4Q/Tk1M8NgqEgmhVfsQkts1x5mBvXxqHoPF1fkTNoazm+btupeCPbjfZ5e3WK5 F0zFFfZ37fO5SMcrSlygIpdoCLnwaiY= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-433-b3loB0rYOGOvRODPl6xmEA-1; Thu, 29 Aug 2024 08:13:24 -0400 X-MC-Unique: b3loB0rYOGOvRODPl6xmEA-1 Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-44ffce7ed6aso8562661cf.3 for ; Thu, 29 Aug 2024 05:13:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724933603; x=1725538403; h=mime-version:user-agent:message-id:date:organization:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VpXL4DoT5T+rIs+Xomcix3VsOdFdLQ/O4n6ekPI1vp0=; b=bpyDNRZAOZQx4s0eTdZ9NCjnAPaqP7T2tDADePwRQb2VGS6x4NEef2FchPxKeMGc2g LEn3q/UkYd8euKOrKz0cVCGMfiiPlI+Q+H3S3t8jvbV2kL9VA+2ks+7BSfPjEAJdv5K5 5j/O2Ks28Xuu9WRjZUu7jowXJJOxyY57u32sVADM36DaK4Hkdlh3q8bRDsNVMwYMqCNX ZWdAVXKZI8p84UVkbRyIWwOGip7gp1F4R3dEl7s8+3Yqmf13Ys6nJjfASTd/5VZxsGqT HqqjkF6qb5cK4UevbfPx7iXLah1NuKMf9tVe4tTbR5khMbbL4AxGKWZey9WRzQyPkxw3 o6ag== X-Gm-Message-State: AOJu0Yzy1MfIvMc1PU1d9iRRAmmqYyYm4VU/CsQ8DJn4iIC4miMEgDEz 98T9/wUXsjZgwi3AvfvKnmaIYrfdyYQ6GCGq1oRYmph1NDsV1/CDs0Am/MVw8dlXf8TKTMwAi2A ZwATv2e/YqpXBe6uSnZloZM7ntLYM318KLT3ZJIa/kkJJLchPNWBGR2ZwSM2/G1f+44JlbgICAj Xwm+6bVoFQZ3+1LNpac09ceJlKEXUQpaxruv2j3g== X-Received: by 2002:a05:622a:578f:b0:447:f5c4:32d1 with SMTP id d75a77b69052e-4567f599a79mr27615461cf.38.1724933602345; Thu, 29 Aug 2024 05:13:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IENlJW3LzMwqSJOBdOrgMZhVXlboB2hGi33d55PFi/LeUWnjYOG+hvxYvXaeoPLcLMM2VrJ6g== X-Received: by 2002:a05:622a:578f:b0:447:f5c4:32d1 with SMTP id d75a77b69052e-4567f599a79mr27610151cf.38.1724933597711; Thu, 29 Aug 2024 05:13:17 -0700 (PDT) Received: from localhost (88-120-130-27.subs.proxad.net. [88.120.130.27]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a806aa8e53sm46616485a.0.2024.08.29.05.13.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 05:13:17 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 02F87503C602; Thu, 29 Aug 2024 14:13:14 +0200 (CEST) From: Dodji Seketeli To: libabigail@sourceware.org Subject: [PATCH, applied] btf-reader: Add logging methods Organization: Red Hat / France X-Operating-System: AlmaLinux 9.4 X-URL: http://www.redhat.com Date: Thu, 29 Aug 2024 14:13:14 +0200 Message-ID: <87ikvjo7c5.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libabigail-bounces~patchwork=sourceware.org@sourceware.org Hello, * src/abg-btf-reader.cc (reader::{do_log, show_stats}): Add new methods. Signed-off-by: Dodji Seketeli --- src/abg-btf-reader.cc | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/abg-btf-reader.cc b/src/abg-btf-reader.cc index ad610410..1f087a38 100644 --- a/src/abg-btf-reader.cc +++ b/src/abg-btf-reader.cc @@ -92,6 +92,45 @@ class reader : public elf_based_reader vector types_to_canonicalize_; btf_type_to_abi_artifact_map_type btf_type_to_artifacts_; + /// Getter of the "do_log" flag. + /// + /// This flag tells if we should log about various internal + /// details. + /// + /// return the "do_log" flag. + bool + do_log() const + {return options().do_log;} + + /// Setter of the "do_log" flag. + /// + /// This flag tells if we should log about various internal details. + /// + /// @param f the new value of the flag. + void + do_log(bool f) + {options().do_log = f;} + + /// Getter of the "show_stats" flag. + /// + /// This flag tells if we should emit statistics about various + /// internal stuff. + /// + /// @return the value of the flag. + bool + show_stats() const + {return options().show_stats;} + + /// Setter of the "show_stats" flag. + /// + /// This flag tells if we should emit statistics about various + /// internal stuff. + /// + /// @param f the value of the flag. + void + show_stats(bool f) + {options().show_stats = f;} + /// Getter of the handle to the base BTF object of the current /// binary being analyzed. ///