Skip to content

Commit b2f6d60

Browse files
committed
Another round of feedback, remove instrumentation and reorder private vs public methods, move assert closer to comment and check process_sp in plu pluginmanager.cpp
1 parent 21df337 commit b2f6d60

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

lldb/source/API/SBCoreDumpOptions.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,11 @@ lldb::SaveCoreStyle SBCoreDumpOptions::GetStyle() const {
7575
return m_opaque_up->GetStyle();
7676
}
7777

78-
lldb_private::CoreDumpOptions &SBCoreDumpOptions::ref() const {
79-
LLDB_INSTRUMENT_VA(this);
80-
return *m_opaque_up.get();
81-
}
82-
8378
void SBCoreDumpOptions::Clear() {
8479
LLDB_INSTRUMENT_VA(this);
8580
m_opaque_up->Clear();
8681
}
82+
83+
lldb_private::CoreDumpOptions &SBCoreDumpOptions::ref() const {
84+
return *m_opaque_up.get();
85+
}

lldb/source/Core/PluginManager.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,9 @@ Status PluginManager::SaveCore(const lldb::ProcessSP &process_sp,
709709
return error;
710710
}
711711

712+
if (!process_sp)
713+
return error;
714+
712715
if (!options.GetPluginName().has_value()) {
713716
// Try saving core directly from the process plugin first.
714717
llvm::Expected<bool> ret =

lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6526,8 +6526,8 @@ bool ObjectFileMachO::SaveCore(const lldb::ProcessSP &process_sp,
65266526
core_style = SaveCoreStyle::eSaveCoreDirtyOnly;
65276527
// The FileSpec and Process are already checked in PluginManager::SaveCore.
65286528
assert(options.GetOutputFile().has_value());
6529-
const FileSpec outfile = options.GetOutputFile().value();
65306529
assert(process_sp);
6530+
const FileSpec outfile = options.GetOutputFile().value();
65316531

65326532
Target &target = process_sp->GetTarget();
65336533
const ArchSpec target_arch = target.GetArchitecture();

0 commit comments

Comments
 (0)