Skip to content

Commit

Permalink
ignore output messages for request
Browse files Browse the repository at this point in the history
  • Loading branch information
grahambates committed Nov 18, 2023
1 parent 69d7d29 commit bcab0be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 0 additions & 7 deletions src/debugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ export class UAEDebugSession extends LoggingDebugSession {
protected trace = false;
protected stopOnEntry = false;
protected exceptionMask = defaultArgs.exceptionMask;
protected awaitingStopOnEntry = false;

protected breakpoints?: BreakpointManager;
protected variables?: VariableManager;
Expand Down Expand Up @@ -159,10 +158,6 @@ export class UAEDebugSession extends LoggingDebugSession {

const mutex = new Mutex();
this.gdb.on("stop", (haltStatus) => {
if (this.awaitingStopOnEntry) {
this.awaitingStopOnEntry = false;
return;
}
mutex.runExclusive(async () => {
return this.handleStop(haltStatus).catch((err) => {
logger.error(this.errorString(err));
Expand Down Expand Up @@ -348,8 +343,6 @@ export class UAEDebugSession extends LoggingDebugSession {

if (args.stopOnEntry) {
logger.log("[LAUNCH] Stopping on entry");
// Tell the standard stop hander to ignore
this.awaitingStopOnEntry = true;
await this.gdb.stepIn(Threads.CPU);
this.sendStoppedEvent(Threads.CPU, "entry");
}
Expand Down
4 changes: 2 additions & 2 deletions src/gdbClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ export class GdbClient {
clearTimeout(timeout);
reject(new GdbError(message));
} else if (
!expectedResponse ||
message.startsWith(expectedResponse)
!message.match(/^O[0-9a-f]/i) && // Ignore output
(!expectedResponse || message.startsWith(expectedResponse))
) {
this.responseCallback = undefined;
clearTimeout(timeout);
Expand Down

0 comments on commit bcab0be

Please sign in to comment.