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

Bug 319165

Summary: Unnecessary step in GDBControl_7_0.startOrRestart
Product: [Tools] CDT Reporter: Vladimir Prus <vladimir.prus>
Component: cdt-debug-dsf-gdbAssignee: Marc Khouzam <marc.khouzam>
Status: RESOLVED FIXED QA Contact: Marc Khouzam <marc.khouzam>
Severity: normal    
Priority: P3 CC: pawel.1.piech
Version: 7.0   
Target Milestone: 8.0   
Hardware: Other   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
The proposed patch marc.khouzam: iplog+

Description Vladimir Prus CLA 2010-07-07 13:10:15 EDT
Build Identifier: 

The GDBControl_7_0.startOrRestart runs a sequence of steps. One of this steps determines whether to use -exec-run or -exec-continue, and stores a command in a member variable. A later step then queues the command. However, there's no reason to use a step to construct a command -- this is not an operation that takes a noticeable time, so using a step is likely to only add code size and some runtime overhead. The attached patch moves this logic into the step that actually runs the command.

Reproducible: Always
Comment 1 Vladimir Prus CLA 2010-07-07 13:11:00 EDT
Created attachment 173681 [details]
The proposed patch
Comment 2 Marc Khouzam CLA 2010-07-08 11:33:53 EDT
Thanks.
I committed to HEAD with a extra change for an unnecessary 'global' variable.
Comment 3 CDT Genie CLA 2010-07-08 12:53:18 EDT
*** cdt cvs genie on behalf of mkhouzam ***
Bug 319165: Unnecessary step in GDBControl_7_0.startOrRestart

[*] GDBControl_7_0.java 1.19 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl_7_0.java?root=Tools_Project&r1=1.18&r2=1.19