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 196154 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/cdt/dsf/mi/service/MIBreakpointsManager.java (-8 / +11 lines)
Lines 1514-1531 Link Here
1514
        }
1514
        }
1515
    }
1515
    }
1516
1516
1517
    /**
1517
	/**
1518
     * See bug232415
1518
	 * See bug 232415
1519
     * 
1519
	 * 
1520
     * @param path	the absolute path to the source file
1520
	 * @param path
1521
     * @return
1521
	 *            the absolute path to the source file
1522
     */
1522
	 * @return the simple filename if running on Windows and [path] is not an
1523
    private String adjustDebuggerPath(String path) {
1523
	 *         absolute UNIX one. Otherwise, [path] is returned
1524
	 */
1525
    static String adjustDebuggerPath(String path) {
1524
    	String result = path;
1526
    	String result = path;
1525
    	// Make it MinGW-specific
1527
    	// Make it MinGW-specific
1526
    	if (Platform.getOS().startsWith("win")) { //$NON-NLS-1$
1528
    	if (Platform.getOS().startsWith("win")) { //$NON-NLS-1$
1527
        	if (!path.startsWith("/")) { //$NON-NLS-1$
1529
        	if (!path.startsWith("/")) { //$NON-NLS-1$
1528
        		result = path.substring(path.lastIndexOf('\\') + 1);
1530
        		path = path.replace('\\', '/');
1531
        		result = path.substring(path.lastIndexOf('/') + 1);
1529
        	}
1532
        	}
1530
    	}
1533
    	}
1531
    	return result;
1534
    	return result;
(-)src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java (+4 lines)
Lines 1119-1124 Link Here
1119
	 */
1119
	 */
1120
	public void runToLine(IExecutionDMContext context, String sourceFile,
1120
	public void runToLine(IExecutionDMContext context, String sourceFile,
1121
			int lineNumber, boolean skipBreakpoints, RequestMonitor rm) {
1121
			int lineNumber, boolean skipBreakpoints, RequestMonitor rm) {
1122
		
1123
		// Hack around a MinGW bug; see 196154
1124
		sourceFile = MIBreakpointsManager.adjustDebuggerPath(sourceFile);
1125
		
1122
		runToLocation(context, sourceFile + ":" + Integer.toString(lineNumber), skipBreakpoints, rm); //$NON-NLS-1$
1126
		runToLocation(context, sourceFile + ":" + Integer.toString(lineNumber), skipBreakpoints, rm); //$NON-NLS-1$
1123
	}
1127
	}
1124
1128

Return to bug 196154