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 DEE3A3853802 for ; Mon, 31 Oct 2022 14:46:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DEE3A3853802 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=1667227571; 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=95fRNvURGLwC7RIhWV4huIwvVT0tb9TaT+vrNSOopzk=; b=cJTDZ0Pu7xRtlgsDXUCe4oH2qYqwiO4mDLyA4SX8iGet2c3E2Yow0ockIEBSRq+/NPOlwU bICGMezhsu1SktFDEzlVFQMlJEKXlnd7r7BA+sHqH48KZdG/AbbWfickaYk5q+BZi4Amgb UBebXSejvMGK20XSqKAGr7nsMi0UDdo= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-330-_zOjsCPIPZ2rVj92Ke3Acg-1; Mon, 31 Oct 2022 10:46:10 -0400 X-MC-Unique: _zOjsCPIPZ2rVj92Ke3Acg-1 Received: by mail-qt1-f199.google.com with SMTP id c11-20020ac87dcb000000b0039cdb815f3bso7718177qte.4 for ; Mon, 31 Oct 2022 07:46:10 -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=95fRNvURGLwC7RIhWV4huIwvVT0tb9TaT+vrNSOopzk=; b=fupYOraQc4igvIaZBAlX7EiG2zkK64crNCPA4S3i8kA1g9qvsO400fpXGiTt0Ue6h9 MU1ar1INKyZxRlHZXYuAQBVilDyPOgDtdoihlTXfUYgwhQ64AeZUeqZBUo0odJjnfMGV /rIkvW2K9hh4R2BpBCkG3diNpLMCK/9ZzkwRaoyflhYvlsO8JPicP0R77e5WBsmHP+Oo R1s3LdoKQvcgiIzpZIRtWwRU9xSeJMp9ajncgqtcj8jNTtAnBJJJZokYA8DJKsa+m98w TmB2Q087BkR4jchNQ2F8qJ2iIa48f/LT3P+9o9DKkgrzDvXe8ESv9WQ81TqXxFcE0bqD gqGw== X-Gm-Message-State: ACrzQf1mRmSvF7eLNbukFUerN7op4s00T5v9Tzkdbt1sBJAIZpAHeKa0 oyz7mG/hUgWzTvb5IJ98ZgXSG1R/M5u/R5U0jK4yC8boZkLUHBnZRbTArdBWbz7+sgCsP1z4AE8 EmLV2czWg/wzWb9eMENBD2A== X-Received: by 2002:a05:620a:44cc:b0:6ce:a6ed:ee62 with SMTP id y12-20020a05620a44cc00b006cea6edee62mr9339345qkp.743.1667227569798; Mon, 31 Oct 2022 07:46:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM65vALOYECcUgQcH3FNkR3k0xdeaiXpRsv0VUJr4vE1h7eOCbuIxYKJBQ9M2LEW+nq7BwwGWA== X-Received: by 2002:a05:620a:44cc:b0:6ce:a6ed:ee62 with SMTP id y12-20020a05620a44cc00b006cea6edee62mr9339329qkp.743.1667227569526; Mon, 31 Oct 2022 07:46:09 -0700 (PDT) Received: from localhost ([31.111.84.238]) by smtp.gmail.com with ESMTPSA id bp6-20020a05620a458600b006cf9084f7d0sm4788013qkb.4.2022.10.31.07.46.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 07:46:09 -0700 (PDT) From: Andrew Burgess To: Bruno Larsen , gdb-patches@sourceware.org Subject: Re: [PATCH 1/2] gdb/testsuite: allowed for function_range to deal with mangled functions In-Reply-To: <20221013160114.4143323-2-blarsen@redhat.com> References: <20221013160114.4143323-1-blarsen@redhat.com> <20221013160114.4143323-2-blarsen@redhat.com> Date: Mon, 31 Oct 2022 14:46:07 +0000 Message-ID: <874jvkcaq8.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=-12.1 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 calling get_func_info inside a test case, it would cause failures > if the function was printed using a C++ style mangled name. The current > patch fixes this by allowing for mangled names along with the current > rules. Instead of this approach, I would like to propose an alternative which I believe also addresses this issue. What do you think of this? Thanks, Andrew --- commit b6d59ad650cfc552487c82a4eef49442b0642bca Author: Bruno Larsen via Gdb-patches Date: Thu Oct 13 18:01:15 2022 +0200 gdb/testsuite: allowed for function_range to deal with mangled functions When calling get_func_info inside a test case, it would cause failures if the function was printed using a C++ style mangled name. Fix this by asking the disassembler to demangle symbols. diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp index 593f4ea72f1..17faf06992e 100644 --- a/gdb/testsuite/lib/dwarf.exp +++ b/gdb/testsuite/lib/dwarf.exp @@ -400,7 +400,7 @@ proc function_range { func src {options {debug}} } { if { $func_length != 0 } { set func_pattern "$func_pattern\\+$func_length" } - set test "x/2i $func+$func_length" + set test "with print asm-demangle on -- x/2i $func+$func_length" gdb_test_multiple $test $test { -re ".*($hex) <$func_pattern>:\[^\r\n\]+\r\n\[ \]+($hex).*\.\r\n$gdb_prompt $" { set start $expect_out(1,string)