Skip to content

Commit 06c0538

Browse files
committed
Have SBProcess savecore always call the method with core dump options, instrument all methods in SBCoreDumpOptions
1 parent 117d71a commit 06c0538

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

lldb/source/API/SBCoreDumpOptions.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,38 +39,48 @@ SBCoreDumpOptions::operator=(const SBCoreDumpOptions &rhs) {
3939
}
4040

4141
SBError SBCoreDumpOptions::SetPluginName(const char *name) {
42+
LLDB_INSTRUMENT_VA(this, name);
4243
lldb_private::Status error = m_opaque_up->SetPluginName(name);
4344
return SBError(error);
4445
}
4546

4647
void SBCoreDumpOptions::SetStyle(lldb::SaveCoreStyle style) {
48+
LLDB_INSTRUMENT_VA(this, style);
4749
m_opaque_up->SetStyle(style);
4850
}
4951

5052
void SBCoreDumpOptions::SetOutputFile(lldb::SBFileSpec file_spec) {
53+
LLDB_INSTRUMENT_VA(this, file_spec);
5154
m_opaque_up->SetOutputFile(file_spec.ref());
5255
}
5356

5457
const char *SBCoreDumpOptions::GetPluginName() const {
58+
LLDB_INSTRUMENT_VA(this);
5559
const auto name = m_opaque_up->GetPluginName();
5660
if (!name)
5761
return nullptr;
5862
return lldb_private::ConstString(name.value()).GetCString();
5963
}
6064

6165
SBFileSpec SBCoreDumpOptions::GetOutputFile() const {
66+
LLDB_INSTRUMENT_VA(this);
6267
const auto file_spec = m_opaque_up->GetOutputFile();
6368
if (file_spec)
6469
return SBFileSpec(file_spec.value());
6570
return SBFileSpec();
6671
}
6772

6873
lldb::SaveCoreStyle SBCoreDumpOptions::GetStyle() const {
74+
LLDB_INSTRUMENT_VA(this);
6975
return m_opaque_up->GetStyle();
7076
}
7177

7278
lldb_private::CoreDumpOptions &SBCoreDumpOptions::ref() const {
79+
LLDB_INSTRUMENT_VA(this);
7380
return *m_opaque_up.get();
7481
}
7582

76-
void SBCoreDumpOptions::Clear() { m_opaque_up->Clear(); }
83+
void SBCoreDumpOptions::Clear() {
84+
LLDB_INSTRUMENT_VA(this);
85+
m_opaque_up->Clear();
86+
}

lldb/source/API/SBProcess.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,12 +1217,16 @@ bool SBProcess::IsInstrumentationRuntimePresent(
12171217

12181218
lldb::SBError SBProcess::SaveCore(const char *file_name) {
12191219
LLDB_INSTRUMENT_VA(this, file_name);
1220-
return SaveCore(file_name, "", SaveCoreStyle::eSaveCoreFull);
1220+
SBCoreDumpOptions options;
1221+
options.SetOutputFile(SBFileSpec(file_name));
1222+
options.SetStyle(SaveCoreStyle::eSaveCoreFull);
1223+
return SaveCore(options);
12211224
}
12221225

12231226
lldb::SBError SBProcess::SaveCore(const char *file_name,
12241227
const char *flavor,
12251228
SaveCoreStyle core_style) {
1229+
LLDB_INSTRUMENT_VA(this, file_name, flavor, core_style);
12261230
SBCoreDumpOptions options;
12271231
options.SetOutputFile(SBFileSpec(file_name));
12281232
options.SetPluginName(flavor);

0 commit comments

Comments
 (0)