Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319165 - Unnecessary step in GDBControl_7_0.startOrRestart
Summary: Unnecessary step in GDBControl_7_0.startOrRestart
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 7.0   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-07 13:10 EDT by Vladimir Prus CLA
Modified: 2010-07-08 12:53 EDT (History)
1 user (show)

See Also:


Attachments
The proposed patch (3.77 KB, patch)
2010-07-07 13:11 EDT, Vladimir Prus CLA
marc.khouzam: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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