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

@ -16,18 +16,11 @@ const (
IntelFlavour
)
// DisassembleInfo is the subset of target.Interface used by Disassemble.
type DisassembleInfo interface {
CurrentThread() IThread
Breakpoints() map[uint64]*Breakpoint
BinInfo() *BinaryInfo
}
// Disassemble disassembles target memory between startPC and endPC, marking
// the current instruction being executed in goroutine g.
// If currentGoroutine is set and thread is stopped at a CALL instruction Disassemble will evaluate the argument of the CALL instruction using the thread's registers
// Be aware that the Bytes field of each returned instruction is a slice of a larger array of size endPC - startPC
func Disassemble(dbp DisassembleInfo, g *G, startPC, endPC uint64) ([]AsmInstruction, error) {
func Disassemble(dbp Process, g *G, startPC, endPC uint64) ([]AsmInstruction, error) {
if g == nil {
ct := dbp.CurrentThread()
regs, _ := ct.Registers(false)