# HG changeset patch # User Chad Peckham # Date 1278712689 18000 # Node ID 40a2929cde0dc41e59e5b7669d51dc7c646d9dd1 # Parent c8b627039298e5c85d2a81b30cf8f9cbe0abaae3 Fix bug 11592 - mixing executables from variant and non-variant builds in the same SDK is OK diff -r c8b627039298 -r 40a2929cde0d debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/ExecutablesTab.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/ExecutablesTab.java Fri Jul 09 14:17:27 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/ExecutablesTab.java Fri Jul 09 16:58:09 2010 -0500 @@ -417,8 +417,15 @@ // removeLastSegments(2) will strip the filename and 'urel', 'udeb' or 'lib' IPath launchExeTargetPath = new Path(new File(launchExeName).getCanonicalPath()).removeLastSegments(2); for (Executable executable : ExecutablesManager.getExecutablesManager().getExecutables(true)) { - IPath exePath = executable.getPath(); - if (launchExeTargetPath.isPrefixOf(exePath)) + IPath exePath = executable.getPath(); + // remove last two segments here also (ignore urel, udeb, lib on executables) + // this is so we can match down to the compiler but not beyond: + // y:\epoc32\release\armv5.\... (for a variant build in raptor) will match + // y:\epco32\release\armv5\... for a non-variant built executable + IPath exePathShort = exePath.removeLastSegments(2); + String sLaunchExeTargetPath = launchExeTargetPath.toOSString(); + String sExePath = exePathShort.toOSString(); + if (sExePath.startsWith(sLaunchExeTargetPath) || sLaunchExeTargetPath.startsWith(sExePath)) files.add(new ExeFileToDebug(exePath.toOSString(), true)); } } catch (Exception e) {