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 0E384384640C for ; Thu, 18 Apr 2024 07:37:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0E384384640C 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 0E384384640C 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=1713425851; cv=none; b=xdHcObYLEbhIcdqGEnc6iTrVo/xmpVEKFRTWcsf0OxkFcSYaBy/q/k3Ut+29el/hvk3QICC8M5mnip9klLUXFObnFu+AI2kuoSQpzb/B9fgNA3F9zGfDmRxgoO1exGN1Pz5iuJoV8YCpk4aTvzYg9oM0UbxsDQwV5nBtgYcIHHg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713425851; c=relaxed/simple; bh=8QlfGcpIwo54rrxAp+XRZsI/At33BwP806qkK3LcOqM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=pUAhN/01K/ZWaK7u3aiNM0hflINcN4jdZvxJn+bSWq5PHNuJROqq1Dzs11zAF5AiIOk6iBxj+Le1yJkD2cugl6QL3Qj9Xrrg6+jJo9MMWb5itFx8FpWKpbH5ILAAHazT6gSQoZmuZXe1hAJoHff+wTgvYRtmGf4T0QRhoPuYGOs= 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=1713425846; x=1744961846; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=8QlfGcpIwo54rrxAp+XRZsI/At33BwP806qkK3LcOqM=; b=WO61pwY9wXhGyJ0IJkYC9WqqQrAk/+9l0w9SrHGZ4iqAz1wz3hnOEBKp t9nnQSoH0Ilzw+ucyWXFd5MX53jIALOAutgZW+O6jMa3iNoi0W/wrwohB xqJFe0MVQ5qO27Y0SA3c2XIYohMtBJu+jbxGORJwrzEavYtmy9IUa/+xE dju/gst78dYm8xXMI1h2HhWT9xRuBe3pRtd04c4rmwPid6CjNoveY+BfX 7muIjIRJobvWV/6dVl7IAhk0qaFjrb78HS98C31ihyNBnXoQiXPWEVv8+ cPUFoMSMBlCjtmtbpZAtQnGBEzbGoKclT5QpRxCg5dkRullW0mbIemST7 g==; X-CSE-ConnectionGUID: hmcAuHolTUCwZzwsIUrLFA== X-CSE-MsgGUID: HEfOEGnJRY+7rZm6FFQlxg== X-IronPort-AV: E=McAfee;i="6600,9927,11047"; a="19561449" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="19561449" 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:25 -0700 X-CSE-ConnectionGUID: KvGIpKnzSkOu8E1INiTjJQ== X-CSE-MsgGUID: ndcoUPA1SMaAzo+yMvWv6Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="27520298" 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:24 -0700 From: Tankut Baris Aktemur To: gdb-patches@sourceware.org Subject: [RFC 3/3] gdb: remove inferior continuations Date: Thu, 18 Apr 2024 09:36:38 +0200 Message-Id: <2330c2b4329642ee66976b4b8d5ee8f1e4defc42.1713423838.git.tankut.baris.aktemur@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.9 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 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: Remove the continuation mechanism. It is not used anymore. --- gdb/inf-loop.c | 5 ----- gdb/inferior.c | 19 ------------------- gdb/inferior.h | 11 ----------- 3 files changed, 35 deletions(-) diff --git a/gdb/inf-loop.c b/gdb/inf-loop.c index 41e766095f0..3c31d0d2349 100644 --- a/gdb/inf-loop.c +++ b/gdb/inf-loop.c @@ -51,11 +51,6 @@ inferior_event_handler (enum inferior_event_type event_type) target_async (false); } - /* Do all continuations associated with the whole inferior (not - a particular thread). */ - if (inferior_ptid != null_ptid) - current_inferior ()->do_all_continuations (); - /* When running a command list (from a user command, say), these are only run when the command list is all done. */ if (current_ui->async) diff --git a/gdb/inferior.c b/gdb/inferior.c index 4e1d789d1ba..a42c79d6ce3 100644 --- a/gdb/inferior.c +++ b/gdb/inferior.c @@ -77,8 +77,6 @@ inferior::~inferior () that target, leaving its reference count artificially high. However, this is not critical as the dummy_target is a singleton. */ gdb_assert (m_target_stack.top ()->stratum () == dummy_stratum); - - m_continuations.clear (); } inferior::inferior (int pid_) @@ -184,23 +182,6 @@ inferior::set_arch (gdbarch *arch) registers_changed_ptid (proc_target, ptid_t (this->pid)); } -void -inferior::add_continuation (std::function &&cont) -{ - m_continuations.emplace_front (std::move (cont)); -} - -void -inferior::do_all_continuations () -{ - while (!m_continuations.empty ()) - { - auto iter = m_continuations.begin (); - (*iter) (); - m_continuations.erase (iter); - } -} - /* Notify interpreters and observers that inferior INF was added. */ static void diff --git a/gdb/inferior.h b/gdb/inferior.h index 7be28423aeb..2b2905b7576 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -499,14 +499,6 @@ class inferior : public refcounted_object, /* Delete all threads in the thread list, silently. */ void clear_thread_list (); - /* Continuations-related methods. A continuation is an std::function - to be called to finish the execution of a command when running - GDB asynchronously. A continuation is executed after any thread - of this inferior stops. Continuations are used by the attach - command and the remote target when a new inferior is detected. */ - void add_continuation (std::function &&cont); - void do_all_continuations (); - /* Set/get file name for default use for standard in/out in the inferior. On Unix systems, we try to make TERMINAL_NAME the inferior's controlling @@ -672,9 +664,6 @@ class inferior : public refcounted_object, /* The name of terminal device to use for I/O. */ std::string m_terminal; - /* The list of continuations. */ - std::list> m_continuations; - /* The arguments string to use when running. */ std::string m_args; -- 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