mirror of
https://github.com/go-delve/delve.git
synced 2025-08-07 05:56:58 +02:00
service/dap: do not try to stacktrace an unreadable goroutine (#4056)
onThreadRequest should not try to get the location of unreadable goroutines. Fixes #4054
This commit is contained in:
parent
03640f2c8d
commit
52a73b0ecf
@ -1883,6 +1883,9 @@ func (s *Session) onThreadsRequest(request *dap.ThreadsRequest) {
|
|||||||
} else {
|
} else {
|
||||||
writeLabelsForKeys(s.args.ShowPprofLabels)
|
writeLabelsForKeys(s.args.ShowPprofLabels)
|
||||||
}
|
}
|
||||||
|
if g.Unreadable != nil {
|
||||||
|
threads[i].Name = fmt.Sprintf("%s Unreadable goroutine: %v", selected, g.Unreadable)
|
||||||
|
} else {
|
||||||
// File name and line number are communicated via `stackTrace`
|
// File name and line number are communicated via `stackTrace`
|
||||||
// so no need to include them here.
|
// so no need to include them here.
|
||||||
loc := g.UserCurrent()
|
loc := g.UserCurrent()
|
||||||
@ -1890,6 +1893,7 @@ func (s *Session) onThreadsRequest(request *dap.ThreadsRequest) {
|
|||||||
threads[i].Id = int(g.ID)
|
threads[i].Id = int(g.ID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
response := &dap.ThreadsResponse{
|
response := &dap.ThreadsResponse{
|
||||||
Response: *newResponse(request.Request),
|
Response: *newResponse(request.Request),
|
||||||
|
Loading…
Reference in New Issue
Block a user