I've tried copying XCode 9 (.3?) from a mac
the simple example compiles but segfaults at run time
Could you provide more details? What is the simple example that you are compiling?
So you compile it with clang from Xcode 9 and it doesn't run?
sorry it compiles but it does not link
the example is a simple hello world
void main() { puts("Hello world"); }
Trying through gdb shows
assertion failure on line 243 of "/path/to/git/darling/src/external/gdb/src/gdb/macosx/macosx-nat-inferior-util.c" in function "kern_return_t macosx_inferior_resume_mach(macosx_inferior_status *, int)": macosx_task_valid (s->task)
(gdb) bt
Error calling thread_get_state for GP registers for thread 0x0
Error calling thread_get_state for GP registers for thread 0x0
error on line 169 of "/path/to/darling/src/external/gdb/src/gdb/macosx/i386-macosx-nat-exec.c" in function "void fetch_inferior_registers(int)": [UNKNOWN] (0x10000003)
The GDB we ship doesn't really work anymore.
Our debugging story is currently about enabling LLDB to work under Darling (see #304) & it's almost ready, but not quite yet. Until then, I just use host's native GDB, which means no debugging symbols.
Thanks for the response, I'll give it another go on a separate machine to see if I get the same thing - happy to be involved as I really would like to avoid needing a mac :)
Seems ok with Ubuntu and master now
It definitely works for me (on multiple distros) on master, so let's consider it fixed.
Most helpful comment
Thanks for the response, I'll give it another go on a separate machine to see if I get the same thing - happy to be involved as I really would like to avoid needing a mac :)