Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-debug-dev] False resume events fired while adding breakpoints to a running debugtarget

1) You always attach patches to prs.
2) In this particular case I don't think it would be accepted. If you enable events after target is resumed it can miss the event which is even worse.
Using sleep to avoid race condition is not a solution either.

Abeer Bagul wrote:
Hi All,

Currently, the way a breakpoint is planted while a debugtarget is running, leads to false resume events. When a user tries to add breakpoints to a running target, the BreakpointManager suspends the target, plants the breakpoints and then resumes the target.
Look at:
http://bugs.eclipse.org/bugs/show_bug.cgi?id=166660#c23

Before suspending the target, the code disables event processing so that false suspend events are not generated. But the code enables event processing before sending the resume command, leading to false resume events.

We have a debugeventlistener which is behaving wrongly due to the false resume events.

Can the code in BreakpointManager.resumeInferior() be changed so that event processing is enabled after the resume command is sent? Since event processing and resuming happen on different threads, we had to insert a Thread.sleep() call before enabling the event processing (to prevent a race condition in which the event processing is enabled before the response to the resume command is recieved).

I have attached a patch which prevents these false resume events. Should I attach this patch to bug 166660?

Thanks
Abeer


------------------------------------------------------------------------

_______________________________________________
cdt-debug-dev mailing list
cdt-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev


Back to the top