code-debug
code-debug copied to clipboard
#284: Add retry-mechanism to threadsRequest-method for stability
I dislike this fix, retrying after a Cannot execute this command while the target is running
error seems like bad practice. It should be possible to do a more reliable fix by inspecting the current state of GDB somehow.
I'm in general not a fan of retrying because of bad timing.
It should be possible to do a more reliable fix by inspecting the current state of GDB somehow.
-thread-info
should be possible to get the state, if it says it is still running, then a temporarily -interrupt
could be done (but I'd suggest not to do that because it "breaks" until
/fin
and friends.
If the state says "still running" then the commands to be executed may be placed in a list and executed as soon as we get the stopped event.
After some more debugging: I really think it would be good to at least reliable adjust breakpoints while running.
I've tried to enable GDB's non-stop mode - but it seems the attach
doesn't even work correctly afterwards.
This may only leave "interrupt", then "continue" (a change I'll not do myself)...