mirror of
https://github.com/go-delve/delve.git
synced 2025-10-27 12:05:21 +08:00
pkg/terminal: Ignore existing breakpoints for continue until (#2624)
Ignore existing breakpoints when using the continue command to continue to a specific location such as `continue main.main`. The point of this command is to continue to a specific location, so if there is already a breakpoint set there there should be no error returned, just continue until we hit the breakpoint already set in that location.
This commit is contained in:
@ -1130,6 +1130,18 @@ func TestContinueUntil(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestContinueUntilExistingBreakpoint(t *testing.T) {
|
||||
withTestTerminal("continuetestprog", t, func(term *FakeTerminal) {
|
||||
term.MustExec("break main.main")
|
||||
if runtime.GOARCH != "386" {
|
||||
listIsAt(t, term, "continue main.main", 16, -1, -1)
|
||||
} else {
|
||||
listIsAt(t, term, "continue main.main", 17, -1, -1)
|
||||
}
|
||||
listIsAt(t, term, "continue main.sayhi", 12, -1, -1)
|
||||
})
|
||||
}
|
||||
|
||||
func TestPrintFormat(t *testing.T) {
|
||||
withTestTerminal("testvariables2", t, func(term *FakeTerminal) {
|
||||
term.MustExec("continue")
|
||||
|
||||
Reference in New Issue
Block a user