-
Notifications
You must be signed in to change notification settings - Fork 201
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
Black Magic Probe's run
causes race condition with CDT leading to debug commands not working
#62
Comments
cc: @jld01 @T-Svensson as they may have an idea. This bug has been transferred from Bug 580544 |
Nothing obvious comes to mind, but doing run control things in the free text area is generally a bad idea. The reason for this statement is that CDT expects to be in charge of run control until the launch sequence completes, but the free text box is just one of many steps that are included in the launch sequence. |
Can we have a check box "run" instead of "resume", so CDT is still in charge ? |
@jief666: Can you please describe why "resume" does not work for you and why you need "run" instead? |
"continue" skip the softdevice initialization of my nrf52833 and dfu bootloader. |
If I don't use the Nordic softdevice, resume works. |
Are you using OpenOCD or some other GDB server? |
I use Black Magic Probe. |
@jief666 what does the GDB command "show remote exec-file" indicate when added to the launch configuration Run Commands text box before you attempt to "-exec-run"? |
I'm on another project of the same workspace. This time, launch works, with or without a breakpoint. |
Here is an example of gdb traces where eclipse "thought" gdb was started, but gdb was stopped and waiting for commands. I had to enter 'continue' in the debugger console. So it's like the -exec-run was understood by eclipse by not by gdb.
|
Something unusual about this trace is that there is this:
followed later by
but it is strange to re-specify the file and indeed GDB prompts with this:
|
run
causes race condition with CDT leading to debug commands not working
Here's what I have in "Initialization commands" :
and "Run commands" :
Looks like I made the mistake to leave "starti". It's because I tried to check "resume" instead of "--exec-run". But it shouldn't be the reason there is "file-exec-file" and "file" commands. |
@jief666 the GDB Hardware Debugging launch sequence is not intended to accommodate running/suspending the target within the initialization commands section. Try removing your |
If I put file in "initialization commands" and don't check "Load image" and "Load symbols", what's the difference ? Anyway, I can tell that it was what I was doing at the beginning : "Load file" + "Load symbols" and then "run" in run commands. It doesn't work. |
Hi,
In the startup page of my GDB hardware debug configuration, I didn't click "resume". Instead I put "-exec-run" in the text area. ("continue" skip the softdevice initialization of my nrf52833, so no good).
If there is no breakpoint at all, it's working well. I can stop and resume the process and do variable exploration and everything.
If there is some breakpoint, for example in the main function, the debug commands (continue, stop, step, etc.) doesn't work anymore. Eclipse is confused. Sometime the debug view show that the process is running but the debugger console says it is stopped. Sometime Eclipse become totally unresponsive (killing gdb process gives back control of Eclipse).
I've noticed that if I put a delay (TimeUnit.SECONDS.sleep(2)) at the beginning of org.eclipse.cdt.dsf.mi.service.MIBreakpointsManager.doUninstallBreakpoint(), the control problem disappear.
So I think there is a race condition somewhere. I don't think I can find that by myself. Any help ?
PS : I can explain more, make a screencast or anything needed to help finding that bug.
The text was updated successfully, but these errors were encountered: