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
13#include "lldb/lldb-forward.h"
14#include "lldb/lldb-types.h"
15
16#include <optional>
17#include <string>
18#include <unordered_set>
19
20namespace lldb_private {
21
23public:
25 ~SaveCoreOptions() = default;
26
27 lldb_private::Status SetPluginName(const char *name);
28 std::optional<std::string> GetPluginName() const;
29
30 void SetStyle(lldb::SaveCoreStyle style);
32
34 const std::optional<lldb_private::FileSpec> GetOutputFile() const;
35
37
39 bool RemoveThread(lldb::ThreadSP thread_sp);
40 bool ShouldThreadBeSaved(lldb::tid_t tid) const;
41
43
44 void Clear();
45
46private:
48
49 std::optional<std::string> m_plugin_name;
50 std::optional<lldb_private::FileSpec> m_file;
51 std::optional<lldb::SaveCoreStyle> m_style;
53 std::unordered_set<lldb::tid_t> m_threads_to_save;
54};
55} // namespace lldb_private
56
57#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)
std::optional< std::string > GetPluginName() 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:44
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Thread > ThreadSP
Definition: lldb-forward.h:446
std::shared_ptr< lldb_private::Process > ProcessSP
Definition: lldb-forward.h:387
uint64_t tid_t
Definition: lldb-types.h:84