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

Bug 347163

Summary: [attach][remote] Cancelling a remote attach causes a bad debug session
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   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Fix to cancel the attach when the user presses the Cancel button marc.khouzam: iplog-

Description Marc Khouzam CLA 2011-05-25 10:35:18 EDT
When doing a remote attach, DSF-GDB prompt the user for binary file path on the host.  If I press Cancel, the launch gets messed up.  Instead we should abort the entire attach.
Comment 1 Marc Khouzam CLA 2011-05-25 10:52:33 EDT
(In reply to comment #0)
> If I press Cancel, the launch gets messed up.

Actually, the launch is not "messed up", but gdb does not have the binary and the debug session will not work very nicely.

I think we should abort the entire attach.
Comment 2 Marc Khouzam CLA 2011-05-25 15:03:10 EDT
Created attachment 196598 [details]
Fix to cancel the attach when the user presses the Cancel button

A simple check to see if the user pressed the Cancel button when being prompted for a binary.  If so, we simply return gracefully, which cancels the attempt at attaching.
Comment 3 Marc Khouzam CLA 2011-05-25 15:07:42 EDT
Committed to HEAD for user-friendliness.

Pawel can you review?
Comment 4 CDT Genie CLA 2011-05-25 15:23:08 EDT
*** cdt cvs genie on behalf of mkhouzam ***
Bug 347163: Canceling a remote attach causes a bad debug session

[*] GdbConnectCommand.java 1.11 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbConnectCommand.java?root=Tools_Project&r1=1.10&r2=1.11