Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/gdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,16 @@ export class GDBDebugSession extends DebugSession {

if (!this.args.noDebug && this.args.runToEntryPoint) {
this.miDebugger.sendCommand(`break-insert -t --function ${this.args.runToEntryPoint}`).then(() => {
this.miDebugger.once('generic-stopped', launchComplete);
const timeout = setTimeout(() => {
this.handleMsg('stderr', `Run to ${this.args.runToEntryPoint} timed out.`);
this.miDebugger.interrupt();
}, 3000);

this.miDebugger.once('generic-stopped', () => {
clearTimeout(timeout);
launchComplete();
});

// To avoid race conditions between finishing configuration, we should stay
// in stopped mode. Or, we end up clobbering the stopped event that might come
// during setting of any additional breakpoints. Note that configDone may already
Expand Down