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
32
/// Name of the object file plugin.
33
SBError
SetPluginName(
const
char
*plugin);
34
35
/// Get the Core dump plugin name, if set.
36
///
37
/// \return
38
/// The name of the plugin, or null if not set.
39
const
char
*GetPluginName()
const
;
40
41
/// Set the Core dump style.
42
///
43
/// \param style
44
/// The style of the core dump.
45
void
SetStyle(
lldb::SaveCoreStyle
style);
46
47
/// Get the Core dump style, if set.
48
///
49
/// \return
50
/// The core dump style, or undefined if not set.
51
lldb::SaveCoreStyle
GetStyle()
const
;
52
53
/// Set the output file path
54
///
55
/// \param
56
/// output_file a \class SBFileSpec object that describes the output file.
57
void
SetOutputFile(
SBFileSpec
output_file);
58
59
/// Get the output file spec
60
///
61
/// \return
62
/// The output file spec.
63
SBFileSpec
GetOutputFile()
const
;
64
65
/// Set the process to save, or unset if supplied with a default constructed
66
/// process.
67
///
68
/// \param process
69
/// The process to save.
70
///
71
/// \return
72
/// Success if process was set, otherwise an error
73
///
74
/// \note
75
/// This will clear all process specific options if a different process
76
/// is specified than the current set process, either explicitly from this
77
/// api, or implicitly from any function that requires a process.
78
SBError SetProcess(
lldb::SBProcess
process);
79
80
/// Add a thread to save in the core file.
81
///
82
/// \param thread
83
/// The thread to save.
84
///
85
/// \note
86
/// This will set the process if it is not already set, or return
87
/// and error if the SBThread is not from the set process.
88
SBError AddThread(
lldb::SBThread
thread);
89
90
/// Remove a thread from the list of threads to save.
91
///
92
/// \param thread
93
/// The thread to remove.
94
///
95
/// \return
96
/// True if the thread was removed, false if it was not in the list.
97
bool
RemoveThread(
lldb::SBThread
thread);
98
99
/// Add a memory region to save in the core file.
100
///
101
/// \param region
102
/// The memory region to save.
103
///
104
/// \returns
105
/// An empty SBError upon success, or an error if the region is invalid.
106
///
107
/// \note
108
/// Ranges that overlapped will be unioned into a single region, this also
109
/// supercedes stack minification. Specifying full regions and a non-custom
110
/// core style will include the specified regions and union them with all
111
/// style specific regions.
112
SBError AddMemoryRegionToSave(
const
SBMemoryRegionInfo ®ion);
113
114
/// Reset all options.
115
void
Clear();
116
117
protected
:
118
friend
class
SBProcess
;
119
lldb_private::SaveCoreOptions
&ref()
const
;
120
121
private
:
122
std::unique_ptr<lldb_private::SaveCoreOptions>
m_opaque_up
;
123
};
// SBSaveCoreOptions
124
}
// namespace lldb
125
126
#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:122
lldb::SBSaveCoreOptions::~SBSaveCoreOptions
~SBSaveCoreOptions()
lldb::SBThread
Definition:
SBThread.h:26
lldb_private::SaveCoreOptions
Definition:
SaveCoreOptions.h:24
lldb
Definition:
SBAddress.h:15
lldb::SaveCoreStyle
SaveCoreStyle
Definition:
lldb-enumerations.h:1224
Generated on Wed Jan 8 2025 11:16:05 for LLDB by
1.9.6