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.129.124]) by sourceware.org (Postfix) with ESMTPS id 49E423858407 for ; Thu, 3 Nov 2022 15:46:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 49E423858407 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=1667490369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QUOjkuqDqNXRmvwSVYLYa8Sjs9t+qpwjI8gRIX5fM9o=; b=ItMSi5ErU/dw37NabmQdqxBDqP6ZdYaLyYzeehmpmSTZomzIzZjgMSChdPpnYtWjBABsbH u9MAksi/F0bf6BaIc7uTgJkZGlRophcARaaJhYf73FbhQFiOzDdDbYZQotYzllYq9Opohm xq6FGIFEEAjBQV+HcsXJL3nKFZTOPDA= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-25-xv0c2-MLMMuUCxnFsFtKgg-1; Thu, 03 Nov 2022 11:46:08 -0400 X-MC-Unique: xv0c2-MLMMuUCxnFsFtKgg-1 Received: by mail-wm1-f69.google.com with SMTP id o18-20020a05600c4fd200b003c6ceb1339bso2585580wmq.1 for ; Thu, 03 Nov 2022 08:46:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QUOjkuqDqNXRmvwSVYLYa8Sjs9t+qpwjI8gRIX5fM9o=; b=NsszwQMcGWGEHA/PYGNdWXbu5/6ums4GyOFJYVPtHFvFyueR8H6Xj76swqF6fJbeTs yaiw6eAVflVtW8n6Hg2NDyfg/zXV9KWui0Gy7gp4SInK98usX7qksB/Xsa4jXmJ5hoCr 7IvxB33OdB4VRzqa/WwWdE9vG2c7w8uHtHY7bTBwvbpUl4N+6QLGZcsu1VGy7H4dlxS0 EjJri+AGpC9Ay1WW2NX/iGuggDNqShk1/WnFOzyc0kbY+/Kua5eNDizUi0gAUYMElH57 eX9ik+jdR+Dhs1p0vmT53Iw3PvN6UHD3O1NAh8DbHyAjmnqdGBGkKPkd0A8caEWrh9e/ d3Eg== X-Gm-Message-State: ACrzQf3aKMxTK7VrORd7iifROyyOAY/aX4WFz2G5UlFGVlK65EQbLoj6 gVJYKfPnaGMzCg0rs/hqwKS/ko24yvM8/hVK5pUpiNIXkSiQKbpWG9KvmIVYUYwchJcbpTOoUcc nWFV4g+N6gmDHDk5RrLbyyw== X-Received: by 2002:a05:600c:4b27:b0:3cf:67ab:3ac6 with SMTP id i39-20020a05600c4b2700b003cf67ab3ac6mr18969243wmp.35.1667490367101; Thu, 03 Nov 2022 08:46:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6BSDUOmRx64bXzn2rJ5azb42l9PEh2gklQYIOnv1LFs4LbyW1QupI/vc/gZRG+igBfrxRRJA== X-Received: by 2002:a05:600c:4b27:b0:3cf:67ab:3ac6 with SMTP id i39-20020a05600c4b2700b003cf67ab3ac6mr18969232wmp.35.1667490366892; Thu, 03 Nov 2022 08:46:06 -0700 (PDT) Received: from [10.202.9.92] (nat-pool-brq-u.redhat.com. [213.175.37.12]) by smtp.gmail.com with ESMTPSA id c6-20020a05600c0ac600b003cf4eac8e80sm286255wmr.23.2022.11.03.08.46.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Nov 2022 08:46:06 -0700 (PDT) Message-ID: <0f035618-c071-b203-8985-d5db915c3224@redhat.com> Date: Thu, 3 Nov 2022 16:46:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH 1/2] gdb/testsuite: allowed for function_range to deal with mangled functions To: Andrew Burgess , gdb-patches@sourceware.org References: <20221013160114.4143323-1-blarsen@redhat.com> <20221013160114.4143323-2-blarsen@redhat.com> <874jvkcaq8.fsf@redhat.com> From: Bruno Larsen In-Reply-To: <874jvkcaq8.fsf@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,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: On 31/10/2022 15:46, Andrew Burgess wrote: > 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? This sounds like a much better approach. Everyday I'm learning about some new thing in GDB. Will send it like this on v2 Cheers, Bruno > 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) >