From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0CrlBpmqBWbKwhkAWB0awg (envelope-from ) for ; Thu, 28 Mar 2024 13:36:25 -0400 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=Ebiowt7s; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 177FC1E0C0; Thu, 28 Mar 2024 13:36:25 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 0208B1E030 for ; Thu, 28 Mar 2024 13:36:23 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 745CB385842D for ; Thu, 28 Mar 2024 17:36:22 +0000 (GMT) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by sourceware.org (Postfix) with ESMTPS id EA1A23858D1E for ; Thu, 28 Mar 2024 17:35:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EA1A23858D1E 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 EA1A23858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711647362; cv=none; b=sabJB593yzZZFR8rmZbTDTCwohmKSKbmyJSGi0itf3+YdqkW8RygKNXDBTygZ/JAjsb/CAfI9jTGiAkwxi6daj71NQILOh47Odf0BE7Y3V9T9xPQTAlp6MEw9P/4/YXueJbyzIxDjoP0lfGNIt6Z39HtaXGpkIr51WQ7IiMzQWk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711647362; c=relaxed/simple; bh=42ejNCxybUsZKBp+xaLOjw+Z47mau2XqlNHnKQEdcxA=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Bhdf8gs3iYeyuIfuMO0geJedLhxRpMBC1t03q8kIAdw4Tfd4HvCWr4Ts7pJtKRaDEEkCFbSgBJuTmTZTh9T+NMi9B1sZ4goo+xeDj3NaayavYNlxzLkHosMSYxjrxH5ToiIPUGh8mfUZB7ZXTaB1B6dp3xZNoffHSzX/CoRSYow= 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=1711647359; x=1743183359; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=42ejNCxybUsZKBp+xaLOjw+Z47mau2XqlNHnKQEdcxA=; b=Ebiowt7sq3gwKK4t3ws4+FIiDYwKw9wzHoCvO7eqWtHgUituHJQWM9Tu AhxdoRw3UUDADRw1eJyBVEMWctDnBcthk6XlMG0WfewNISr4mTw3ZHR+o W3SuLgj3jFg5xc/bl801dC8aC+G2f16O7kyUdhfljVwdNmNtKbh1BwAz2 TZH6/OqK5L4MD7/pDAbg/14WEI4ghgX4YZRLG0caWLLKSAoIkLF0wV0KF vgC9nSu47Yk9leY8I6owaVAkT20D9ceM79tnJfiI/HQHiD4AAGRRcUjQV tWqvvWlJsxF5mMlWyrdeWKGCW/wQEDRwNmO9y0CGlcrQWXjfycbHotZSF w==; X-CSE-ConnectionGUID: Hhfm/HJAT5WP4A3jOsdakw== X-CSE-MsgGUID: phsKhMe4RACMiZwxsw595Q== X-IronPort-AV: E=McAfee;i="6600,9927,11027"; a="29302303" X-IronPort-AV: E=Sophos;i="6.07,162,1708416000"; d="scan'208";a="29302303" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2024 10:35:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,162,1708416000"; d="scan'208";a="17354454" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2024 10:35:58 -0700 From: Tankut Baris Aktemur To: gdb-patches@sourceware.org Subject: [PATCH 2/3] gdb: boolify thread_info's 'stop_requested' field Date: Thu, 28 Mar 2024 18:35:36 +0100 Message-Id: <20240328173537.2679010-2-tankut.baris.aktemur@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240328173537.2679010-1-tankut.baris.aktemur@intel.com> References: <20240328173537.2679010-1-tankut.baris.aktemur@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, 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 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 Boolify the field. The 'set_stop_requested' function was already taking a bool parameter, whose value is assigned to the field. --- gdb/gdbthread.h | 2 +- gdb/infcmd.c | 2 +- gdb/infrun.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h index 11c553a99ca..02ff50afcd9 100644 --- a/gdb/gdbthread.h +++ b/gdb/gdbthread.h @@ -530,7 +530,7 @@ class thread_info : public intrusive_list_node, struct target_waitstatus pending_follow; /* True if this thread has been explicitly requested to stop. */ - int stop_requested = 0; + bool stop_requested = false; /* The initiating frame of a nexting operation, used for deciding which exceptions to intercept. If it is null_frame_id no diff --git a/gdb/infcmd.c b/gdb/infcmd.c index ac41ebf11b4..68ecdb9feba 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -2879,7 +2879,7 @@ stop_current_target_threads_ns (ptid_t ptid) all-stop mode, we will only get one stop event --- it's undefined which thread will report the event. */ set_stop_requested (current_inferior ()->process_target (), - ptid, 1); + ptid, true); } /* See inferior.h. */ diff --git a/gdb/infrun.c b/gdb/infrun.c index bbb98f6dcdb..c0ebc95a061 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1284,7 +1284,7 @@ follow_exec (ptid_t ptid, const char *exec_file_target) /* The user may have had the main thread held stopped in the previous image (e.g., schedlock on, or non-stop). Release it now. */ - th->stop_requested = 0; + th->stop_requested = false; update_breakpoints_after_exec (); @@ -3079,7 +3079,7 @@ clear_proceed_status_thread (struct thread_info *tp) tp->control.step_stack_frame_id = null_frame_id; tp->control.step_over_calls = STEP_OVER_UNDEBUGGABLE; tp->control.step_start_function = nullptr; - tp->stop_requested = 0; + tp->stop_requested = false; tp->control.stop_step = 0; @@ -5455,7 +5455,7 @@ handle_one (const wait_one_event &event) if (t == nullptr) t = add_thread (event.target, event.ptid); - t->stop_requested = 0; + t->stop_requested = false; t->set_executing (false); t->set_resumed (false); t->control.may_range_step = 0; @@ -5695,7 +5695,7 @@ stop_all_threads (const char *reason, inferior *inf) infrun_debug_printf (" %s executing, need stop", t->ptid.to_string ().c_str ()); target_stop (t->ptid); - t->stop_requested = 1; + t->stop_requested = true; } else { -- 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