]> Cypherpunks repositories - gostls13.git/commit
runtime: fix GDB goroutine N command when N is running
authorAustin Clements <austin@google.com>
Wed, 7 Jun 2017 14:30:49 +0000 (10:30 -0400)
committerAustin Clements <austin@google.com>
Thu, 8 Jun 2017 13:18:26 +0000 (13:18 +0000)
commit24659717811075fb3b3bf012670229be1636c089
treefe64e2559cbc8777f42323d3267238398ef98717
parent631cdec676a1f92284b54297ca8ce4c209e2fc9d
runtime: fix GDB goroutine N command when N is running

The current implementation of "goroutine N cmd" assumes it can get
goroutine N's state from the goroutine's sched buffer. But this only
works if the goroutine is blocked. Extend find_goroutine so that, if
there is no saved scheduler state for a goorutine, it tries to find
the thread the goroutine is running on and use the thread's current
register state. We also extend find_goroutine to understand saved
syscall register state.

Fixes #13887.

Change-Id: I739008a8987471deaa4a9da918655e4042cf969b
Reviewed-on: https://go-review.googlesource.com/45031
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/runtime-gdb.py
src/runtime/runtime-gdb_test.go