LLDB
mainline
llvm-project
lldb
include
lldb
API
SBSaveCoreOptions.h
Go to the documentation of this file.
1
//===-- SBSaveCoreOptions.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_API_SBSAVECOREOPTIONS_H
10
#define LLDB_API_SBSAVECOREOPTIONS_H
11
12
#include "
lldb/API/SBDefines.h
"
13
#include "
lldb/API/SBError.h
"
14
#include "
lldb/API/SBFileSpec.h
"
15
#include "
lldb/API/SBProcess.h
"
16
#include "
lldb/API/SBThread.h
"
17
18
namespace
lldb
{
19
20
class
LLDB_API
SBSaveCoreOptions
{
21
public
:
22
SBSaveCoreOptions
();
23
SBSaveCoreOptions
(
const
lldb::SBSaveCoreOptions
&rhs);
24
~SBSaveCoreOptions
();
25
26
const
SBSaveCoreOptions
&operator=(
const
lldb::SBSaveCoreOptions
&rhs);
27
28
/// Set the plugin name. Supplying null or empty string will reset
29
/// the option.
30
///
31
/// \param plugin Name of the object file plugin.
32
SBError
SetPluginName(
const
char
*plugin);
33
34
/// Get the Core dump plugin name, if set.
35
///
36
/// \return The name of the plugin, or null if not set.
37
const
char
*GetPluginName()
const
;
38
39
/// Set the Core dump style.
40
///
41
/// \param style The style of the core dump.
42
void
SetStyle(
lldb::SaveCoreStyle
style);
43
44
/// Get the Core dump style, if set.
45
///
46
/// \return The core dump style, or undefined if not set.
47
lldb::SaveCoreStyle
GetStyle()
const
;
48
49
/// Set the output file path
50
///
51
/// \param output_file a
52
/// \class SBFileSpec object that describes the output file.
53
void
SetOutputFile(
SBFileSpec
output_file);
54
55
/// Get the output file spec
56
///
57
/// \return The output file spec.
58
SBFileSpec
GetOutputFile()
const
;
59
60
/// Set the process to save, or unset if supplied with a default constructed
61
/// process.
62
///
63
/// \param process The process to save.
64
/// \return Success if process was set, otherwise an error
65
/// \note This will clear all process specific options if a different process
66
/// is specified than the current set process, either explicitly from this
67
/// api, or implicitly from any function that requires a process.
68
SBError SetProcess(
lldb::SBProcess
process);
69
70
/// Add a thread to save in the core file.
71
///
72
/// \param thread The thread to save.
73
/// \note This will set the process if it is not already set, or return
74
/// and error if the SBThread is not from the set process.
75
SBError AddThread(
lldb::SBThread
thread);
76
77
/// Remove a thread from the list of threads to save.
78
///
79
/// \param thread The thread to remove.
80
/// \return True if the thread was removed, false if it was not in the list.
81
bool
RemoveThread(
lldb::SBThread
thread);
82
83
/// Reset all options.
84
void
Clear();
85
86
protected
:
87
friend
class
SBProcess
;
88
lldb_private::SaveCoreOptions
&ref()
const
;
89
90
private
:
91
std::unique_ptr<lldb_private::SaveCoreOptions>
m_opaque_up
;
92
};
// SBSaveCoreOptions
93
}
// namespace lldb
94
95
#endif
// LLDB_API_SBSAVECOREOPTIONS_H
SBDefines.h
LLDB_API
#define LLDB_API
Definition:
SBDefines.h:28
SBError.h
SBFileSpec.h
SBProcess.h
SBThread.h
SBFileSpec
Set the output file path.
lldb::SBError
Definition:
SBError.h:23
lldb::SBProcess
Definition:
SBProcess.h:29
lldb::SBSaveCoreOptions
Definition:
SBSaveCoreOptions.h:20
lldb::SBSaveCoreOptions::m_opaque_up
std::unique_ptr< lldb_private::SaveCoreOptions > m_opaque_up
Definition:
SBSaveCoreOptions.h:91
lldb::SBSaveCoreOptions::~SBSaveCoreOptions
~SBSaveCoreOptions()
lldb::SBThread
Definition:
SBThread.h:26
lldb_private::SaveCoreOptions
Definition:
SaveCoreOptions.h:22
lldb
Definition:
SBAddress.h:15
lldb::SaveCoreStyle
SaveCoreStyle
Definition:
lldb-enumerations.h:1220
Generated on Tue Dec 3 2024 06:26:23 for LLDB by
1.9.6