Check thread.CurrentBreakpoint instead of PC lookup
This commit is contained in:
parent
8d4a73f7dd
commit
70aff5612c
@ -42,16 +42,13 @@ 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 _, ok := thread.dbp.Breakpoints[pc]; ok {
|
||||
if err := thread.Step(); err != nil {
|
||||
return err
|
||||
if thread.CurrentBreakpoint != nil {
|
||||
if !thread.CurrentBreakpoint.hardware {
|
||||
if err := thread.Step(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return thread.resume()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user