terminal,proc: Improved goroutine printing

Three locations are returned for goroutines: its current location,
its current location excluding unexported runtime functions and
the location of its go instruction.
The command 'goroutines' takes a new parameter to select which
location to print (defaulting to current location w/o runtime)
This commit is contained in:
aarzilli
2015-10-16 08:42:02 +02:00
committed by Derek Parker
parent 2b4fef44a5
commit cb529eafab
6 changed files with 174 additions and 50 deletions

View File

@ -487,9 +487,7 @@ func (dbp *Process) GoroutinesInfo() ([]*G, error) {
}
g.thread = thread
// Prefer actual thread location information.
g.File = loc.File
g.Line = loc.Line
g.Func = loc.Fn
g.Current = *loc
}
if g.Status != Gdead {
allg = append(allg, g)