mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:37:36 +00:00
LibCore: Implement a helper that waits for a debugger then breaks
This method can be used to force the current process to sleep, waiting for a debugger to attach. On attach, the debugger breaks at the callsite directly. This is tested on Linux and macOS, in Clion and also terminal gdb and lldb.
This commit is contained in:
parent
216667368d
commit
35c45a94d3
2 changed files with 23 additions and 0 deletions
|
@ -31,6 +31,7 @@ public:
|
|||
};
|
||||
static ErrorOr<void> set_name(StringView, SetThreadName = SetThreadName::No);
|
||||
|
||||
static void wait_for_debugger_and_break();
|
||||
static ErrorOr<bool> is_being_debugged();
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue