summaryrefslogtreecommitdiff
path: root/Libraries/LibDebug/DebugSession.h
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibDebug/DebugSession.h')
-rw-r--r--Libraries/LibDebug/DebugSession.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/Libraries/LibDebug/DebugSession.h b/Libraries/LibDebug/DebugSession.h
index fc79c9b329..6912eb59dc 100644
--- a/Libraries/LibDebug/DebugSession.h
+++ b/Libraries/LibDebug/DebugSession.h
@@ -48,8 +48,6 @@ class DebugSession {
public:
static OwnPtr<DebugSession> exec_and_attach(const String& command);
- // Has to be public for OwnPtr::make
- DebugSession(int pid);
~DebugSession();
int pid() const { return m_debuggee_pid; }
@@ -103,7 +101,7 @@ public:
const ELF::Loader& elf() const { return *m_elf; }
NonnullRefPtr<const ELF::Loader> elf_ref() const { return m_elf; }
- const MappedFile& executable() const { return *m_executable; }
+ const MappedFile& executable() const { return m_executable; }
const DebugInfo& debug_info() const { return m_debug_info; }
enum DebugDecision {
@@ -121,15 +119,17 @@ public:
};
private:
+ explicit DebugSession(pid_t);
+
// x86 breakpoint instruction "int3"
static constexpr u8 BREAKPOINT_INSTRUCTION = 0xcc;
- static NonnullOwnPtr<const MappedFile> initialize_executable_mapped_file(int pid);
+ static MappedFile map_executable_for_process(pid_t);
int m_debuggee_pid { -1 };
bool m_is_debuggee_dead { false };
- NonnullOwnPtr<const MappedFile> m_executable;
+ MappedFile m_executable;
NonnullRefPtr<const ELF::Loader> m_elf;
DebugInfo m_debug_info;