Skip to content

Commit

Permalink
Specifying breakpoints contracts.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasnoble committed Jan 26, 2024
1 parent bff58e8 commit 69818be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/Lua/breakpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@ bp = PCSX.addBreakpoint(0x80030000, 'Write', 4, 'Shell write tracing', function(
end)
```

This will ensure that the breakpoint will never crash the emulator, and will instead display the error in the logs, but it will also slow down the execution of the breakpoint. It's up to the user to decide whether or not this is acceptable.
This will ensure that the breakpoint will never crash the emulator, and will instead display the error in the logs, but it will also slow down the execution of the breakpoint. It's up to the user to decide whether or not this is acceptable.

It is safe to add or remove breakpoints from within a breakpoint callback, but it's not safe to remove the breakpoint that is currently being executed. For this specific case, simply return `false` from the invoker callback, and the breakpoint will be removed after the callback returns.

0 comments on commit 69818be

Please sign in to comment.