proc: refactor Continue to work on any Process implementation

This commit is contained in:
aarzilli
2017-02-22 09:35:21 +01:00
committed by Derek Parker
parent 510b7db2a7
commit 3dacc25d2e
11 changed files with 326 additions and 284 deletions

View File

@ -67,9 +67,13 @@ func (t *Thread) singleStep() (err error) {
}
}
func (t *Thread) blocked() bool {
pc, _ := t.PC()
fn := t.dbp.bi.goSymTable.PCToFunc(pc)
func threadBlocked(t IThread) bool {
regs, err := t.Registers(false)
if err != nil {
return false
}
pc := regs.PC()
fn := t.BinInfo().goSymTable.PCToFunc(pc)
if fn != nil && ((fn.Name == "runtime.futex") || (fn.Name == "runtime.usleep") || (fn.Name == "runtime.clone")) {
return true
}