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 1F2B43858CDB for ; Fri, 28 Apr 2023 17:33:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1F2B43858CDB 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=1682703187; 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=PPJpyiL6d5aQKvD8KvkeVJfj0PWPZFtMLdb2QtXfB0s=; b=XuXndETrSnUGTIN6CAbpbgYUwEeZj0WcVGzw8EHPIGKh4r3CBkkhQRR0xLMNVXHRflPsoE 2kM/1XHigYm9S4jQpK93PiXIxAkrah+qlgoRxzYLSNW5q0URGoGQdi8tbSWtF1MC7leRC6 gPhdbEBWiuiK7tRGFPDQHZBFd+9fXGc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-587-1hvZ_WfxNEeaNIc76vgqNQ-1; Fri, 28 Apr 2023 13:33:04 -0400 X-MC-Unique: 1hvZ_WfxNEeaNIc76vgqNQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 25B68886464; Fri, 28 Apr 2023 17:33:04 +0000 (UTC) Received: from [10.22.9.236] (unknown [10.22.9.236]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D9126492C14; Fri, 28 Apr 2023 17:33:03 +0000 (UTC) Message-ID: <2a32a2c2-1fd5-3248-9ec9-36c1edb359f4@redhat.com> Date: Fri, 28 Apr 2023 10:33:03 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] gdb/record-full: disable range stepping when resuming threads To: Simon Marchi , gdb-patches@sourceware.org References: <20230427185407.203300-1-simon.marchi@efficios.com> From: Keith Seitz In-Reply-To: <20230427185407.203300-1-simon.marchi@efficios.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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=-11.7 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,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 4/27/23 11:54, Simon Marchi via Gdb-patches wrote: > I see these failures, when running with the native-gdbserver of > native-extended-gdbserver boards: > > Running /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.reverse/finish-reverse-next.exp ... > FAIL: gdb.reverse/finish-reverse-next.exp: reverse next 1 LEP from function body > FAIL: gdb.reverse/finish-reverse-next.exp: reverse next 2 at b = 5, from function body > FAIL: gdb.reverse/finish-reverse-next.exp: reverse next 1 GEP call from function body > FAIL: gdb.reverse/finish-reverse-next.exp: reverse next 2 at b = 50 from function body > Thank you for the explanation. It was simple enough for me to understand. :-) > --- > gdb/record-full.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/gdb/record-full.c b/gdb/record-full.c > index 15c5b7d682ed..026c309b674c 100644 > --- a/gdb/record-full.c > +++ b/gdb/record-full.c > @@ -1094,6 +1094,13 @@ record_full_target::resume (ptid_t ptid, int step, enum gdb_signal signal) > /* Make sure the target beneath reports all signals. */ > target_pass_signals ({}); > > + /* Disable range-stepping, forcing the process target to report stops for > + all executed instructions, so we can record them all. */ > + process_stratum_target *proc_target > + = current_inferior ()->process_target (); > + for (thread_info *thread : all_non_exited_threads (proc_target, ptid)) > + thread->control.may_range_step = 0; > + > this->beneath ()->resume (ptid, step, signal); > } > } This makes sense to me, and I've also regression tested it here and detected no problems. [You likely have, too, but it's my habit to test (a lot).] Keith