Skip to content

Commit

Permalink
force executable to Unix format for GDB
Browse files Browse the repository at this point in the history
  • Loading branch information
haneefdm committed Jan 16, 2025
1 parent 4d4c29c commit b333b80
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/frontend/configprovider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,14 @@ export class CortexDebugConfigurationProvider implements vscode.DebugConfigurati
}
}

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

0 comments on commit b333b80

Please sign in to comment.