From c496e9bccfb5d6e6a3576e55badb57f0e600ac92 Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Wed, 8 Jul 2015 13:06:06 -0500 Subject: [PATCH] Don't rely on CurrentBreakpoint, lookup before continue --- proc/threads.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/proc/threads.go b/proc/threads.go index 41f419f3..78cfb725 100644 --- a/proc/threads.go +++ b/proc/threads.go @@ -42,10 +42,14 @@ type Location struct { // first and then resume execution. Thread will continue until // it hits a breakpoint or is signaled. func (thread *Thread) Continue() error { + pc, err := thread.PC() + if err != nil { + return err + } // Check whether we are stopped at a breakpoint, and // if so, single step over it before continuing. - if thread.CurrentBreakpoint != nil { - if !thread.CurrentBreakpoint.hardware { + if bp, ok := thread.dbp.FindBreakpoint(pc); ok { + if !bp.hardware { if err := thread.Step(); err != nil { return err }