mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 09:46:56 +08:00
terminal: show current thread of goroutines (#564)
This commit is contained in:
committed by
Derek Parker
parent
ede880134c
commit
7761faad5b
@ -186,11 +186,17 @@ func ConvertFunction(fn *gosym.Func) *Function {
|
||||
|
||||
// ConvertGoroutine converts from proc.G to api.Goroutine.
|
||||
func ConvertGoroutine(g *proc.G) *Goroutine {
|
||||
th := g.Thread()
|
||||
tid := 0
|
||||
if th != nil {
|
||||
tid = th.ID
|
||||
}
|
||||
return &Goroutine{
|
||||
ID: g.ID,
|
||||
CurrentLoc: ConvertLocation(g.CurrentLoc),
|
||||
UserCurrentLoc: ConvertLocation(g.UserCurrent()),
|
||||
GoStatementLoc: ConvertLocation(g.Go()),
|
||||
ThreadID: tid,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user