[Lldb-commits] [lldb] [LLDB][SaveCore] Add SBCoreDumpOptions Object, and SBProcess::SaveCore() overload (PR #98403)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 17 14:51:01 PDT 2024
================
@@ -689,30 +702,38 @@ PluginManager::GetObjectFileCreateMemoryCallbackForPluginName(
}
Status PluginManager::SaveCore(const lldb::ProcessSP &process_sp,
- const FileSpec &outfile,
- lldb::SaveCoreStyle &core_style,
- llvm::StringRef plugin_name) {
- if (plugin_name.empty()) {
+ const lldb_private::CoreDumpOptions &options) {
+ Status error;
+ if (!options.GetOutputFile()) {
+ error.SetErrorString("No output file specified");
+ return error;
+ }
+
----------------
clayborg wrote:
You added `assert(process_sp)` in the object file plugins, but didn't check the process here. Add:
```
if (!process_sp) {
error.SetErrorString("Invalid process");
return error;
}
```
https://github.com/llvm/llvm-project/pull/98403
More information about the lldb-commits
mailing list