Skip to content

Commit

Permalink
Manual break now possible in stepOut.
Browse files Browse the repository at this point in the history
  • Loading branch information
maziac committed Mar 20, 2020
1 parent a6770cc commit bc4bcc8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Fix for "Fix including nested directories".
- Step history.
- A lot of refactoring regarding history/reverse debugging.
- True cpu history for internal simulator.

# 0.13.1
- Code coverage for internal simulator.
Expand Down
8 changes: 8 additions & 0 deletions src/misc/utility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,14 @@ export class Utility {
return buf;
}

/**
* An async function that waits for somee miliseconds.
* @param ms time to wait in ms
*/
public static async timeout(ms: number): Promise<void> {
return new Promise(resolve => setTimeout(resolve, ms));
}


/**
* Returns the time since the last call to this method.
Expand Down
7 changes: 7 additions & 0 deletions src/remotes/dzrp/dzrpremote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,10 @@ export class DzrpRemote extends RemoteBase {

// Loop until SP indicates that we are out of the current subroutine
while (true) {
// Give vscode some time to show debug controls
// (Maybe this is required here because of the mutex)
await Utility.timeout(1);

// Lock mutex
releaseMutex=await mutex.acquire();

Expand Down Expand Up @@ -474,6 +478,9 @@ export class DzrpRemote extends RemoteBase {
prevSp=currSp;
}

// Release mutex
releaseMutex();

// Clear registers
this.postStep();

Expand Down

0 comments on commit bc4bcc8

Please sign in to comment.