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

Bug 342351

Summary: [multi-process][console] Process consoles are not named properly
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: normal    
Priority: P3 CC: cdtdoug, malaperle, pawel.1.piech
Version: 7.0Flags: malaperle: review+
Target Milestone: 8.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Fix marc.khouzam: iplog-

Description Marc Khouzam CLA 2011-04-09 08:07:39 EDT
When starting new processes in a multi-process session, we create new consoles for each new process.  Those consoles all use the name of the binary in the launch configuration, which is wrong.  The name should match the binary that was selected.
Comment 1 Marc Khouzam CLA 2011-05-04 21:30:54 EDT
Created attachment 194785 [details]
Fix

This patch stores the name of the binary we are about to start into the attributes that are passed to StartOrRestartProcessSequence_7_0, which will create the console.  When creating the console, it reads the name of the binary from those attributes instead of taking it from the GDBBackend service.

With multi-process, the GDBBackend service cannot be used as it used to.  We will probably need to update it eventually to fit with multi-process better.

Note that for the Restart case, we re-use the label of the previous console, so we don't need to worry about properly setting the binary name in the attributes.

Committed to HEAD.
Comment 2 Marc Khouzam CLA 2011-05-04 21:33:22 EDT
Marc-Andre, this is related to the console, which you've looked at with me before, so can you review this small fix?
Comment 4 Marc-André Laperle CLA 2011-05-06 03:00:35 EDT
Looks good, I tested with gdb 7.2 only. BTW, I still used the 'MultiProcessMenu' to attach a second process. Is there a way to do it right now without this extra plug-in/menu or using the 'Automatically debug forked' option?
Comment 5 Marc-André Laperle CLA 2011-05-06 03:32:11 EDT
(In reply to comment #4)
> BTW, I still used the
> 'MultiProcessMenu' to attach a second process. Is there a way to do it right
> now without this extra plug-in/menu or using the 'Automatically debug forked'
> option?

NVM, I was running in all-stop mode and I just saw bug 341406.
Comment 6 Marc Khouzam CLA 2011-05-06 08:52:52 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > BTW, I still used the
> > 'MultiProcessMenu' to attach a second process. Is there a way to do it right
> > now without this extra plug-in/menu or using the 'Automatically debug forked'
> > option?
> 
> NVM, I was running in all-stop mode and I just saw bug 341406.

No problem.  I will soon be writing the New and Noteworthy about multi-process with those details.  I just want to fix as many bugs as I can before it is too late :-)