cmd/dlv: print out message with stack trace when breakpoint is hit but has no waiting client (#3632)

* Print out message and dump stack on pause

* Fix test

* Move the logic to debugger layer

* Remove unused fields

* Do not use defer to get state

* move channel to connection

* remove lock on isClosed

* Use mutex

* Remove unwanted changes
This commit is contained in:
Fata Nugraha
2024-06-13 02:31:46 +07:00
committed by GitHub
parent 2ec2e831d6
commit 15a9f9d353
8 changed files with 136 additions and 21 deletions

View File

@ -127,7 +127,7 @@ type CommandOut struct {
// Command interrupts, continues and steps through the program.
func (s *RPCServer) Command(command api.DebuggerCommand, cb service.RPCCallback) {
st, err := s.debugger.Command(&command, cb.SetupDoneChan())
st, err := s.debugger.Command(&command, cb.SetupDoneChan(), cb.DisconnectChan())
if err != nil {
cb.Return(nil, err)
return