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 40C423858D20 for ; Fri, 28 Jul 2023 13:20:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 40C423858D20 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=1690550408; 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=vXc4FW5YwBJV/dKMt3jpl0lpj0/v+FwLyF3GguJe9BE=; b=BIUhOr4v8+Grw/u1BYmBoeYLLor/dJyrfKqQgWRQG1I5CHLdIQMJNldTH7BkKQcUG0Rvuw oKpNs+fpoAHTAJcV9ACCuLJQxiA6z9t/r8zCruj4I35wmoxfr9mHaMmA6rPY1VeCaXbUXG JYCzCGoqIOE474C1Til95nh7e3Qk+D0= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-677-TtwVrM9SP5aC0_AokLY6Rw-1; Fri, 28 Jul 2023 09:20:07 -0400 X-MC-Unique: TtwVrM9SP5aC0_AokLY6Rw-1 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-63d245b67abso23217076d6.3 for ; Fri, 28 Jul 2023 06:20:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690550406; x=1691155206; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vXc4FW5YwBJV/dKMt3jpl0lpj0/v+FwLyF3GguJe9BE=; b=TfmDLlzYrrGp5VFtPOp8GaKU2GrLzOfimqJ1Sc42k5dJ1RcZCQnDqukP3arS9G4u8A MNkZ2xHSCMMWd/YRgMcSXIs3Wi76erQVTPOLa0AFLiJyXWALaaYf6nTyBC3nfoiJealG N3P6Iwnr9yORry74uY2YOJlA17JhmVL0jz60Or6KmORuk8J3Wq9Xa1mPChgJJ9uhtzGE i0/YPeWC8Puy56lgfP8voAGY36YFHc+IZuPts/ZpYbodkJ5QEHEuW4NKha1jtapLjpSl s123Ys9lyIc1yZeT23KTvx22sVWcjL/Vu5La8Os3fOTzb/I82ojNDqudlhddzR9JFAi1 mq2g== X-Gm-Message-State: ABy/qLZlOHvqgfkgrgnXpW3pp5ys5FN0Q+R9kPbH16N1IpcmpGwo+BNf Z3+5Rf9lW6TNoOGNOAFpXYBVD5MMQtzjeIb7ydHIPX/YvnRJz4z4r3r5/OxLJxP+S7pvPFTP+sI FI4/1Fxovt3wxigSCqoOBnTrNl4BBkA== X-Received: by 2002:a0c:e44f:0:b0:63d:472c:a187 with SMTP id d15-20020a0ce44f000000b0063d472ca187mr1700816qvm.47.1690550406084; Fri, 28 Jul 2023 06:20:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlF1/wjrPEtopmlKguLOIJO12R59E5tjP9rdYXTM+TPTYn2+XfKvYRn71UnpLo/3n+xOmjueKw== X-Received: by 2002:a0c:e44f:0:b0:63d:472c:a187 with SMTP id d15-20020a0ce44f000000b0063d472ca187mr1700802qvm.47.1690550405764; Fri, 28 Jul 2023 06:20:05 -0700 (PDT) Received: from [192.168.0.129] (ip-94-112-225-44.bb.vodafone.cz. [94.112.225.44]) by smtp.gmail.com with ESMTPSA id o8-20020a0ccb08000000b00631fea4d5bcsm1216081qvk.95.2023.07.28.06.20.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Jul 2023 06:20:05 -0700 (PDT) Message-ID: Date: Fri, 28 Jul 2023 15:20:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v2 3/4] gdb/testsuite: fix testing gdb.reverse/step-reverse.exp with clang To: Tom Tromey , Bruno Larsen via Gdb-patches References: <20230725095833.236804-1-blarsen@redhat.com> <20230727074118.1583199-1-blarsen@redhat.com> <20230727074118.1583199-4-blarsen@redhat.com> <873518i3ey.fsf@tromey.com> From: Bruno Larsen In-Reply-To: <873518i3ey.fsf@tromey.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=-9.9 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_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,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 List-Id: On 28/07/2023 15:14, Tom Tromey wrote: >>>>>> "Bruno" == Bruno Larsen via Gdb-patches writes: > Bruno> It also adds a new parameter to get_hexadecimal_valueof, so that we can > Bruno> use it without generating new passes, otherwise we'd get multiple > Bruno> duplicate test names. This change shouldn't affect any other test using > Bruno> this proc. > > You can just pass different test names instead. I mean, yeah I can, but since it is in a loop, the differences would only be a counter at the end of the test case. Are we really getting any value from that? To me it seems like it would just boggle down the sum file with meaningless "tests" that aren't exercising any relevant code paths. I can do it if you disagree, though, it isn't a big deal. One thing I did think of was that I should test for default value when getting the PC, to make sure that we didnt get a valid PC at first, then started getting "no registers" or similar. I'll have that on v3 -- Cheers, Bruno > > Bruno> +proc get_current_pc {} { > Bruno> + set pc 0 > Bruno> + gdb_test_multiple "print \$pc" "" { > Bruno> + -re -wrap ".*0x(\[0-9a-f\]+).*" { > Bruno> + set pc $expect_out(1,string) > Bruno> + } > Bruno> + } > Bruno> + return $pc > > It seems to me that this shouldn't be needed. > > Bruno> diff --git a/gdb/testsuite/gdb.reverse/step-reverse.exp b/gdb/testsuite/gdb.reverse/step-reverse.exp > Bruno> index 4b78a8f8fb7..9ff97bfde42 100644 > Bruno> --- a/gdb/testsuite/gdb.reverse/step-reverse.exp > Bruno> +++ b/gdb/testsuite/gdb.reverse/step-reverse.exp > Bruno> @@ -28,6 +28,16 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } { > Bruno> return -1 > Bruno> } > > Bruno> +proc get_current_pc {} { > Bruno> + set pc 0 > Bruno> + gdb_test_multiple "print \$pc" "" { > Bruno> + -re -wrap ".*0x(\[0-9a-f\]+).*" { > Bruno> + set pc $expect_out(1,string) > Bruno> + } > Bruno> + } > Bruno> + return $pc > > Same with this one. > > Tom >