From 69818be11d6ff9f94d3515b2b4b7f6dcb2f76382 Mon Sep 17 00:00:00 2001 From: Nicolas Pixel Noble Date: Thu, 25 Jan 2024 20:05:25 -0800 Subject: [PATCH] Specifying breakpoints contracts. --- docs/Lua/breakpoints.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/Lua/breakpoints.md b/docs/Lua/breakpoints.md index 818c5d7f7..cce9c8a06 100644 --- a/docs/Lua/breakpoints.md +++ b/docs/Lua/breakpoints.md @@ -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. \ No newline at end of file +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.