mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:17:34 +00:00
LibDebug: Add optional setup_child() callback to debugger
If set, this callback gets called right after fork() in the child process. It can be used by the caller if it wants to perform some logic in the child process before it starts executing the debuggee program.
This commit is contained in:
parent
0cea8d1310
commit
a02d8e5710
2 changed files with 13 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Demangle.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <AK/Optional.h>
|
||||
|
@ -26,7 +27,7 @@ namespace Debug {
|
|||
|
||||
class DebugSession : public ProcessInspector {
|
||||
public:
|
||||
static OwnPtr<DebugSession> exec_and_attach(String const& command, String source_root = {});
|
||||
static OwnPtr<DebugSession> exec_and_attach(String const& command, String source_root = {}, Function<ErrorOr<void>()> setup_child = {});
|
||||
|
||||
virtual ~DebugSession() override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue