-
Notifications
You must be signed in to change notification settings - Fork 42
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
gdb does not stop at launch - likely because of exec-run
and race conditions
#238
Comments
Do you see gdb reporting thread exits and then stopped, reason exited? If so, then I think this is fixed by #234. In #234 if all the threads have exited then the terminate event will be sent to the client. If not, this sounds like a different issue and a DAP + MI trace (run with verbose=true in launch.json) would be helpful. |
While this is likely still reasonable to check this to prevent race conditions and to provide a "stopAtConnect" option, the bug I've seen was a different one... #239. As soon as I've fixed the underlying issue (which was not visible) the run worked and I guess that with #234 at least the debugging session would have stopped. |
Is there anything left to do here? If there is, please provide a DAP + MI trace so I can see what is going on better and reopen the issue. #234 should be merged soon. |
I think yes. But maybe I'm missing something: how can we stop the at the first instruction / at connect? |
Place a breakpoint on I suppose we could add another configuration option that would do |
Yes, and especially for the connect scenario that seems important. |
Please expand on "connect scenario"? |
if you attach to something then you either want "run until anything happens, for example a breakpoint" or "directly stop" (similar to the launch scenario) |
OK, that is a different situation as in that case you want nothing to run, where as the start launch case you want stuff to run up until For the target attach ( Lets keep discussing here, and I will try to make focussed bug reports as I think these use cases are all valid. |
First one of them is #250 |
Checking with the verbose option we can see
-exec-run
is executedThis may be solved by executing
-exec-run --start
(so it will stop the execution at the start of the inferior’s main subprogram) and only after the "internal" startup is completely done (including getting messages for everything sent) then issuing a-exec-continue
.This should fix all race conditions on startup.
Ideally there would be an option "stopAtConnect" or similar, if this is set then
-exec-continue
won't be executed and we can actually stop at the start.The text was updated successfully, but these errors were encountered: