mirror of
https://github.com/go-delve/delve.git
synced 2025-10-30 02:07:58 +08:00
Fix: string formatting bug in Clear()
This commit is contained in:
@ -137,7 +137,7 @@ func (dbp *DebuggedProcess) Clear(pc uint64) (*BreakPoint, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
delete(dbp.BreakPoints, fmt.Sprintf("s:%d", bp.File, bp.Line))
|
||||
delete(dbp.BreakPoints, fmt.Sprintf("%s:%d", bp.File, bp.Line))
|
||||
|
||||
return bp, nil
|
||||
}
|
||||
|
||||
@ -216,4 +216,8 @@ func TestClearBreakPoint(t *testing.T) {
|
||||
if bytes.Equal(data, int3) {
|
||||
t.Fatalf("Breakpoint was not cleared data: %#v, int3: %#v", data, int3)
|
||||
}
|
||||
|
||||
if len(p.BreakPoints) != 0 {
|
||||
t.Fatal("Breakpoint not removed internally")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user