summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibDebug/DebugSession.h
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2021-12-20 22:37:19 +0200
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-12-22 02:14:32 -0800
commita02d8e57101ba643c1b9978663cd43cea3caa85a (patch)
tree38345bebe9698ebacde9e0b4d4d95e254ef95b8f /Userland/Libraries/LibDebug/DebugSession.h
parent0cea8d13105774939b2d08d019d1e7b9f6d4ae7d (diff)
downloadserenity-a02d8e57101ba643c1b9978663cd43cea3caa85a.zip
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.
Diffstat (limited to 'Userland/Libraries/LibDebug/DebugSession.h')
-rw-r--r--Userland/Libraries/LibDebug/DebugSession.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibDebug/DebugSession.h b/Userland/Libraries/LibDebug/DebugSession.h
index 0949ca47f7..eaffaa82c4 100644
--- a/Userland/Libraries/LibDebug/DebugSession.h
+++ b/Userland/Libraries/LibDebug/DebugSession.h
@@ -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;