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 CDCCF3858C2D for ; Mon, 20 Feb 2023 16:48:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CDCCF3858C2D 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=1676911727; 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=OMH2JGq5ZYo31jMKpaedaA7Qpi9XzXQZumTxnv6V/Jc=; b=IH6GEh5KgugB2Iwucp+Jr7TXUw1zRE70J/I7vGg4dh71mOZo4+jkNG89i+TfDTO3G4yji0 qIB16XbHxh+U+RtX15ZRxrsjFT1e5Zr33pFhBkdT86MN/mZyfQRXDME/APUqYDaitBDNaq WNcq8s4oAzaBjYS1z6JxMsj5gejDP6A= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-214-BXMNwnP3Mz-036rLReBhVQ-1; Mon, 20 Feb 2023 11:48:44 -0500 X-MC-Unique: BXMNwnP3Mz-036rLReBhVQ-1 Received: by mail-wm1-f72.google.com with SMTP id z6-20020a05600c220600b003e222c9c5f4so902369wml.4 for ; Mon, 20 Feb 2023 08:48:44 -0800 (PST) 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=OMH2JGq5ZYo31jMKpaedaA7Qpi9XzXQZumTxnv6V/Jc=; b=lbG3W0ApSp4ej2FkWv0m8mh83gD8fUCVgzxLiyuQID6+wUwQQgkKMi4vzyOHyMR98X YtFRq9MVZBQnIQZi/DUjsuYPHGUCOJtX5tT71frIv7bpVixc3+ZjfQ2wktev4NiA70Ra YWm0/bLTreoM+SUe/VqDyjVzij4yVeYU7McbwXZoZuo//Rr6qeGk+LGjc7rhV+yPTTWi I+krS09Ead0heC5tN+NwoIcJys4ib/PfNdf/FpAhdoQSe7A6A2bC0rQz9JdKqhSiURoc vZa5QbYlRecyVQpGznZIrLtH/awayAezOjeXlmNv3bA6bxIYW0gg1LYoqSz0qEa6h7NP JGKg== X-Gm-Message-State: AO0yUKX6eAXQM2I6sXsD4V0knJo+kSNGxihSAk9GH/lY5DVevXDthtYT 0PUa5amzUT+K651UARJ3uWZAgBVXyMITTZlIFqJxa7FaGLzTOZRrttlgPDW0hSFj2zoZNOHHsHr 8/UPub13GbuEpBXqKOZ4zdcnU8gs= X-Received: by 2002:a05:6000:104:b0:2c5:519d:7993 with SMTP id o4-20020a056000010400b002c5519d7993mr1359910wrx.27.1676911722680; Mon, 20 Feb 2023 08:48:42 -0800 (PST) X-Google-Smtp-Source: AK7set/fRlZHH7h3Rm06cE3MoKkwCCngZdgVzNKARnbNGVD+VbEpBTx931EfETO/PBbbZk7tpIsXTg== X-Received: by 2002:a05:6000:104:b0:2c5:519d:7993 with SMTP id o4-20020a056000010400b002c5519d7993mr1359893wrx.27.1676911722414; Mon, 20 Feb 2023 08:48:42 -0800 (PST) Received: from [192.168.0.45] (ip-94-112-225-44.bb.vodafone.cz. [94.112.225.44]) by smtp.gmail.com with ESMTPSA id y16-20020a5d4710000000b002c3e3ee7d1asm6362778wrq.79.2023.02.20.08.48.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Feb 2023 08:48:42 -0800 (PST) Message-ID: Date: Mon, 20 Feb 2023 17:48:40 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH ] PowerPC: fix for gdb.reverse/finish-precsave.exp and gdb.reverse/finish-reverse.exp To: Carl Love , Ulrich Weigand , "gdb-patches@sourceware.org" , "tdevries@suse.de" , "pedro@palves.net" References: <78b464a1-e32e-c3da-85e4-7bfc322cc29f@redhat.com> <7848e9858b54e33e399b871774ffc0b5058c1736.camel@us.ibm.com> <65d44121-65f7-a212-79ec-07ce53c15ecb@suse.de> <9fe94c0979cb40979b0dea7693a901c2d9f66164.camel@us.ibm.com> <59417813-eb4a-baf8-4e5d-e225d6732f71@suse.de> <7a494157-494f-6adf-d533-bf373b0f054f@redhat.com> <71aa635593df0677811afb85409aa190bcfa4f6a.camel@us.ibm.com> <15864a6b87b25c93e99a28149f23138267735f2a.camel@us.ibm.com> <041f62e9f26fd4a536bc90c34f072985582e6237.camel@de.ibm.com> <971cb4e330db3bd8bd728f2f2c3036ee0ec8a26d.camel@us.ibm.com> From: Bruno Larsen In-Reply-To: <971cb4e330db3bd8bd728f2f2c3036ee0ec8a26d.camel@us.ibm.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=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no 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 20/02/2023 17:34, Carl Love wrote: >>> + if (execution_direction == EXEC_REVERSE >>> + && ecs->event_thread->control.proceed_to_finish) >>> + { >>> + /* We are executing the reverse-finish command. */ >>> + if (ecs->event_thread->stop_pc () >= ecs- >>>> stop_func_alt_start >>> + && ecs->event_thread->stop_pc () < ecs->stop_func_start >>> + && ecs->stop_func_alt_start != ecs->stop_func_start) >> This third condition seems redundant: if stop_pc is >= func_alt_start >> *and* < func_start, then func_alt_start cannot be equal func_start. > Yes, on Powerpc the third condition is redundant. However, on other > platforms, specifically X86, the third condition is always false which > ensures the if statement is false. This is important on the tests > gdb.btrace/tailcall-only.exp and gdb.btrace/tailcall.exp which only run > on X86. The tests call the up command which will satisfy conditions 1 > and 2 and thus do an "extra" step command resulting in a test failure. > The third condition ensures that we never execute an additional > reverse-step unless the platform supports multiple entry points and we > are at the alternate entry point. I can see where this is not obvious > at first glance. I added a comment to the if statement explaining the > need for the apparent redundancy. But it is always redundant, even on x86. If the stop_func_start is A, there is no way the stop_pc can be simultaneously larger or equal to A, and strictly smaller than A. The only way the third condition would make a difference is if the second condition was `ecs->event_thread->stop_pc () <= ecs->stop_func_start` -- Cheers, Bruno