From patchwork Mon Oct 28 18:01:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 99719 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7D1E9385840F for ; Mon, 28 Oct 2024 18:02:03 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 3570F3858D20 for ; Mon, 28 Oct 2024 18:01:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3570F3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3570F3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=132.207.4.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730138496; cv=none; b=gP9H6JpniSZDy63F5c8u6lVpxZOYJWHo6ZAvH+bwcuNwc0ZRcXsFkeEuwlqsxo5GSq7DIqteMMSyKXrXCUqzRQUZQ+UCiHas6Ka+kKE/7+G0K+tLVvPgJGJjcq6NsOMlar1Vnk/EjJjZJTZTSt6PZbZWqU1rPLUtKJTGlZk7f/o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730138496; c=relaxed/simple; bh=otBaCiiELP3x4CbStotf5vN+DMZt42VrhGWtQzgRWv4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=fpj0amSCjX6euiRo8cgacZXBE2XIto4k1O9qqhcIIrXyAaCiwkXANmu5F9aVufnru88z45BaX3xb1cPdHPXWkSq+feGtp6rnmV79+1JRjYPzfc++R4AboLfauZRN1HwAuBDYRVmdEGQgLJG8DM5+fmMP9qDXMtBZSynIdnMWbcA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 49SI1JeO033025 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 28 Oct 2024 14:01:24 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 49SI1JeO033025 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1730138484; bh=GVY7l6ExlLBlfyP82WvEw5Dxnm/UJJWjdhHX/rdWfzM=; h=From:To:Cc:Subject:Date:From; b=qqrVAy93O2HF8X9t9ZCBy7QOI9Kql2UfsQ3/y5aTj2S+kTGNAUJZcJ7FhJv4Nr/6f qGF0JM19fmG9F3F7diBWanhhp8YbOG8bd1j7C3tWPJM6phDuJifJE1rdgxsCBMqF8g En0pXA3qkQFSJqHMV0o6muFe7bzMLYUTF+l9zbC4= Received: by simark.ca (Postfix, from userid 112) id 60B751E570; Mon, 28 Oct 2024 14:01:19 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-Spam-Level: X-Spam-Status: No, score=-3188.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 Received: from simark.localdomain (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (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 ESMTPSA id DB8DA1E37A; Mon, 28 Oct 2024 14:01:17 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [pushed 1/2] gdbserver: fix formatting in gdbthread.h Date: Mon, 28 Oct 2024 14:01:09 -0400 Message-ID: <20241028180115.115977-1-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 28 Oct 2024 18:01:19 +0000 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 Remove newlines after return type in declarations. Change-Id: I00c6f35e063024cf6674d532454b67e6d0d98a19 --- gdbserver/gdbthread.h | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) base-commit: 77f6ff446173ac7790f35d43de7d196a768c38b1 diff --git a/gdbserver/gdbthread.h b/gdbserver/gdbthread.h index adc5857abfd0..389bee103c04 100644 --- a/gdbserver/gdbthread.h +++ b/gdbserver/gdbthread.h @@ -104,35 +104,32 @@ struct thread_info *find_any_thread_of_pid (int pid); /* Find the first thread for which FUNC returns true. Return NULL if no thread satisfying FUNC is found. */ -thread_info * -find_thread (gdb::function_view func); +thread_info *find_thread (gdb::function_view func); /* Like the above, but only consider threads with pid PID. */ -thread_info * -find_thread (int pid, gdb::function_view func); +thread_info *find_thread (int pid, + gdb::function_view func); /* Find the first thread that matches FILTER for which FUNC returns true. Return NULL if no thread satisfying these conditions is found. */ -thread_info * -find_thread (ptid_t filter, gdb::function_view func); +thread_info *find_thread (ptid_t filter, + gdb::function_view func); /* Invoke FUNC for each thread. */ -void -for_each_thread (gdb::function_view func); +void for_each_thread (gdb::function_view func); /* Like the above, but only consider threads with pid PID. */ -void -for_each_thread (int pid, gdb::function_view func); +void for_each_thread (int pid, gdb::function_view func); /* Find the a random thread for which FUNC (THREAD) returns true. If no entry is found then return NULL. */ -thread_info * -find_thread_in_random (gdb::function_view func); +thread_info *find_thread_in_random + (gdb::function_view func); /* Get current thread ID (Linux task ID). */ #define current_ptid (current_thread->id) From patchwork Mon Oct 28 18:01:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 99718 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EE1673858403 for ; Mon, 28 Oct 2024 18:01:54 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id C732E3858D26 for ; Mon, 28 Oct 2024 18:01:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C732E3858D26 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C732E3858D26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=132.207.4.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730138487; cv=none; b=Ow5xM/Huoopr7w00hUwunvdAwXyl4+yS++ESerx1iNihywaZr9KmhJ8kr1QdNLn0bLBA+F3/5liiTUhlO+JjpyabQ9rLsuJ0GqdutBymvqYjs+pb6iXwu2RMh0OSiZt1ulWILIWnAD9hwz5Tlzftw0lxnuzMggIN0qGsy9igvk0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730138487; c=relaxed/simple; bh=1xVM+FRehVbrjYd95lOtnNhOVC1BZO4gmV2OTaINrdQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=VaOisJQPkULganKEEUOVXOP/5k0CT3F6K1j7X4H3v0CVCv36A3XzTup2y8HdMIjbLIHpd9xuvfciEpLyhGKEeyImIYdbB0X2eXHPQm3NG9I5qACKFHgMK5c7sF+Oiuh/VpP7Ft2gy4stEwD9Vs1QjyIqHZEcyGiHnydy8j/mYMc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 49SI1K9V033045 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 28 Oct 2024 14:01:25 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 49SI1K9V033045 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1730138485; bh=on7pbc/0b+QRVvpGrleKgbmLOGkUmps+X0ARuaAoyms=; h=From:To:Cc:Subject:Date:In-Reply-To:From; b=RVhgRr2l62xcLJwlG0tpkhNn6T/ef8vJ9SVZ4TYj2eMToJbop1gSvFybObkWLfp6F Eu/58PcSlmAiU9dq9b229qNICi28Y3twcqlzKD70m3OWQ/lWWt9bMhIsvLfkqUGD3w 7PiqEniG2EBraOmHKdBGji1Rho2iAi8DpzZkAVFg= Received: by simark.ca (Postfix, from userid 112) id 56FB71E574; Mon, 28 Oct 2024 14:01:20 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-Spam-Level: X-Spam-Status: No, score=-3188.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 Received: from simark.localdomain (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (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 ESMTPSA id 8F4681E56C; Mon, 28 Oct 2024 14:01:18 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [pushed 2/2] gdbserver: remove unused include in gdbthread.h Date: Mon, 28 Oct 2024 14:01:10 -0400 Message-ID: <20241028180115.115977-2-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241028180115.115977-1-simon.marchi@polymtl.ca> References: <20241028180115.115977-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 28 Oct 2024 18:01:20 +0000 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 clangd reports gdbsupport/common-gdbthread.h as unused in gdbthread.h, which seems right, so remove it. Add it to two files that need it, but were relying on the now-removed include. Change-Id: I12916a044d0b15f346c4ad0e6527ce99a6d460e4 --- gdbserver/gdbthread.h | 1 - gdbserver/inferiors.cc | 1 + gdbserver/remote-utils.cc | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gdbserver/gdbthread.h b/gdbserver/gdbthread.h index 389bee103c04..0f81a0f68b54 100644 --- a/gdbserver/gdbthread.h +++ b/gdbserver/gdbthread.h @@ -19,7 +19,6 @@ #ifndef GDBSERVER_GDBTHREAD_H #define GDBSERVER_GDBTHREAD_H -#include "gdbsupport/common-gdbthread.h" #include "gdbsupport/function-view.h" #include "inferiors.h" diff --git a/gdbserver/inferiors.cc b/gdbserver/inferiors.cc index 5621db377fb1..4245cb8fd9dc 100644 --- a/gdbserver/inferiors.cc +++ b/gdbserver/inferiors.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include "gdbsupport/common-gdbthread.h" #include "gdbsupport/common-inferior.h" #include "gdbthread.h" #include "dll.h" diff --git a/gdbserver/remote-utils.cc b/gdbserver/remote-utils.cc index 5a8eb9ae52ae..98c34e91220c 100644 --- a/gdbserver/remote-utils.cc +++ b/gdbserver/remote-utils.cc @@ -24,6 +24,7 @@ #include "tdesc.h" #include "debug.h" #include "dll.h" +#include "gdbsupport/common-gdbthread.h" #include "gdbsupport/rsp-low.h" #include "gdbsupport/netstuff.h" #include "gdbsupport/filestuff.h"