415 |
415 |
416 // ignore 'urel', 'udeb' and 'lib' directories when getting the binaries for the same target |
416 // ignore 'urel', 'udeb' and 'lib' directories when getting the binaries for the same target |
417 // removeLastSegments(2) will strip the filename and 'urel', 'udeb' or 'lib' |
417 // removeLastSegments(2) will strip the filename and 'urel', 'udeb' or 'lib' |
418 IPath launchExeTargetPath = new Path(new File(launchExeName).getCanonicalPath()).removeLastSegments(2); |
418 IPath launchExeTargetPath = new Path(new File(launchExeName).getCanonicalPath()).removeLastSegments(2); |
419 for (Executable executable : ExecutablesManager.getExecutablesManager().getExecutables(true)) { |
419 for (Executable executable : ExecutablesManager.getExecutablesManager().getExecutables(true)) { |
420 IPath exePath = executable.getPath(); |
420 IPath exePath = executable.getPath(); |
421 if (launchExeTargetPath.isPrefixOf(exePath)) |
421 // remove last two segments here also (ignore urel, udeb, lib on executables) |
|
422 // this is so we can match down to the compiler but not beyond: |
|
423 // y:\epoc32\release\armv5.<variant>\... (for a variant build in raptor) will match |
|
424 // y:\epco32\release\armv5\... for a non-variant built executable |
|
425 IPath exePathShort = exePath.removeLastSegments(2); |
|
426 String sLaunchExeTargetPath = launchExeTargetPath.toOSString(); |
|
427 String sExePath = exePathShort.toOSString(); |
|
428 if (sExePath.startsWith(sLaunchExeTargetPath) || sLaunchExeTargetPath.startsWith(sExePath)) |
422 files.add(new ExeFileToDebug(exePath.toOSString(), true)); |
429 files.add(new ExeFileToDebug(exePath.toOSString(), true)); |
423 } |
430 } |
424 } catch (Exception e) { |
431 } catch (Exception e) { |
425 LaunchPlugin.log(e); |
432 LaunchPlugin.log(e); |
426 } |
433 } |