From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 2E8C63853804 for ; Wed, 26 Oct 2022 14:51:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2E8C63853804 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666795906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OhuyZ35lTd2NEZp5y1NyIQXQmnt8sxXUP0iCzxDYvgI=; b=dwMddVn7KmMbqR7i+KIsKt1ri0Bi78LFFAs57JNvprNViMhhJZIfIeTONey2Z1qlBVK/t6 knKoQTrEtKHbeYyZwzatyQYxJ/2BSHuBgik/GrpLtvrNlu73h9XOkjp2lonGTyVqu+nqJx p4K1qVpc70cIL/ajmulXD23PQUb5X3A= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-672-pzn_JSIOO--_TOpGC4soVg-1; Wed, 26 Oct 2022 10:51:45 -0400 X-MC-Unique: pzn_JSIOO--_TOpGC4soVg-1 Received: by mail-wr1-f71.google.com with SMTP id b10-20020adfc74a000000b002365575a405so5739860wrh.6 for ; Wed, 26 Oct 2022 07:51:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OhuyZ35lTd2NEZp5y1NyIQXQmnt8sxXUP0iCzxDYvgI=; b=4Z7GYuqTNBqQxfOs/XdMikO9MxcfwlmyCC6Q2NpCDYTNzK1K6rTIsqWkXKzIzR3JRw nHEa+uiN3iAuRxBbORt+RBIiJmSqLTcnYvejv/omQ0nwTHvzTD+b9Kp7RegxmLTSV5Ed 6KSZXsFx2CuABMk+sIkhSP88R2iEXpk6W6pgkMGHJfUBl+gAVh2eaW/jTyaNV6/LHxUe vcgV6OLpV5FMnNQOrY9yELFjTJpS+d+KMW10SNB9ba6/gpNkEnubdMKvqYybrRdlJtDq fU+zQNDCQqXOVfqCKGSIPplwAK9MKgvVRTt/oDtX/9jXCbyjGHpw9ub4eJ6amGog5DRX B1oA== X-Gm-Message-State: ACrzQf2GCWbqPy7USOXCeEhYKyrh/uac+r3obLc6X8inN7b8R3XBjrU+ el6hqcDXmaScDa0LBFKgW9X1annARyn58q4JLLOJxr8CTT/RteVj07H2+gSf8H7jEwEe3t+TjfP T3qqVZJ+GIl+zR03csQgIcg== X-Received: by 2002:a05:6000:15c3:b0:230:f9fb:c7d with SMTP id y3-20020a05600015c300b00230f9fb0c7dmr30285739wry.250.1666795904492; Wed, 26 Oct 2022 07:51:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5LNUuSlxaRcVi6o9vNPPTVvLJ9E1AoohUYJMgw8u3fz8tCIArHO+ipriXRYtDEwWpP7ZdOsg== X-Received: by 2002:a05:6000:15c3:b0:230:f9fb:c7d with SMTP id y3-20020a05600015c300b00230f9fb0c7dmr30285726wry.250.1666795904276; Wed, 26 Oct 2022 07:51:44 -0700 (PDT) Received: from localhost ([31.111.84.238]) by smtp.gmail.com with ESMTPSA id ay19-20020a05600c1e1300b003a1980d55c4sm2142617wmb.47.2022.10.26.07.51.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 07:51:43 -0700 (PDT) From: Andrew Burgess To: Bruno Larsen , gdb-patches@sourceware.org Subject: Re: [PATCH 05/11] gdb/testsuite: allow for clang style destructors on gdb.cp/m-static.exp In-Reply-To: <20221004170747.154307-7-blarsen@redhat.com> References: <20221004170747.154307-1-blarsen@redhat.com> <20221004170747.154307-7-blarsen@redhat.com> Date: Wed, 26 Oct 2022 15:51:42 +0100 Message-ID: <87sfja63k1.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.8 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_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Bruno Larsen via Gdb-patches writes: > when running gdb.cp/m-static.exp using clang, we get the following s/clang/Clang/. Thanks, Andrew > failures: > > print test1.~gnu_obj_1^M > $6 = {void (gnu_obj_1 * const)} 0x555555555470 ^M > (gdb) FAIL: gdb.cp/m-static.exp: simple object instance, print destructor > ptype test1.~gnu_obj_1^M > type = void (gnu_obj_1 * const)^M > (gdb) FAIL: gdb.cp/m-static.exp: simple object instance, ptype destructor > print test1.'~gnu_obj_1'^M > $7 = {void (gnu_obj_1 * const)} 0x555555555470 ^M > (gdb) FAIL: gdb.cp/m-static.exp: simple object instance, print quoted destructor > > This is because the test is expecting an extra integer parameter on the > destructor. Looking at the debuginfo, it seems that there is nothing > actually wrong with this output, so these tests were changed to test > multiple possible regexps. > --- > gdb/testsuite/gdb.cp/m-static.exp | 36 ++++++++++++++++++++++--------- > 1 file changed, 26 insertions(+), 10 deletions(-) > > diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp > index 979de23a44f..332e1cbe1f9 100644 > --- a/gdb/testsuite/gdb.cp/m-static.exp > +++ b/gdb/testsuite/gdb.cp/m-static.exp > @@ -102,16 +102,32 @@ if { [is_aarch32_target] } { > {type = void \(single_constructor \* const\)} \ > "simple object class, ptype constructor" > > - gdb_test "print test1.~gnu_obj_1" \ > - { = {void \(gnu_obj_1 \* const, int\)} 0x[0-9a-f]+ } \ > - "simple object instance, print destructor" > - gdb_test "ptype test1.~gnu_obj_1" \ > - {type = void \(gnu_obj_1 \* const, int\)} \ > - "simple object instance, ptype destructor" > - > - gdb_test "print test1.'~gnu_obj_1'" \ > - { = {void \(gnu_obj_1 \*( const)?, int\)} 0x[0-9a-f]+ } \ > - "simple object instance, print quoted destructor" > + gdb_test_multiple "print test1.~gnu_obj_1" "simple object instance, print destructor" { > + -re -wrap { = {void \(gnu_obj_1 \* const, int\)} 0x[0-9a-f]+ } { > + pass $gdb_test_name > + } > + -re -wrap { = {void \(gnu_obj_1 \* const\)} 0x[0-9a-f]+ } { > + pass $gdb_test_name > + } > + } > + > + gdb_test_multiple "ptype test1.~gnu_obj_1" "simple object instance, ptype destructor" { > + -re -wrap {type = void \(gnu_obj_1 \* const, int\)} { > + pass $gdb_test_name > + } > + -re -wrap {type = void \(gnu_obj_1 \* const\)} { > + pass $gdb_test_name > + } > + } > + > + gdb_test_multiple "print test1.'~gnu_obj_1'" "simple object instance, print quoted destructor" { > + -re -wrap { = {void \(gnu_obj_1 \*( const)?, int\)} 0x[0-9a-f]+ } { > + pass $gdb_test_name > + } > + -re -wrap { = {void \(gnu_obj_1 \*( const)?\)} 0x[0-9a-f]+ } { > + pass $gdb_test_name > + } > + } > > gdb_test "ptype gnu_obj_1::'~gnu_obj_1'" \ > {type = void \(gnu_obj_1 \* const\)} \ > -- > 2.37.3