LLDB mainline
PostMortemProcess.h
Go to the documentation of this file.
1//===-- PostMortemProcess.h -------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_TARGET_POSTMORTEMPROCESS_H
10#define LLDB_TARGET_POSTMORTEMPROCESS_H
11
12#include "lldb/Target/Process.h"
13
14namespace lldb_private {
15
16/// \class PostMortemProcess
17/// Base class for all processes that don't represent a live process, such as
18/// coredumps or processes traced in the past.
19///
20/// \a lldb_private::Process virtual functions overrides that are common
21/// between these kinds of processes can have default implementations in this
22/// class.
23class PostMortemProcess : public Process {
24 using Process::Process;
25
26public:
28 const FileSpec &core_file)
29 : Process(target_sp, listener_sp), m_core_file(core_file) {}
30
31 bool IsLiveDebugSession() const override { return false; }
32
33 FileSpec GetCoreFile() const override { return m_core_file; }
34
35protected:
37};
38
39} // namespace lldb_private
40
41#endif // LLDB_TARGET_POSTMORTEMPROCESS_H
A file utility class.
Definition: FileSpec.h:56
Base class for all processes that don't represent a live process, such as coredumps or processes trac...
PostMortemProcess(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const FileSpec &core_file)
bool IsLiveDebugSession() const override
FileSpec GetCoreFile() const override
Provide a way to retrieve the core dump file that is loaded for debugging.
A plug-in interface definition class for debugging a process.
Definition: Process.h:343
Process(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp)
Construct with a shared pointer to a target, and the Process listener.
Definition: Process.cpp:418
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Listener > ListenerSP
Definition: lldb-forward.h:368
std::shared_ptr< lldb_private::Target > TargetSP
Definition: lldb-forward.h:448