mirror of
https://github.com/go-delve/delve.git
synced 2025-10-30 02:07:58 +08:00
proc: refactoring: merge target into proc
- moved target.Interface into proc as proc.Process - rename proc.IThread to proc.Thread - replaced interfaces DisassembleInfo, Continuable and EvalScopeConvertible with Process. - removed superfluous Gdbserver prefix from types in the gdbserial backend. - removed superfluous Core prefix from types in the core backend.
This commit is contained in:
@ -126,20 +126,20 @@ func (dbp *Process) SelectedGoroutine() *proc.G {
|
||||
return dbp.selectedGoroutine
|
||||
}
|
||||
|
||||
func (dbp *Process) ThreadList() []proc.IThread {
|
||||
r := make([]proc.IThread, 0, len(dbp.threads))
|
||||
func (dbp *Process) ThreadList() []proc.Thread {
|
||||
r := make([]proc.Thread, 0, len(dbp.threads))
|
||||
for _, v := range dbp.threads {
|
||||
r = append(r, v)
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
func (dbp *Process) FindThread(threadID int) (proc.IThread, bool) {
|
||||
func (dbp *Process) FindThread(threadID int) (proc.Thread, bool) {
|
||||
th, ok := dbp.threads[threadID]
|
||||
return th, ok
|
||||
}
|
||||
|
||||
func (dbp *Process) CurrentThread() proc.IThread {
|
||||
func (dbp *Process) CurrentThread() proc.Thread {
|
||||
return dbp.currentThread
|
||||
}
|
||||
|
||||
@ -264,7 +264,7 @@ func (dbp *Process) Status() *WaitStatus {
|
||||
return dbp.currentThread.Status
|
||||
}
|
||||
|
||||
func (dbp *Process) ContinueOnce() (proc.IThread, error) {
|
||||
func (dbp *Process) ContinueOnce() (proc.Thread, error) {
|
||||
if dbp.exited {
|
||||
return nil, &proc.ProcessExitedError{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user