Hi,
When a go-routine returns from a syscall (or hits any scheduling point), it can continue execution on a different OS thread. If I'm stepping through the code in GDB, is there any way for GDB to know which thread the next instruction of my go-routine will execute on?
Right now it looks like Go stays on the current OS thread, so it loses the go-routine (http://code.google.com/p/go/issues/detail?id=7369). It seems GDB follows OS threads, when we want to follow go-routines.
Is GDB support for Go possible? Wouldn't it require some communication between Go's scheduler and GDB?
Actually I think we're moving in the other direction. Give up on making gdb smart and do something better, not that we know what that is yet. The only thing I'm willing to guarantee will stay in gdb support for the long term is support for stack traces and pc/line mappings.
In regards to the last statement.
I've just spent a bunch of time integrating gdb into an IDE so we can support it as it's one very popular feature requests (and not only for the platform that I'm working on). My very biased view is that a (good) debugger is an incredible powerful tool to have in the toolbox and gdb is already a very good tool.
The subject of porting the current go compiler from C to go has a very interesting point that it's better to write a C to go translator rather than lose ten years of man work.As such my question is: do you really think it's worth investing the time to create a new tool that can be used only with go programs when you already have one that can be used with existing apps, people are used to it and has all the features gdb has?
i think gdb on the smartos builder is broken, it can even run a C program.