Skip to content

Commit b333b80

Browse files
committed
force executable to Unix format for GDB
1 parent 4d4c29c commit b333b80

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/frontend/configprovider.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,14 @@ export class CortexDebugConfigurationProvider implements vscode.DebugConfigurati
271271
}
272272
}
273273

274-
private validateLoadAndSymbolFiles(config: vscode.DebugConfiguration, cwd: any) {
274+
private validateLoadAndSymbolFiles(config: vscode.DebugConfiguration, cwd: string) {
275275
// Right now, we don't consider a bad executable as fatal. Technically, you don't need an executable but
276276
// users will get a horrible debug experience ... so many things don't work.
277+
if (config.executable) {
278+
let exe = config.executable;
279+
exe = path.isAbsolute(exe) ? exe : path.join(cwd || '.', exe);
280+
config.executable = path.normalize(exe).replace(/\\/g, '/');
281+
}
277282
const def = defSymbolFile(config.executable);
278283
const symFiles: SymbolFile[] = config.symbolFiles?.map((v) => typeof v === 'string' ? defSymbolFile(v) : v) || [def];
279284
if (!symFiles || (symFiles.length === 0)) {

0 commit comments

Comments
 (0)