1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:27:46 +00:00

HackStudio: Make Editor ask Debugger if a breakpoint was added/removed

Rather than adding/removing a breakpoint indicator, and then telling the
debugger about it and hoping it works, let the debugger tell us if it
succeeded and then use that to update the indicator.

This prevents the user from adding breakpoints to invalid locations
while the debugger is running. It also avoids a couple of scary
VERIFY()s. We still allow creating breakpoints in invalid locations
while the debugger is *not* running.
This commit is contained in:
Sam Atkins 2024-01-11 14:57:57 +00:00 committed by Andrew Kaster
parent 3910efb80b
commit ad59fb7cf0
3 changed files with 43 additions and 30 deletions

View file

@ -34,7 +34,7 @@ public:
static bool is_initialized();
void on_breakpoint_change(ByteString const& file, size_t line, BreakpointChange change_type);
[[nodiscard]] bool change_breakpoint(ByteString const& file, size_t line, BreakpointChange change_type);
bool set_execution_position(ByteString const& file, size_t line);
void set_executable_path(ByteString const& path) { m_executable_path = path; }