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

Bug 350365

Summary: [remote] Remote attach session should use specified binary
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, pawel.1.piech
Version: 8.0Flags: marc.khouzam: review? (pawel.1.piech)
Target Milestone: 8.0.1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Fix
marc.khouzam: iplog-
Fix for master which support multi-attach
marc.khouzam: iplog-
Fix for 8_0
marc.khouzam: iplog-
Cannot use DsfServicesTracker outside the Executor (master)
marc.khouzam: iplog-
Cannot use DsfServicesTracker outside the Executor (8_0) marc.khouzam: iplog-

Description Marc Khouzam CLA 2011-06-25 20:44:57 EDT
With multi-process, whenever trying to attach to a process on a remote machine, we prompt the user for a binary location on the host.  However, this causes a kind of regression in comparison to CDT 7, because when doing a single process remote attach session, the user still gets the prompt, while this was not the case before.

Further, in the launch, the specified binary is never used, which is counter intuitive.

I suggest that if there is a binary specified in the launch, we automatically use it for the very first process the user attaches too.
Comment 1 Marc Khouzam CLA 2011-06-25 21:57:10 EDT
Created attachment 198601 [details]
Fix

This git patch will check if we are doing a single attach and if a binary was specified in the launch; if so, we won't prompt the user but will use the specified binary.

This patch builds on top of the patch of Bug 293679.

I'll need a different patch for the maintenance branch.
Comment 2 Marc Khouzam CLA 2011-06-29 11:58:48 EDT
Created attachment 198840 [details]
Fix for master which support multi-attach

The previous proposed fix did not support using the binary specified in the launch for a multi-attach.  In this new patch I used the simpler approach of storing the binary specified in the launch in our process to binary map.  That allows to use that binary for any process that has the proper name, even for a multi-attach.

I committed this fix to master.

I need a different fix for 8_0 because it doesn't have the multi-attach feature.
Comment 3 Marc Khouzam CLA 2011-06-29 12:20:20 EDT
Created attachment 198841 [details]
Fix for 8_0

This patch is for 8_0 and adds the map of process to binary to avoid extra prompts.

Committed to 8_0
Comment 4 Marc Khouzam CLA 2011-06-29 12:20:47 EDT
Pawel, can you review?
Comment 5 Marc Khouzam CLA 2011-07-22 08:11:12 EDT
Created attachment 200174 [details]
Cannot use DsfServicesTracker outside the Executor (master)

I mistakenly was accessing the DsfServicesTracker outside the executor, which is wrong (and caused an assertion).  This patch fixes it.

Committed to master.
Comment 6 Marc Khouzam CLA 2011-07-22 08:21:38 EDT
Created attachment 200175 [details]
Cannot use DsfServicesTracker outside the Executor (8_0)

Update for the 8_0 branch to not use the DsfServicesTracker outside the executor.

Committed to 8_0
Comment 7 CDT Genie CLA 2011-07-22 09:19:22 EDT
*** cdt git genie on behalf of 350365 ***

    Bug 350365: Cannot use the servicesTracker outside the executor

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=a1229e9c3558671cfbe406222ea78ad14ccbcdc3
Comment 8 CDT Genie CLA 2011-07-22 09:19:28 EDT
*** cdt git genie on behalf of 350365 ***

    Bug 350365: Cannot use the servicesTracker outside the executor

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=030eec1fba9c9309b5d039649643a3aa3d2245cc