From patchwork Mon May 18 18:32:57 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Bouhaouel, Mohamed" X-Patchwork-Id: 135220 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 879EF4BA9017 for ; Mon, 18 May 2026 18:34:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 879EF4BA9017 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Iv3j4N5y X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by sourceware.org (Postfix) with ESMTPS id 632A64BB24E7 for ; Mon, 18 May 2026 18:33:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 632A64BB24E7 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 632A64BB24E7 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779129227; cv=none; b=VFWOiQS+8a/7TZwMlcD8k2pKiY64ZIt2HxyJoNu8BwPO8H4kOtlvct0JKAzgIKRYIqcJ6hX6ILlSiSyGMW1nmDegiO747iUr5sPWwcj7fUQ2w/3acW7mtkbsfJiQQmTaZQmAXEdxOPDZRx7npyxR+GgGZzUVNdzGT3D8vlCtz+4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779129227; c=relaxed/simple; bh=jD2cv5T94J42ZDOgOBAIJky+qT92Ovt5QMu9ui2zqfg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ZYWPXZ5LgPLLLoj30pIKqc73+RhdAKQojNEZapYHcqQ4vK30315eeBkgUZxxa+A4Wh6YMnlD7a3g8ed/CABcO1J1DQ2Ix/ovMEUZLQS+Fm8MT/4t+Bk+hP+typ5gA1NNLpyOaJQLrWKmS1UrSES9x97sZ/doHsm5ECA9CKOJwfk= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Iv3j4N5y DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 632A64BB24E7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1779129227; x=1810665227; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jD2cv5T94J42ZDOgOBAIJky+qT92Ovt5QMu9ui2zqfg=; b=Iv3j4N5ykJ3Xb4BssS2RRZ++QagMad3faAFzdkvTfGCobN70YquvD0cj xb5tR29+yLqNt0+tRq3HKQD0xZ+wLo4agC6+Wk0UobpiYM7hbDMLVFufT 01yrsEuIb8ZEBq1x7qkwvq0aYfK2yolFo1bla30Ea2TTjZ5iaahMMrG98 7gyk3wQHGIiOg9j5uHJtjwFCIj86FRcqHx0fTHvJC8JfpHM73JU24DU4v gmTuFSUbWh/F1o5443eVpM7C8SITEIJrS6sXk3lWqsNqbZQdCa5Qfj0ef fHfceU4jUNBBg17BHPzBP3uUZ5EZiHfh8B7fCESWEyThca6/qHiXOuBf7 Q==; X-CSE-ConnectionGUID: fJO0lTkgSZ6fYT90YEcABw== X-CSE-MsgGUID: 5A3lgmQjQa2JfmPcrCKzzQ== X-IronPort-AV: E=McAfee;i="6800,10657,11790"; a="83849752" X-IronPort-AV: E=Sophos;i="6.23,242,1770624000"; d="scan'208";a="83849752" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2026 11:33:47 -0700 X-CSE-ConnectionGUID: NwG383t0R1iI7nlxJSnvVQ== X-CSE-MsgGUID: UQiT7hUkSsKipkJ/sG+ZCw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,242,1770624000"; d="scan'208";a="238681073" Received: from cwhite-mobl.ger.corp.intel.com (HELO localhost) ([10.245.114.180]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2026 11:33:45 -0700 From: Mohamed Bouhaouel To: gdb-patches@sourceware.org Cc: mohamed.bouhaouel@intel.com, stephan.rohr@intel.com, markus.t.metzger@intel.com Subject: [PATCH 01/11] gdb, record: fix assertion when remote target is set to non-stop Date: Mon, 18 May 2026 20:32:57 +0200 Message-ID: <20260518183316.127043-2-mohamed.bouhaouel@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260518183316.127043-1-mohamed.bouhaouel@intel.com> References: <20260518183316.127043-1-mohamed.bouhaouel@intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org From: Markus Metzger When forcing the remote target to non-stop via 'maint set target-non-stop on', reverse tests start failing with (gdb) .../gdb/remote.c:7561: internal-error: resume: Assertion `scope_ptid == inferior_ptid' failed. This is caused by the record-full target doing one additional step after receiving a single-step trap event. That additional step is done on the wait ptid instead of on the event ptid. Fix it. --- gdb/record-full.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdb/record-full.c b/gdb/record-full.c index 69d2c100e57..fbb45c84931 100644 --- a/gdb/record-full.c +++ b/gdb/record-full.c @@ -1290,7 +1290,8 @@ record_full_wait_1 (struct target_ops *ops, "Process record: record_full_wait " "issuing one more step in the " "target beneath\n"); - ops->beneath ()->resume (ptid, step, GDB_SIGNAL_0); + ops->beneath ()->resume (inferior_ptid, step, + GDB_SIGNAL_0); proc_target->commit_resumed_state = true; proc_target->commit_resumed (); proc_target->commit_resumed_state = false;