]> Cypherpunks repositories - gostls13.git/commit
runtime: fix GDB "info goroutines" for Go 1.5
authorAustin Clements <austin@google.com>
Tue, 17 Feb 2015 02:56:10 +0000 (21:56 -0500)
committerAustin Clements <austin@google.com>
Tue, 17 Feb 2015 18:41:01 +0000 (18:41 +0000)
commit545686857bc4c2e7a5306d97e5ef48f631d277bc
tree9cc1ab35bb691be125a5b026b0f2249c3ac500be
parent277eddb8f236b76c1028110ca89c9fc596f3074f
runtime: fix GDB "info goroutines" for Go 1.5

"info goroutines" is failing because it hasn't kept up with changes in
the 1.5 runtime.  This fixes three issues preventing "info goroutines"
from working.  allg is no longer a linked list, so switch to using the
allgs slice.  The g struct's 'status' field is now called
'atomicstatus', so rename uses of 'status'.  Finally, this was trying
to parse str(pc) as an int, but str(pc) can return symbolic
information after the raw hex value; fix this by stripping everything
after the first space.

This also adds a test for "info goroutines" to runtime-gdb_test, which
was previously quite skeletal.

Change-Id: I8ad83ee8640891cdd88ecd28dad31ed9b5833b7a
Reviewed-on: https://go-review.googlesource.com/4935
Reviewed-by: Minux Ma <minux@golang.org>
src/runtime/runtime-gdb.py
src/runtime/runtime-gdb_test.go