Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A redundant breakpoint hit #1610

Closed
nd opened this issue Jul 11, 2019 · 1 comment
Closed

A redundant breakpoint hit #1610

nd opened this issue Jul 11, 2019 · 1 comment

Comments

@nd
Copy link
Contributor

nd commented Jul 11, 2019

  1. What version of Delve are you using (dlv version)?
Delve Debugger
Version: 1.2.0
Build: dd4fd5dc9cf5d45092f97f2ba376f3e69d7a5a8e
  1. What version of Go are you using? (go version)?
go version go1.12.6 darwin/amd64
  1. What operating system and processor architecture are you using?

Mac OS 10.12.5

  1. What did you do?

Debug the following program on mac in a delve with tty enabled:

package main

func main() {
	println("test") //break
}
  1. What did you expect to see?

Execution stops at the breakpoint once, after continue program exits.

  1. What did you see instead?

Execution stops at the breakpoint twice.

It doesn't always happend. Here are logs (prc,gdbwire) when the breakpoint reached once: https://gist.github.com/nd/96eb43768cd7327b99ccfe1e7b6acb44, and twice: https://gist.github.com/nd/6106f0234fb94b0f62f65c9a7d2305ff. On linux the breakpoint is hit only once.

@quoctruong
Copy link

I can also repro this problem on my Windows machine.

aarzilli added a commit to aarzilli/delve that referenced this issue Jul 18, 2019
Propagate signals when stepping because debugserver will report them,
from the issue:

2019-07-11T16:31:25+02:00 debug layer=gdbconn <- $z0,105525d,1#c9
2019-07-11T16:31:25+02:00 debug layer=gdbconn -> $OK#00
2019-07-11T16:31:25+02:00 debug layer=gdbconn <- $vCont;s:c41c3#50
2019-07-11T16:31:25+02:00 debug layer=gdbconn -> $T1cthread:c41c3;threads:c41c3,c41d7,c41d8,c41d9,c41da;thread-pcs:105525d,7fffc464bf46,7fffc464bbf2,7fffc464bbf2,7fffc46...
2019-07-11T16:31:25+02:00 debug layer=gdbconn <- $Z0,105525d,1#a9
2019-07-11T16:31:25+02:00 debug layer=gdbconn -> $OK#00

in this case we request a single step on thread c41c3 but debugserver
reports instead a signal (in this case SIGWINCH).

Fixes go-delve#1610
aarzilli added a commit to aarzilli/delve that referenced this issue Jul 23, 2019
Propagate signals when stepping because debugserver will report them,
from the issue:

2019-07-11T16:31:25+02:00 debug layer=gdbconn <- $z0,105525d,1#c9
2019-07-11T16:31:25+02:00 debug layer=gdbconn -> $OK#00
2019-07-11T16:31:25+02:00 debug layer=gdbconn <- $vCont;s:c41c3#50
2019-07-11T16:31:25+02:00 debug layer=gdbconn -> $T1cthread:c41c3;threads:c41c3,c41d7,c41d8,c41d9,c41da;thread-pcs:105525d,7fffc464bf46,7fffc464bbf2,7fffc464bbf2,7fffc46...
2019-07-11T16:31:25+02:00 debug layer=gdbconn <- $Z0,105525d,1#a9
2019-07-11T16:31:25+02:00 debug layer=gdbconn -> $OK#00

in this case we request a single step on thread c41c3 but debugserver
reports instead a signal (in this case SIGWINCH).

Fixes go-delve#1610
cgxxv pushed a commit to cgxxv/delve that referenced this issue Mar 25, 2022
Propagate signals when stepping because debugserver will report them,
from the issue:

2019-07-11T16:31:25+02:00 debug layer=gdbconn <- $z0,105525d,1#c9
2019-07-11T16:31:25+02:00 debug layer=gdbconn -> $OK#00
2019-07-11T16:31:25+02:00 debug layer=gdbconn <- $vCont;s:c41c3#50
2019-07-11T16:31:25+02:00 debug layer=gdbconn -> $T1cthread:c41c3;threads:c41c3,c41d7,c41d8,c41d9,c41da;thread-pcs:105525d,7fffc464bf46,7fffc464bbf2,7fffc464bbf2,7fffc46...
2019-07-11T16:31:25+02:00 debug layer=gdbconn <- $Z0,105525d,1#a9
2019-07-11T16:31:25+02:00 debug layer=gdbconn -> $OK#00

in this case we request a single step on thread c41c3 but debugserver
reports instead a signal (in this case SIGWINCH).

Fixes go-delve#1610
abner-chenc pushed a commit to loongson/delve that referenced this issue Mar 1, 2024
Propagate signals when stepping because debugserver will report them,
from the issue:

2019-07-11T16:31:25+02:00 debug layer=gdbconn <- $z0,105525d,1#c9
2019-07-11T16:31:25+02:00 debug layer=gdbconn -> $OK#00
2019-07-11T16:31:25+02:00 debug layer=gdbconn <- $vCont;s:c41c3#50
2019-07-11T16:31:25+02:00 debug layer=gdbconn -> $T1cthread:c41c3;threads:c41c3,c41d7,c41d8,c41d9,c41da;thread-pcs:105525d,7fffc464bf46,7fffc464bbf2,7fffc464bbf2,7fffc46...
2019-07-11T16:31:25+02:00 debug layer=gdbconn <- $Z0,105525d,1#a9
2019-07-11T16:31:25+02:00 debug layer=gdbconn -> $OK#00

in this case we request a single step on thread c41c3 but debugserver
reports instead a signal (in this case SIGWINCH).

Fixes go-delve#1610
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants