Add command to restart process

Fixes #95
This commit is contained in:
Derek Parker
2015-07-03 15:35:22 -05:00
parent d2b8d57053
commit 2f7612d4af
8 changed files with 130 additions and 7 deletions

View File

@ -67,10 +67,22 @@ func (s *RPCServer) Run() error {
return nil
}
func (s *RPCServer) ProcessPid(arg1 interface{}, pid *int) error {
*pid = s.debugger.ProcessPid()
return nil
}
func (s *RPCServer) Detach(kill bool, ret *int) error {
return s.debugger.Detach(kill)
}
func (s *RPCServer) Restart(arg1 interface{}, arg2 *int) error {
if s.config.AttachPid != 0 {
return errors.New("cannot restart process Delve did not create")
}
return s.debugger.Restart()
}
func (s *RPCServer) State(arg interface{}, state *api.DebuggerState) error {
st, err := s.debugger.State()
if err != nil {