diff options
author | Mikhail Khodjaiants | 2003-09-17 21:57:33 +0000 |
---|---|---|
committer | Mikhail Khodjaiants | 2003-09-17 21:57:33 +0000 |
commit | 6e4db834c02055f433c47622074b8bcced876a7d (patch) | |
tree | b897c08b9e3e27216b828046f628dda09dd0d715 /debug | |
parent | 05fddd74eda49f49b2968796447af5299e5ff567 (diff) | |
download | org.eclipse.cdt-6e4db834c02055f433c47622074b8bcced876a7d.tar.gz org.eclipse.cdt-6e4db834c02055f433c47622074b8bcced876a7d.tar.xz org.eclipse.cdt-6e4db834c02055f433c47622074b8bcced876a7d.zip |
Temporary fix for PR 39061: Attach source does not work for applications compiled in CygWin.
Diffstat (limited to 'debug')
-rw-r--r-- | debug/org.eclipse.cdt.debug.core/ChangeLog | 4 | ||||
-rw-r--r-- | debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CDirectorySourceLocation.java | 16 |
2 files changed, 17 insertions, 3 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index bd72d5708aa..d30b118e329 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,7 @@ +2003-10-17 Mikhail Khodjaiants + Temporary fix for PR 39061: Attach source does not work for applications compiled in CygWin. + * CDirectorySourceLocation.java + 2003-10-16 Mikhail Khodjaiants Fix for PR 38468: Error in files location. Use the 'getCanonicalPath' method of the 'File' class to obtain the file name. diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CDirectorySourceLocation.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CDirectorySourceLocation.java index 99108e17a71..d9e047acfad 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CDirectorySourceLocation.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CDirectorySourceLocation.java @@ -85,15 +85,25 @@ public class CDirectorySourceLocation implements IDirectorySourceLocation */ public Object findSourceElement( String name ) throws CoreException { + Object result = null; if ( getDirectory() != null ) { File file = new File( name ); if ( file.isAbsolute() ) - return findFileByAbsolutePath( name ); + result = findFileByAbsolutePath( name ); else - return findFileByRelativePath( name ); + result = findFileByRelativePath( name ); + if ( result == null && getAssociation() != null ) + { + IPath path = new Path( name ); + if ( path.segmentCount() > 1 && getAssociation().isPrefixOf( path ) ) + { + path = getDirectory().append( path.removeFirstSegments( getAssociation().segmentCount() ) ); + result = findFileByAbsolutePath( path.toOSString() ); + } + } } - return null; + return result; } /* (non-Javadoc) |