mirror of
https://github.com/go-delve/delve.git
synced 2025-10-30 02:07:58 +08:00
Don't rely on CurrentBreakpoint, lookup before continue
This commit is contained in:
@ -42,10 +42,14 @@ type Location struct {
|
|||||||
// first and then resume execution. Thread will continue until
|
// first and then resume execution. Thread will continue until
|
||||||
// it hits a breakpoint or is signaled.
|
// it hits a breakpoint or is signaled.
|
||||||
func (thread *Thread) Continue() error {
|
func (thread *Thread) Continue() error {
|
||||||
|
pc, err := thread.PC()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
// Check whether we are stopped at a breakpoint, and
|
// Check whether we are stopped at a breakpoint, and
|
||||||
// if so, single step over it before continuing.
|
// if so, single step over it before continuing.
|
||||||
if thread.CurrentBreakpoint != nil {
|
if bp, ok := thread.dbp.FindBreakpoint(pc); ok {
|
||||||
if !thread.CurrentBreakpoint.hardware {
|
if !bp.hardware {
|
||||||
if err := thread.Step(); err != nil {
|
if err := thread.Step(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user