# HG changeset patch # User wpaul # Date 1260997107 21600 # Node ID 139a9d8351fe2c492cc93af39b99fe6c691842a7 # Parent ae5ff180a61d26f5ec76cc4fb56ce51929287bb8 fixed bug #10282. diff -r ae5ff180a61d -r 139a9d8351fe debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/ui/executables/SymbianSourceFileRemapping.java --- a/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/ui/executables/SymbianSourceFileRemapping.java Wed Dec 16 10:28:34 2009 -0600 +++ b/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/ui/executables/SymbianSourceFileRemapping.java Wed Dec 16 14:58:27 2009 -0600 @@ -16,9 +16,11 @@ */ package com.nokia.cdt.debug.cw.symbian.ui.executables; +import org.eclipse.cdt.debug.core.CDebugCorePlugin; import org.eclipse.cdt.debug.core.executables.ISourceFileRemapping; import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator; import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceLookupDirector; +import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; @@ -35,6 +37,16 @@ public String remapSourceFile(IPath executable, String filePath) { + try { + // handle the case where the common lookup finds the file in the workspace + Object[] foundElements = CDebugCorePlugin.getDefault().getCommonSourceLookupDirector().findSourceElements(filePath); + if (foundElements.length == 1 && foundElements[0] instanceof IFile) { + IFile newLocation = (IFile) foundElements[0]; + return newLocation.getLocation().toOSString(); + } + } catch (CoreException e1) { + } + String epocRoot = ""; String[] segs = executable.segments(); for (int i = 0; i < segs.length; i++) {