code-debug icon indicating copy to clipboard operation
code-debug copied to clipboard

#284: Add retry-mechanism to threadsRequest-method for stability

Open martin-fleck-at opened this issue 3 years ago • 3 comments

martin-fleck-at avatar Jul 29 '21 14:07 martin-fleck-at

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.

WebFreak001 avatar Jul 30 '21 07:07 WebFreak001

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.

GitMensch avatar Mar 03 '22 09:03 GitMensch

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)...

GitMensch avatar Mar 03 '22 21:03 GitMensch