mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 17:56:45 +08:00
Return breakpoints when they already exist (#870)
See https://youtrack.jetbrains.com/issue/GO-3931#comment=27-2224179 for more details
This commit is contained in:
committed by
Derek Parker
parent
c0d233878c
commit
640dedb479
@ -874,7 +874,7 @@ func (p *Process) FindBreakpoint(pc uint64) (*proc.Breakpoint, bool) {
|
||||
|
||||
func (p *Process) SetBreakpoint(addr uint64, kind proc.BreakpointKind, cond ast.Expr) (*proc.Breakpoint, error) {
|
||||
if bp, ok := p.breakpoints[addr]; ok {
|
||||
return nil, proc.BreakpointExistsError{bp.File, bp.Line, bp.Addr}
|
||||
return bp, proc.BreakpointExistsError{bp.File, bp.Line, bp.Addr}
|
||||
}
|
||||
f, l, fn := p.bi.PCToLine(uint64(addr))
|
||||
if fn == nil {
|
||||
|
||||
@ -198,7 +198,7 @@ func (dbp *Process) SetBreakpoint(addr uint64, kind proc.BreakpointKind, cond as
|
||||
tid := dbp.currentThread.ID
|
||||
|
||||
if bp, ok := dbp.FindBreakpoint(addr); ok {
|
||||
return nil, proc.BreakpointExistsError{bp.File, bp.Line, bp.Addr}
|
||||
return bp, proc.BreakpointExistsError{bp.File, bp.Line, bp.Addr}
|
||||
}
|
||||
|
||||
f, l, fn := dbp.bi.PCToLine(uint64(addr))
|
||||
|
||||
Reference in New Issue
Block a user