Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorMikhail Khodjaiants2003-09-17 21:57:33 +0000
committerMikhail Khodjaiants2003-09-17 21:57:33 +0000
commit6e4db834c02055f433c47622074b8bcced876a7d (patch)
treeb897c08b9e3e27216b828046f628dda09dd0d715 /debug
parent05fddd74eda49f49b2968796447af5299e5ff567 (diff)
downloadorg.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/ChangeLog4
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CDirectorySourceLocation.java16
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)

Back to the top