From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id dU2OC9ndBmvwsDwAWB0awg (envelope-from ) for ; Wed, 25 Nov 2026 08:08:41 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=d9jVU4qu; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 1647C1E09B; Wed, 25 Nov 2026 08:08:41 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 2D3381E09B for ; Wed, 25 Nov 2026 08:08:39 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2193040AE832 for ; Wed, 25 Nov 2026 13:08:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2193040AE832 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=d9jVU4qu Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by sourceware.org (Postfix) with ESMTPS id E72F84303C44 for ; Wed, 25 Nov 2026 13:08:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E72F84303C44 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 E72F84303C44 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=198.175.65.21 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1795612091; cv=none; b=MB6KgHkxqyS1yKOQABJsZZsA4BL7BcJTBIuMCJnRJoQyja44S5WhsHhz4/ax7IRX2E9pCNzToBazLJuVwv9zpmzbIJPIdlkoaiYEO4ZGNENzeoeJTenBpe8fFk2YV3QDB05f4NZQFTK2SvNFX/MJg9cH/yXyEiaZC/JIXkltomE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1795612091; c=relaxed/simple; bh=fvcwgsVszsZMZ2Gjv6dFeUo1iexTmn96e47bIFAXFxY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=aflOQFuJT+VkUyxqo2JT8yH5WnGBy7PSLqDVIiKh052zSNm0iYYJKcIMNbtt/b51/PNrXAD4aU8jNEJ6PyQ6pGQNmqwvgNZwAGLM06YwzYw9EHfQus2ly3M4Mpd4JRDJChZWZNV3VX9pwLV82lVWkxqXp3p8GHaabtNrtryKU+w= 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=d9jVU4qu DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E72F84303C44 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1795612091; x=1827148091; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=fvcwgsVszsZMZ2Gjv6dFeUo1iexTmn96e47bIFAXFxY=; b=d9jVU4quT8RV3Cl07ZXhgxBsmfi3uPt7sdITdAIibPLRsTdJ6X2jeBeU kDAU6QJAR61T7S255KjajliUsLlAEL4eAmpoXOaQCrB75PmTdqFPInvFC spo//TWI4Wsw8tMwhOgPVBT0/b8k4SKEMU+2Y1TuMCUg6dqJMuxi0NPIB IoG21cu+R1U8rNi1ExNEFNgqt21WmujtpJRWQHc2EdY34DpX3b1lgOEmu FSg1fAM9CoRlxBBXEF/fRsGF7BS8D2HtHe2jDGzBXmGoDRz71GloXysov 03w1mK4/IbsJFq7Xj9xAcCYiIHyM0+4HyiO1/NMfRQVs/RC5HKAINzn4J A==; X-CSE-ConnectionGUID: pSKPAur3TLWi8j9Q1B5prg== X-CSE-MsgGUID: VeEprLC6SeOk41jKNa9dwg== X-IronPort-AV: E=McAfee;i="6800,10657,11977"; a="4570996" X-IronPort-AV: E=Sophos;i="6.27,232,1787036400"; d="scan'208";a="4570996" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Nov 2026 05:08:09 -0800 X-CSE-ConnectionGUID: rPkwcsmZRZ+7ZkL1YSn2dw== X-CSE-MsgGUID: STSQCrUURfuQ7GxNbXsvrQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,232,1787036400"; d="scan'208";a="12002397" Received: from dut1048pvc.igk.intel.com (HELO localhost) ([10.211.177.228]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Nov 2026 05:08:08 -0800 From: Stephan Rohr To: gdb-patches@sourceware.org Subject: [PATCH v2 0/2] disable pagination for new inferior notification Date: Wed, 25 Nov 2026 13:08:00 +0000 Message-ID: <20261125130802.117043-1-stephan.rohr@intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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~public-inbox=simark.ca@sourceware.org Hi all, this got somewhat lost; I forgot to ping it or post a new version for a while. This is now v2 of the patch fixing an incomplete inferior when the "[New inferior ..]" notification paginates and the user answers "quit": (gdb) set width 10 (gdb) set height 1 (gdb) add-inferior [New infer--Type for more, q to quit, c to continue without paging--q Quit (gdb) set height unlimited The inferior's program space is not setup and triggers an assertion: (gdb) info inferiors gdb/progspace.c:329: internal-error: set_current_program_space: Assertion `pspace != NULL' failed. v1 was posted here: https://sourceware.org/pipermail/gdb-patches/2026-July/228328.html Patch 1 delays the new inferior notification until the inferior is properly set up. Patch 2 fixes the case if the user answers "quit" while following a fork: this would leave the inferior without a target and threads. Temporarily disable pagination when following a fork, similar to "fetch_inferior_event ()". Changes since v1: - Delay the new inferior notification instead of disabling pagination. - Remove "add_inferior" and replace with "add_inferior_silent ()" and "print_new_inferior ()". - Extend to the "clone-inferior" and follow-fork cases. Tested on x86_64 GNU/Linux with the unix, native-gdbserver and native-extended-gdbserver board files; there are no regressions. I appreciate your feedback. Thanks Stephan Stephan Rohr (2): gdb: delay the new inferior notification gdb: disable pagination while following a fork gdb/inferior.c | 26 +++--- gdb/inferior.h | 14 ++-- gdb/infrun.c | 18 +++- gdb/remote.c | 6 +- .../gdb.base/add-inferior-paginate.exp | 59 +++++++++++++ .../gdb.base/fork-inferior-paginate.exp | 83 +++++++++++++++++++ 6 files changed, 185 insertions(+), 21 deletions(-) create mode 100644 gdb/testsuite/gdb.base/add-inferior-paginate.exp create mode 100644 gdb/testsuite/gdb.base/fork-inferior-paginate.exp -- 2.43.0 ________________________________________ Intel Deutschland GmbH Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany Tel: +49 (89) 99143-0 www.intel.de Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman Chairperson of the Supervisory Board: Sonja Pierer Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.