Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 164335 Details for
Bug 308516
The gdb directory argument (--cd) is always the project path
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Get the working dir from the LaunchConfiguration
CDI-LCWorkingDir-patch.txt (text/plain), 1.86 KB, created by
Marc-André Laperle
on 2010-04-09 00:10:09 EDT
(
hide
)
Description:
Get the working dir from the LaunchConfiguration
Filename:
MIME Type:
Creator:
Marc-André Laperle
Created:
2010-04-09 00:10:09 EDT
Size:
1.86 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.cdt.debug.mi.core >Index: src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger2.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/all/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger2.java,v >retrieving revision 1.15 >diff -u -r1.15 GDBCDIDebugger2.java >--- src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger2.java 13 Mar 2009 13:47:40 -0000 1.15 >+++ src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger2.java 9 Apr 2010 04:04:10 -0000 >@@ -33,6 +33,7 @@ > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.OperationCanceledException; > import org.eclipse.core.runtime.Path; >+import org.eclipse.core.variables.VariablesPlugin; > import org.eclipse.debug.core.ILaunch; > import org.eclipse.debug.core.ILaunchConfiguration; > >@@ -234,10 +235,23 @@ > } > } > >- protected String getWorkingDirectory( ILaunchConfiguration config ) throws CoreException { >- File cwd = getProjectPath( config ).toFile(); >- CommandFactory factory = getCommandFactory( config ); >- return factory.getWorkingDirectory(cwd); >+ protected String getWorkingDirectory( ILaunchConfiguration config ) throws CoreException { >+ IPath path = null; >+ String location = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, (String)null); >+ >+ if (location != null) { >+ String expandedLocation = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(location); >+ if (expandedLocation.length() > 0) { >+ path = new Path(expandedLocation); >+ } >+ } >+ >+ if(path == null){ >+ path = getProjectPath( config ); >+ } >+ >+ CommandFactory factory = getCommandFactory( config ); >+ return factory.getWorkingDirectory(path.toFile()); > } > > protected String getCommandFile( ILaunchConfiguration config ) throws CoreException {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
malaperle
:
iplog-
Actions:
View
|
Diff
Attachments on
bug 308516
: 164335