* [pushed 1/2] gdbserver: fix formatting in gdbthread.h
@ 2024-10-28 18:01 Simon Marchi
2024-10-28 18:01 ` [pushed 2/2] gdbserver: remove unused include " Simon Marchi
0 siblings, 1 reply; 2+ messages in thread
From: Simon Marchi @ 2024-10-28 18:01 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
Remove newlines after return type in declarations.
Change-Id: I00c6f35e063024cf6674d532454b67e6d0d98a19
---
gdbserver/gdbthread.h | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
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<bool (thread_info *)> func);
+thread_info *find_thread (gdb::function_view<bool (thread_info *)> func);
/* Like the above, but only consider threads with pid PID. */
-thread_info *
-find_thread (int pid, gdb::function_view<bool (thread_info *)> func);
+thread_info *find_thread (int pid,
+ gdb::function_view<bool (thread_info *)> 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<bool (thread_info *)> func);
+thread_info *find_thread (ptid_t filter,
+ gdb::function_view<bool (thread_info *)> func);
/* Invoke FUNC for each thread. */
-void
-for_each_thread (gdb::function_view<void (thread_info *)> func);
+void for_each_thread (gdb::function_view<void (thread_info *)> func);
/* Like the above, but only consider threads with pid PID. */
-void
-for_each_thread (int pid, gdb::function_view<void (thread_info *)> func);
+void for_each_thread (int pid, gdb::function_view<void (thread_info *)> 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<bool (thread_info *)> func);
+thread_info *find_thread_in_random
+ (gdb::function_view<bool (thread_info *)> func);
/* Get current thread ID (Linux task ID). */
#define current_ptid (current_thread->id)
base-commit: 77f6ff446173ac7790f35d43de7d196a768c38b1
--
2.47.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pushed 2/2] gdbserver: remove unused include in gdbthread.h
2024-10-28 18:01 [pushed 1/2] gdbserver: fix formatting in gdbthread.h Simon Marchi
@ 2024-10-28 18:01 ` Simon Marchi
0 siblings, 0 replies; 2+ messages in thread
From: Simon Marchi @ 2024-10-28 18:01 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
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 <http://www.gnu.org/licenses/>. */
+#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"
--
2.47.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-28 18:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-28 18:01 [pushed 1/2] gdbserver: fix formatting in gdbthread.h Simon Marchi
2024-10-28 18:01 ` [pushed 2/2] gdbserver: remove unused include " Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).