LLDB mainline
SaveCoreOptions.h
Go to the documentation of this file.
1//===-- SaveCoreOptions.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_SOURCE_PLUGINS_OBJECTFILE_SaveCoreOPTIONS_H
10#define LLDB_SOURCE_PLUGINS_OBJECTFILE_SaveCoreOPTIONS_H
11
14
15#include <optional>
16#include <set>
17#include <string>
18#include <unordered_set>
19
21
22namespace lldb_private {
23
25public:
27 ~SaveCoreOptions() = default;
28
29 lldb_private::Status SetPluginName(const char *name);
30 std::optional<std::string> GetPluginName() const;
31
32 void SetStyle(lldb::SaveCoreStyle style);
34
36 const std::optional<lldb_private::FileSpec> GetOutputFile() const;
37
39
41 bool RemoveThread(lldb::ThreadSP thread_sp);
42 bool ShouldThreadBeSaved(lldb::tid_t tid) const;
43 bool HasSpecifiedThreads() const;
44
47
49
50 void Clear();
51
52private:
54
55 std::optional<std::string> m_plugin_name;
56 std::optional<lldb_private::FileSpec> m_file;
57 std::optional<lldb::SaveCoreStyle> m_style;
59 std::unordered_set<lldb::tid_t> m_threads_to_save;
61};
62} // namespace lldb_private
63
64#endif // LLDB_SOURCE_PLUGINS_OBJECTFILE_SAVECOREOPTIONS_H
A file utility class.
Definition: FileSpec.h:56
Status SetProcess(lldb::ProcessSP process_sp)
lldb_private::Status SetPluginName(const char *name)
bool RemoveThread(lldb::ThreadSP thread_sp)
const std::optional< lldb_private::FileSpec > GetOutputFile() const
lldb::SaveCoreStyle GetStyle() const
Status AddThread(lldb::ThreadSP thread_sp)
std::optional< std::string > m_plugin_name
void SetStyle(lldb::SaveCoreStyle style)
void AddMemoryRegionToSave(const lldb_private::MemoryRegionInfo &region)
std::optional< std::string > GetPluginName() const
const MemoryRanges & GetCoreFileMemoryRanges() const
std::optional< lldb::SaveCoreStyle > m_style
void SetOutputFile(lldb_private::FileSpec file)
std::unordered_set< lldb::tid_t > m_threads_to_save
Status EnsureValidConfiguration(lldb::ProcessSP process_sp) const
bool ShouldThreadBeSaved(lldb::tid_t tid) const
std::optional< lldb_private::FileSpec > m_file
An error handling class.
Definition: Status.h:115
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Thread > ThreadSP
Definition: lldb-forward.h:450
std::shared_ptr< lldb_private::Process > ProcessSP
Definition: lldb-forward.h:389
uint64_t tid_t
Definition: lldb-types.h:84