Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 232415 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/dd/mi/service/MIBreakpointsManager.java (-2 / +21 lines)
Lines 41-46 Link Here
41
import org.eclipse.core.runtime.CoreException;
41
import org.eclipse.core.runtime.CoreException;
42
import org.eclipse.core.runtime.IProgressMonitor;
42
import org.eclipse.core.runtime.IProgressMonitor;
43
import org.eclipse.core.runtime.IStatus;
43
import org.eclipse.core.runtime.IStatus;
44
import org.eclipse.core.runtime.Platform;
44
import org.eclipse.core.runtime.Status;
45
import org.eclipse.core.runtime.Status;
45
import org.eclipse.core.runtime.jobs.ISchedulingRule;
46
import org.eclipse.core.runtime.jobs.ISchedulingRule;
46
import org.eclipse.core.runtime.jobs.Job;
47
import org.eclipse.core.runtime.jobs.Job;
Lines 1327-1346 Link Here
1327
        String hostPath = (String) attributes.get(ICBreakpoint.SOURCE_HANDLE);
1328
        String hostPath = (String) attributes.get(ICBreakpoint.SOURCE_HANDLE);
1328
1329
1329
        if (hostPath != null) {
1330
        if (hostPath != null) {
1331
1330
            ISourceLookupDMContext srcDmc = DMContexts.getAncestorOfType(dmc, ISourceLookupDMContext.class);
1332
            ISourceLookupDMContext srcDmc = DMContexts.getAncestorOfType(dmc, ISourceLookupDMContext.class);
1331
            if (srcDmc != null) {
1333
            if (srcDmc != null) {
1332
                fSourceLookup.getDebuggerPath(srcDmc, hostPath,
1334
                fSourceLookup.getDebuggerPath(srcDmc, hostPath,
1333
                    new DataRequestMonitor<String>(getExecutor(), rm) {
1335
                    new DataRequestMonitor<String>(getExecutor(), rm) {
1334
                        @Override
1336
                        @Override
1335
                        protected void handleSuccess() {
1337
                        protected void handleSuccess() {
1336
                            attributes.put(ATTR_DEBUGGER_PATH, getData());
1338
                            attributes.put(ATTR_DEBUGGER_PATH, adjustDebuggerPath(getData()));
1337
                            rm.done();
1339
                            rm.done();
1338
                        }
1340
                        }
1339
                    });
1341
                    });
1340
            } else {
1342
            } else {
1341
                // Source lookup not available for given context, use the host
1343
                // Source lookup not available for given context, use the host
1342
                // path for the debugger path.
1344
                // path for the debugger path.
1343
                attributes.put(ATTR_DEBUGGER_PATH, hostPath);
1345
                attributes.put(ATTR_DEBUGGER_PATH, adjustDebuggerPath(hostPath));
1344
                rm.done();
1346
                rm.done();
1345
            }
1347
            }
1346
        } else {
1348
        } else {
Lines 1351-1356 Link Here
1351
    }
1353
    }
1352
1354
1353
    /**
1355
    /**
1356
     * See bug232415
1357
     * 
1358
     * @param path	the absolute path to the source file
1359
     * @return
1360
     */
1361
    private String adjustDebuggerPath(String path) {
1362
    	String result = path;
1363
    	// Make it MinGW-specific
1364
    	if (Platform.getOS().startsWith("win")) { //$NON-NLS-1$
1365
        	if (!path.startsWith("/")) { //$NON-NLS-1$
1366
        		result = path.substring(path.lastIndexOf('\\') + 1);
1367
        	}
1368
    	}
1369
    	return result;
1370
    }
1371
1372
    /**
1354
     * Determine the set of modified attributes.
1373
     * Determine the set of modified attributes.
1355
     * Elementary set operations in full action :-)
1374
     * Elementary set operations in full action :-)
1356
     * 
1375
     * 

Return to bug 232415