Hello all,
I noticed that gdbserver isn't fully supported by FreeBSD, which makes it difficult for it to be remotely debugged. Because FreeBSD is commonly used in embedded systems, I feel like a working gdbserver would be greatly useful for debugging outside of the box.
It's not straightforward however. Specifically, one of the issues with FreeBSD's gdbserver, that isn't handled well, is the lack of thread awareness of the gdbserver. It is highly inflexible when handling processes with multiple threads, to the point that it doesn't attach to any additional existing thread, or created thread, beyond the first.
It looks like Linux' flavor of gdbserver can handle multithreading, but it doesn't seem to be very obvious. Has anyone ever tried porting over the Linux version of gdbserver to FreeBSD? And if not, what other obvious changes would have to be made to the existing gdbserver (some flavor of 6.6.2 I think)?
I think we should try to keep the implementation to 1:1 kernel to process thread to keep it simple - which is the libthr interpretation of pthreads.
Thanks
I noticed that gdbserver isn't fully supported by FreeBSD, which makes it difficult for it to be remotely debugged. Because FreeBSD is commonly used in embedded systems, I feel like a working gdbserver would be greatly useful for debugging outside of the box.
It's not straightforward however. Specifically, one of the issues with FreeBSD's gdbserver, that isn't handled well, is the lack of thread awareness of the gdbserver. It is highly inflexible when handling processes with multiple threads, to the point that it doesn't attach to any additional existing thread, or created thread, beyond the first.
It looks like Linux' flavor of gdbserver can handle multithreading, but it doesn't seem to be very obvious. Has anyone ever tried porting over the Linux version of gdbserver to FreeBSD? And if not, what other obvious changes would have to be made to the existing gdbserver (some flavor of 6.6.2 I think)?
I think we should try to keep the implementation to 1:1 kernel to process thread to keep it simple - which is the libthr interpretation of pthreads.
Thanks