From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by sourceware.org (Postfix) with ESMTPS id 3FB3A3858C52 for ; Thu, 18 Apr 2024 07:37:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3FB3A3858C52 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 3FB3A3858C52 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713425830; cv=none; b=QfriNQbJvhG3K43H/RF7F8yFecDAmlUf87SZ6VTH2vZiioqILsX+jz9Ugsa3LjthqDpYXpyk5bkTIslwJRhnqCjo6C0KNgI9VZJzaavtOHdXL6Zg0Z6BZX8WqoE6fdM9JZ4qXEkItJocu/Mg2l5n1T60r2Ufjs/yElRmlPt3b0g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713425830; c=relaxed/simple; bh=40Kyc4vya/vstjYGI/2hFM1QcZoKU4N6GyyM8SqH1L8=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Zw/RelWneJ/fSI51Dt8BU3fUV4FshWPpcowVZ7JsqnXCxbNSrR97N351Cf7C8CWwiQd9MLRiRQYT2y3z+4kDCklJp0Q8Alp4jriqJhLgaFda04CChAIGgw4Fd93C3RuFOluKa92jPqnwn7NcTM2GFpSJhhlBdZoW8d7VHab0znk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713425828; x=1744961828; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=40Kyc4vya/vstjYGI/2hFM1QcZoKU4N6GyyM8SqH1L8=; b=Ca8CcAXcJMahbZhDpsAQ7sHiHaTreqLu0NiAJXrvGleOMOWk06wDSFA+ 71ttHPDBgVXWf4e9X2OKPmMSAvC+vCCLdxRZKuUam/Fxvo1DACJx2g2dZ 3c5ugHQIL2WLFtlNgH7EV45Ns7Z5Z5/5vUTOtEbcERbmBfmnrvwD1Mjpq wnghNhDzRHztHmtAEAyaxOlRNgivW7c+HJ88/9Gj7xTErH8UypnwdNZNS WMdPO/EbnSFqWiMM5tka4M/XAxZmzcFMoxnCoX/UlpJkNN3mFzx6hG1ES bvr7vEfa62Ovc2eaR6ZrDO2q2SifpMBxW7ONRPhPP+OK135cyWphjRUX6 g==; X-CSE-ConnectionGUID: gmYCR25nQmCapbTSyyB8Hw== X-CSE-MsgGUID: //x0kMjVTEqWFvYWl3b6DA== X-IronPort-AV: E=McAfee;i="6600,9927,11047"; a="19561435" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="19561435" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2024 00:37:06 -0700 X-CSE-ConnectionGUID: 7eCvgaWmTjG1K3e2UKvp4g== X-CSE-MsgGUID: xpSPqqUlTAW8GUPXtv613w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="27520262" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2024 00:37:05 -0700 From: Tankut Baris Aktemur To: gdb-patches@sourceware.org Subject: [RFC 0/3] Wait for inferior after attaching Date: Thu, 18 Apr 2024 09:36:35 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.8 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE,TXREP 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: Hello, The second patch of this series uses 'wait_for_inferior' to wait for events right after attaching to a process, instead of using the main event loop for events and the inferior continuations to finish the inferior setup. I explain some existing problems in Patch 2 and propose 'wait_for_inferior' as a potential solution. I'd like to post this as an RFC because the inferior continuations are elegant and eliminating their use makes me think that I'm missing something. However, it may also be the case that since the time continuations were introduced and used, GDB has evolved significantly and the original motivation is perhaps no longer there. The attach and remote-target start flows are the only places they are used. Regards, Baris Tankut Baris Aktemur (3): gdb: print target in print_target_wait_results gdb: wait for inferior after attaching instead of adding a continuation gdb: remove inferior continuations gdb/inf-loop.c | 5 ----- gdb/infcmd.c | 24 +++++++++++------------- gdb/inferior.c | 19 ------------------- gdb/inferior.h | 11 ----------- gdb/infrun.c | 38 ++++++++++++++++++++++++-------------- gdb/infrun.h | 12 +++++++++++- gdb/remote.c | 2 +- 7 files changed, 47 insertions(+), 64 deletions(-) -- 2.34.1 Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928