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

Bug 337927

Summary: [multi-process] Invalid assert when fetching process information
Product: [Tools] CDT Reporter: Marc Khouzam <marc.khouzam>
Component: cdt-debug-dsf-gdbAssignee: Marc Khouzam <marc.khouzam>
Status: RESOLVED FIXED QA Contact: Marc Khouzam <marc.khouzam>
Severity: minor    
Priority: P3 CC: aleherb+eclipse, cdtdoug, john.cortell, pawel.1.piech
Version: 8.0Flags: marc.khouzam: review? (john.cortell)
Target Milestone: 8.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Fix removing the assertion marc.khouzam: iplog-

Description Marc Khouzam CLA 2011-02-22 21:02:51 EST
Created attachment 189564 [details]
Fix removing the assertion

When requesting a process execution data, we expect the name of the process to be available,  so we added an "assert false" in that case.

I found a couple of situation where we could actually hit this code in a valid situation:

1- when changing the Preference that allows GDB to be kept running even when a process runs to completion
2- when running multiple processes and one of them runs to completion.

In both those cases, the debug session remains alive, but we remove the process name from our list because we got an event from GDB telling us that the process is finished.

Since the debug session is alive, the DView updates and request the data for the old process, which makes us hit the assertion.  The process will immediately be removed from the DView, so it is ok to return a name of "Unknown name" instead of having the assert.
Comment 1 Marc Khouzam CLA 2011-02-22 21:05:39 EST
Committed to HEAD.

John, do you agree?
Comment 2 John Cortell CLA 2011-02-22 21:09:22 EST
I do. Though I know the assertion sometimes fails on a basic launch. Unfortunately, I don't think there's a way to separate out that scenario from yours, so removing the assert it the right thing to do, IMO.
Comment 4 Marc Khouzam CLA 2011-05-17 13:31:50 EDT
*** Bug 310994 has been marked as a duplicate of this bug. ***