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:
aarzilli
2017-04-21 09:50:38 +02:00
committed by Derek Parker
parent 15bac71979
commit b6fe5aebaf
20 changed files with 286 additions and 333 deletions

View File

@ -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{}
}