Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337899

Summary: [debug view][non-stop] Process label is not updated properly
Product: [Tools] CDT Reporter: Marc Khouzam <marc.khouzam>
Component: cdt-debug-dsf-gdbAssignee: Marc Dumais <marc.dumais>
Status: RESOLVED FIXED QA Contact: Marc Khouzam <marc.khouzam>
Severity: normal    
Priority: P3 CC: cdtdoug, m.prieto, malaperle, marc.dumais, pawel.1.piech, zulliger
Version: 8.0   
Target Milestone: 9.1.0   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/79876
https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=a90d9dfbf8cef53d276484e8c53fe971559767c8
https://git.eclipse.org/r/79942
https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=0b6ca32767127249f7ce558fcf8db3525a214a01
Whiteboard:

Description Marc Khouzam CLA 2011-02-22 15:54:31 EST
When in non-stop mode, if I resume the program without making it stop right away, the thread is shown as running but the process still shows as stopped in the debug view.

If I refresh the DV, the process icon is properly updated.

Sounds similar to Bug 274870
Comment 1 Marc Khouzam CLA 2011-02-22 16:09:24 EST
I think this is because in non-stop, we send IResumed event for the different threads and not the container.  This means that we don't refresh the container in the debug view.

If all threads are running, we should show the container as running.  If one thread or more is suspended we should show the container as suspended.  This is what we see when I refresh the DV but not automatically.

I see two options:
1- when we get an IResumed event in ContainerVMNode, we specify that the container could have changed and must be refreshed
2- when we issue an IResumed event for a thread, we could also issue a IContainerResumed if all threads are now running.

#1 is simpler and safer
#2 is more efficient but potentially more risky as I think we made some assumptions about not having Container events in non-stop
Comment 2 Mario Prieto CLA 2013-08-28 06:42:48 EDT
I think this entry is related to 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=410108
Comment 3 Marc Dumais CLA 2016-08-26 12:59:22 EDT
*** Bug 410108 has been marked as a duplicate of this bug. ***
Comment 4 Eclipse Genie CLA 2016-08-26 13:04:12 EDT
New Gerrit change created: https://git.eclipse.org/r/79876
Comment 5 Marc Dumais CLA 2016-08-26 13:08:52 EDT
(In reply to Marc Khouzam from comment #1)
> I see two options:
> 1- when we get an IResumed event in ContainerVMNode, we specify that the
> container could have changed and must be refreshed
> 2- when we issue an IResumed event for a thread, we could also issue a
> IContainerResumed if all threads are now running.

I went with solution #1 - a node label refresh is relatively light, compared to everything that goes on in CDT when a thread resumes.
Comment 7 Eclipse Genie CLA 2016-08-29 10:02:20 EDT
New Gerrit change created: https://git.eclipse.org/r/79942
Comment 9 Marc Dumais CLA 2016-08-29 11:04:22 EDT
committed to master and 9_1 branches