diff --git a/proctl/breakpoints.go b/proctl/breakpoints.go index fabb78b6..fe8287cd 100644 --- a/proctl/breakpoints.go +++ b/proctl/breakpoints.go @@ -120,8 +120,7 @@ func (dbp *DebuggedProcess) setBreakpoint(tid int, addr uint64, temp bool) (*Bre return dbp.HWBreakPoints[i], nil } } - // Fall back to software breakpoint. 0xCC is INT 3, software - // breakpoint trap interrupt. + // Fall back to software breakpoint. 0xCC is INT 3 trap interrupt. thread := dbp.Threads[tid] originalData := make([]byte, 1) if _, err := readMemory(thread, uintptr(addr), originalData); err != nil { @@ -134,6 +133,7 @@ func (dbp *DebuggedProcess) setBreakpoint(tid int, addr uint64, temp bool) (*Bre return dbp.BreakPoints[addr], nil } +// Error thrown when trying to clear a breakpoint that does not exist. type NoBreakPointError struct { addr uint64 } diff --git a/proctl/proctl.go b/proctl/proctl.go index 52401d59..91269350 100644 --- a/proctl/proctl.go +++ b/proctl/proctl.go @@ -247,6 +247,7 @@ func (dbp *DebuggedProcess) Next() error { } func (dbp *DebuggedProcess) next() error { + // Make sure we clean up the temp breakpoints created by thread.Next defer dbp.clearTempBreakpoints() curg, err := dbp.CurrentThread.curG()