Prefer actual thread location in goroutine struct

This commit is contained in:
Derek Parker 2015-07-07 21:21:47 -05:00
parent 4d1dc5ad0e
commit 8c44181d56

@ -480,7 +480,15 @@ func (dbp *Process) GoroutinesInfo() ([]*G, error) {
return nil, err
}
if thread, allocated := threadg[g.Id]; allocated {
loc, err := thread.Location()
if err != nil {
return nil, err
}
g.thread = thread
// Prefer actual thread location information.
g.File = loc.File
g.Line = loc.Line
g.Func = loc.Fn
}
allg = append(allg, g)
}