Quitting normally works without it thinking there is an exception

This commit is contained in:
WebFreak001 2016-02-09 15:52:23 +01:00
commit 40f63c1e2d
2 changed files with 3 additions and 0 deletions

View file

@ -101,6 +101,8 @@ export class MI2 extends EventEmitter implements IBackend {
this.emit("step-out-end", parsed);
else if (reason == "signal-received")
this.emit("signal-stop", parsed);
else if (reason == "exited-normally")
this.emit("exited-normally", parsed);
else {
this.log("console", "Not implemented stop reason (assuming exception): " + reason);
this.emit("stopped", parsed);

View file

@ -36,6 +36,7 @@ class MI2DebugSession extends DebugSession {
this.sendResponse(response);
this.gdbDebugger = new MI2("gdb", ["-q", "--interpreter=mi2"]);
this.gdbDebugger.on("quit", this.quitEvent.bind(this));
this.gdbDebugger.on("exited-normally", this.quitEvent.bind(this));
this.gdbDebugger.on("stopped", this.stopEvent.bind(this));
this.gdbDebugger.on("msg", this.handleMsg.bind(this));
this.gdbDebugger.on("breakpoint", this.handleBreakpoint.bind(this));