Skip to content

Commit 8c7ebb5

Browse files
committed
always report mi2 errors during launch (fixes #1096)
1 parent 61f3ba5 commit 8c7ebb5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/gdb.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,9 @@ export class GDBDebugSession extends LoggingDebugSession {
575575
return doResolve();
576576
}
577577
const symbolsPromise = this.loadSymbols(); // This is totally async and in most cases, done while gdb is starting
578+
let gdbPromiseAsyncErr;
578579
const gdbPromise = this.startGdb(response);
580+
gdbPromise.catch((err) => { gdbPromiseAsyncErr = err });
579581
this.usingParentServer = this.args.pvtMyConfigFromParent && !this.args.pvtMyConfigFromParent.detached;
580582
this.getTCPPorts(this.usingParentServer).then(async () => {
581583
await this.serverController.allocateRTTPorts(); // Must be done before serverArguments()
@@ -648,6 +650,8 @@ export class GDBDebugSession extends LoggingDebugSession {
648650
// 3. Found free TCP ports and launched gdb-server
649651
// 4. Finished reading symbols from objdump and nm
650652
const showTimes = this.args.showDevDebugOutput && this.args.showDevDebugTimestamps;
653+
if (gdbPromiseAsyncErr)
654+
throw gdbPromiseAsyncErr;
651655
await gdbPromise;
652656
if (showTimes) { this.handleMsg('log', 'Debug Time: GDB Ready...\n'); }
653657

0 commit comments

Comments
 (0)