]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdbserver: make get_thread_lwp a function
authorSimon Marchi <simon.marchi@polymtl.ca>
Wed, 4 Dec 2024 16:30:40 +0000 (11:30 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Wed, 4 Dec 2024 20:05:58 +0000 (15:05 -0500)
Replace the macro with a static inline function.

Change-Id: I1cccf5b38d6a412d251763f0316902b07cc28d16
Approved-By: Tom Tromey <tom@tromey.com>
gdbserver/linux-low.h

index 66f72e94f28a96ee236e5c5b2bff1132442610b1..9a25697a90bc9d9b6132114cf097008ea275fe3b 100644 (file)
@@ -712,7 +712,11 @@ protected:
 
 extern linux_process_target *the_linux_target;
 
-#define get_thread_lwp(thr) ((struct lwp_info *) (thread_target_data (thr)))
+static inline lwp_info *
+get_thread_lwp (thread_info *thr)
+{
+  return static_cast<lwp_info *> (thread_target_data (thr));
+}
 
 /* Information about a signal that is to be delivered to a thread.  */