From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yFtJC8wPtWBPPgAAWB0awg (envelope-from ) for ; Mon, 31 May 2021 12:33:16 -0400 Received: by simark.ca (Postfix, from userid 112) id 2C7A21F163; Mon, 31 May 2021 12:33:16 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=MAILING_LIST_MULTI, RDNS_DYNAMIC autolearn=unavailable autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C07E21E54D for ; Mon, 31 May 2021 12:33:15 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6A6783857C5F; Mon, 31 May 2021 16:33:15 +0000 (GMT) Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2610:1c1:1:606c::19:2]) by sourceware.org (Postfix) with ESMTPS id 56A873857C5F for ; Mon, 31 May 2021 16:33:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 56A873857C5F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=jhb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 63C7D97055; Mon, 31 May 2021 16:32:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fv16Y1qbJz4Sqd; Mon, 31 May 2021 16:32:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:356c:7359:993:ef34]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id D81E7200BE; Mon, 31 May 2021 16:32:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: [PATCH] Conditionally restore displaced stepping state after fork. From: John Baldwin To: gdb-patches@sourceware.org References: <20210531161558.10600-1-jhb@FreeBSD.org> Message-ID: Date: Mon, 31 May 2021 09:32:35 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210531161558.10600-1-jhb@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Simon Marchi Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 5/31/21 9:15 AM, John Baldwin wrote: > diff --git a/gdb/infrun.c b/gdb/infrun.c > index e9624d2a9b..6fd077796f 100644 > --- a/gdb/infrun.c > +++ b/gdb/infrun.c > @@ -5496,7 +5496,8 @@ handle_inferior_event (struct execution_control_state *ecs) > /* If this is a fork (child gets its own address space copy) and some > displaced step buffers were in use at the time of the fork, restore > the displaced step buffer bytes in the child process. */ > - if (ecs->ws.kind == TARGET_WAITKIND_FORKED) > + if (ecs->ws.kind == TARGET_WAITKIND_FORKED > + && gdbarch_supports_displaced_stepping (gdbarch)) > gdbarch_displaced_step_restore_all_in_ptid > (gdbarch, parent_inf, ecs->ws.value.related_pid); This appears to be a regression from 187b041e2514827b9d86190ed2471c4c7a352874 where previously stepping was only cleared from a single thread if it had a stepping buffer (which implicitly was only true if the gdbarch supported displaced stepping). -- John Baldwin