From patchwork Wed Aug 11 16:02:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 44636 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 649633985452 for ; Wed, 11 Aug 2021 16:04:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 649633985452 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1628697846; bh=6RuKq++tPZDqj65tF+xsmhOEfG+nZ9ZPao0OenyyLNc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Help: List-Subscribe:From:Reply-To:From; b=I1H1A1WGNau7akNzU0tX8FV1kZ/+kpVkkr43FeRKl/R4ODDcVOCPbMG+ZI7Ztw9sJ A0UxCwlqKoSYBe2vlHYe69dobudG1rwcG633srJbnEqj5kScQM5shPaFDQ50bnGgmk g7jNsHyP5jC8K1Ut9dl4HgvJqlUdbYOVn5LVjhX4= 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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 18C12398243C for ; Wed, 11 Aug 2021 16:02:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 18C12398243C Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-599-qGprvNA1M0ST2pkUXj8R3w-1; Wed, 11 Aug 2021 12:02:33 -0400 X-MC-Unique: qGprvNA1M0ST2pkUXj8R3w-1 Received: by mail-wr1-f70.google.com with SMTP id l12-20020a5d6d8c0000b029015488313d96so896508wrs.15 for ; Wed, 11 Aug 2021 09:02:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:organization:date:message-id :user-agent:mime-version; bh=6RuKq++tPZDqj65tF+xsmhOEfG+nZ9ZPao0OenyyLNc=; b=l+On6aOGlsVI7nK3w0+3R0WeUqqJrP2LCnqXx87SXCIdCCHn7nMTZkB6tKIfpXVZI/ ScnzfP/K7e6j9LNZENFxi1LKRdTlwpH44SXj05Wu5FE9DIs6PdaUY4T7wAbsNj9CNJwX JCx91/EPySiJ2Rlqy8Lmg33htGt6grnpGQ+S3T0zkCIDfNXjKJk4F+I5e1AaASr32djQ izp7LmAUnDaRkxvXzWb+qwNadj111LzanfUhWLrFTZuFrKIl+bxqulw39W/AXXCXQVcX o+5G3W/fEH5WvIIqdtkGS067dKaMkGCJuX9mREqMWQLKeoXKZvwycUyBRg0RzTh7QSJ9 uB6w== X-Gm-Message-State: AOAM533Omhx+O0dKFmONzYHkgPLNyomwm/TtUmRSKzPZvww/IVHxAz+v o+S+PCHTp4LJcOkB37lLi8Ysp72u8M/J04AYefBRgIhRCkwyJOtmFoeDLep3VnypB/jM797oRMy tCm1x+WYlgDuPMuMAEYPupumemv16RhXyVoCw9b4r13WQlJiYejVIWBEZ9N62QfRyyZCl X-Received: by 2002:a05:600c:19c6:: with SMTP id u6mr29003612wmq.154.1628697752130; Wed, 11 Aug 2021 09:02:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSV2n7Hv3KRkMy0RwZBbUO8SAEQY+sdoY+pucLqWhZ4D5u/VZRaN28YAtuG42JZkOBPLM++g== X-Received: by 2002:a05:600c:19c6:: with SMTP id u6mr29003590wmq.154.1628697751908; Wed, 11 Aug 2021 09:02:31 -0700 (PDT) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id l7sm24927694wmj.9.2021.08.11.09.02.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Aug 2021 09:02:31 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 2FE145800FB; Wed, 11 Aug 2021 18:02:28 +0200 (CEST) To: libabigail@sourceware.org Subject: [PATCH 1/8, applied] ir: Improve the debugging facilities Organization: Red Hat / France X-Operating-System: Fedora 35 X-URL: http://www.redhat.com Date: Wed, 11 Aug 2021 18:02:27 +0200 Message-ID: <877dgsdl64.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.2 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_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: Dodji Seketeli via Libabigail From: Dodji Seketeli Reply-To: Dodji Seketeli Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" Hello, While looking at something else, I stumbled across some minor issues in the debugging facilities I use to track self comparison problems. I added a missing ABG_RETURN macro in the stack of equals() function to better detect when there is a change, under the debugger. I also fixed get_debug_representation() to properly display the class/enum name (as expected) rather their pretty representation. * src/abg-ir.cc (maybe_compare_as_member_decls): Add a missing ABG_RETURN (get_debug_representation): Display the name of class and enums, not their pretty representation. Signed-off-by: Dodji Seketeli Applied to master. --- src/abg-ir.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/abg-ir.cc b/src/abg-ir.cc index 87b3b182..39540582 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -4706,7 +4706,7 @@ maybe_compare_as_member_decls(const decl_base& l, *k |= LOCAL_NON_TYPE_CHANGE_KIND; } } - return result; + ABG_RETURN(result); } /// Compares two instances of @ref decl_base. @@ -8522,7 +8522,7 @@ get_debug_representation(const type_or_decl_base* artifact) if (c) { class_decl *clazz = is_class_type(c); - string name = c->get_pretty_representation(/*internal=*/false, true); + string name = c->get_qualified_name(); std::ostringstream o; o << name; @@ -8535,8 +8535,7 @@ get_debug_representation(const type_or_decl_base* artifact) o << " "; if (b->get_is_virtual()) o << "virtual "; - o << b->get_base_class()->get_pretty_representation(/*internal=*/false, - /*qualified=*/true) + o << b->get_base_class()->get_qualified_name() << std::endl; } } @@ -8582,7 +8581,7 @@ get_debug_representation(const type_or_decl_base* artifact) } else if (const enum_type_decl* e = is_enum_type(artifact)) { - string name = e->get_pretty_representation(/*internal=*/true, true); + string name = e->get_qualified_name(); std::ostringstream o; o << name << " : "