Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorAlena Laskavaia2008-07-28 11:04:29 -0400
committerAlena Laskavaia2008-07-28 11:04:29 -0400
commitf42fbd883f2c9d9a85397d8345a20724cb4f6e8a (patch)
treece35055eccc211c8f6e6bc1182c66859bd8666d6 /debug
parent6a68a6691abfceae5500df802cf0ed46e83c34cb (diff)
downloadorg.eclipse.cdt-f42fbd883f2c9d9a85397d8345a20724cb4f6e8a.tar.gz
org.eclipse.cdt-f42fbd883f2c9d9a85397d8345a20724cb4f6e8a.tar.xz
org.eclipse.cdt-f42fbd883f2c9d9a85397d8345a20724cb4f6e8a.zip
- fixed resolving source location when debugger returns resolved path itself and absolute path container not in the list
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupParticipant.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupParticipant.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupParticipant.java
index 1acfac24a5..76270d0562 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupParticipant.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupParticipant.java
@@ -13,7 +13,10 @@
*******************************************************************************/
package org.eclipse.cdt.debug.internal.core.sourcelookup;
+import java.io.File;
+
import org.eclipse.cdt.debug.core.model.ICStackFrame;
+import org.eclipse.cdt.debug.core.sourcelookup.AbsolutePathSourceContainer;
import org.eclipse.cdt.debug.core.sourcelookup.ISourceLookupChangeListener;
import org.eclipse.cdt.debug.internal.core.ListenerList;
import org.eclipse.core.runtime.CoreException;
@@ -82,8 +85,14 @@ public class CSourceLookupParticipant extends AbstractSourceLookupParticipant {
name = (String)object;
}
Object[] foundElements = super.findSourceElements( object );
- if (foundElements.length == 0 && (object instanceof IDebugElement))
- foundElements = new Object[] { new CSourceNotFoundElement( (IDebugElement) object ) };
+ if (foundElements.length == 0 && (object instanceof IDebugElement)) {
+ // debugger could have resolved it itself and "name" is an absolute path
+ if (new File(name).exists()) {
+ foundElements = new AbsolutePathSourceContainer().findSourceElements(name);
+ } else {
+ foundElements = new Object[] { new CSourceNotFoundElement((IDebugElement) object) };
+ }
+ }
return foundElements;
}

Back to the top