Go, gdb, and 'green threads'

Graham King <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
Hi gdb,

The Go language has it's own scheduler (http://morsmachine.dk/go-scheduler) which runs go-routines (sort of green threads, lightweight threads, etc). When a go-routine returns from a syscall, it can get added to a global runqueue, and picked up by the next available OS thread, which might not be the thread it was running on before the syscall.

If I single-step ('next') over a line that does a syscall, is there any way to get gdb to pick up from the thread where the go-routine moves to? Currently gdb loses the go-routine if that go-routine changes threads.

I'd like to follow the execution of a go-routine, not an OS thread. My guess is this would require some co-operation between the Go scheduler and gdb, but I have no idea where to start looking.

Thanks in advance,
Graham
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.