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

@ -103,14 +103,15 @@ func (t *Thread) resume() error {
return err
}
func (t *Thread) blocked() bool {
func threadBlocked(t IThread) bool {
// TODO: Probably incorrect - what are the runtime functions that
// indicate blocking on Windows?
pc, err := t.PC()
regs, err := t.Registers(false)
if err != nil {
return false
}
fn := t.dbp.bi.goSymTable.PCToFunc(pc)
pc := regs.PC()
fn := t.BinInfo().goSymTable.PCToFunc(pc)
if fn == nil {
return false
}