From 3d6c62048d8408fbfb6c66830e0c650e36259637 Mon Sep 17 00:00:00 2001 From: Kevin Buettner Date: Thu, 7 Feb 2019 19:16:04 -0700 Subject: Introduce target_ops method thread_info_to_thread_handle This patch adds a thread_info_to_thread_handle method to the target_ops struct. It also implements this functionality for remote targets and linux native threads. gdb/ChangeLog: * gdbthread.h (thread_to_thread_handle): Declare. * thread.c (gdbtypes.h): Include. (thread_to_thread_handle): New function. * target.h (struct target_ops): Add thread_info_to_thread_handle. (target_thread_info_to_thread_handle): Declare. * target.c (target_thread_info_to_thread_handle): New function. * target-debug.h (target_debug_print_gdb_byte_vector): Define. * target-delegates.c: Regenerate. * linux-thread-db.c (class thread_db_target): Add method thread_info_to_thread_handle. (thread_db_target::thread_info_to_thread_handle): Define. * remote.c (class remote_target): Add new method thread_info_to_thread_handle. (remote_target::thread_info_to_thread_handle): Define. --- gdb/target-debug.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gdb/target-debug.h') diff --git a/gdb/target-debug.h b/gdb/target-debug.h index bef8a7f..aa2adce 100644 --- a/gdb/target-debug.h +++ b/gdb/target-debug.h @@ -186,6 +186,8 @@ target_debug_do_print (host_address_to_string (X)) #define target_debug_print_std_string(X) \ target_debug_do_print ((X).c_str ()) +#define target_debug_print_gdb_byte_vector(X) \ + target_debug_do_print (host_address_to_string (X.data ())) static void target_debug_print_struct_target_waitstatus_p (struct target_waitstatus *status) -- cgit v1.1