From 75cbc781e371279f4403045be93b07fd8fe7fde5 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 25 Jun 2018 17:18:18 +0100 Subject: gdb: For macOS, s/thread_info/struct thread_info/ The macOS build currently fails with several instances of this problem: In file included from ../../src/gdb/darwin-nat.h:22:0, from ../../src/gdb/i386-darwin-nat.c:37: ../../src/gdb/gdbthread.h:376:59: error: type/value mismatch at argument 1 in template parameter list for 'template class gdb::ref_ptr' = gdb::ref_ptr; ^ ../../src/gdb/gdbthread.h:376:59: note: expected a type, got 'thread_info' ../../src/gdb/gdbthread.h:396:28: error: variable or field 'delete_thread' declared void extern void delete_thread (thread_info *thread); ^ (...) This is because there's a thread_info function in the Darwin/XNU/mach API: http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/thread_info.html Fix this in the same way it had been fixed in commit 7aabaf9d4ad5 ("Create private_thread_info hierarchy"), by adding an explicit "struct" keyword. gdb/ChangeLog: 2018-06-25 Pedro Alves * gdbthread.h (thread_info_ref, delete_thread) (delete_thread_silent, first_thread_of_inferior) (any_thread_of_inferior, switch_to_thread) (enable_thread_stack_temporaries) (thread_stack_temporaries_enabled_p, push_thread_stack_temporary) (get_last_thread_stack_temporary) (value_in_thread_stack_temporaries, can_access_registers_thread): Spell out "struct thread_info" instead of just "thread_info". * inferior.h (notice_new_inferior): Likewise. --- gdb/inferior.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/inferior.h') diff --git a/gdb/inferior.h b/gdb/inferior.h index 3f4d7a50d60..bfad91d9f3e 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -177,7 +177,7 @@ extern void delete_longjmp_breakpoint_cleanup (void *arg); extern void detach_command (const char *, int); -extern void notice_new_inferior (thread_info *, int, int); +extern void notice_new_inferior (struct thread_info *, int, int); extern struct value *get_return_value (struct value *function, struct type *value_type); -- cgit v1.2.1