Bug 580544 - Eclipse become unresponsive when doing run in Hardware debugging.
Summary: Eclipse become unresponsive when doing run in Hardware debugging.
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 10.6.0   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-10 16:30 EDT by jief CLA
Modified: 2022-08-15 10:01 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jief CLA 2022-08-10 16:30:27 EDT
Hi,
In the startup page of my debug configuration, I didn't click "resume". Instead I put "-exec-run" in the text area. ("resume" skips 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.
Comment 1 Jonah Graham CLA 2022-08-15 10:01:10 EDT
Hi jief, Thanks for the bug report. Not sure I understand for sure what is happening, but it doesn't suprise me that -exec-run in this location has (bad) side effects. My guess is the sleep allows some code on the target to run, send events back to CDT via GDB and that gets the state back to what is expected.

I have added John to the CC list in case he has other ideas.

(Note we are in the summer vacation period so response time is a little slower. We have also move to GitHub, so feel free to transfer the bug report there if you prefer https://github.com/eclipse-cdt/cdt/issues/new/choose)