Skip to content

Commit

Permalink
Add DefBreakPoint
Browse files Browse the repository at this point in the history
for #37
  • Loading branch information
thomtl committed Jul 27, 2019
1 parent 43ac335 commit 5426bae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/aml_opcodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
#define NOP_OP 0xA3
#define RETURN_OP 0xA4
#define BREAK_OP 0xA5
#define BREAKPOINT_OP 0xCC
#define ONES_OP 0xFF

// Extended opcodes
Expand Down
7 changes: 7 additions & 0 deletions core/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -2121,6 +2121,13 @@ static int lai_exec_parse(int parse_mode, lai_state_t *state) {
break;
}

case BREAKPOINT_OP: {
pc += 2;
lai_exec_commit_pc(state, pc);
lai_debug("Encountered BreakPointOp");
break;
}

case (EXTOP_PREFIX << 8) | DEBUG_OP: {
if (lai_exec_reserve_opstack(state))
return 1;
Expand Down

0 comments on commit 5426bae

Please sign in to comment.