From 34766d0d488ba2fbefa80dcd0cc8720a0e753448 Mon Sep 17 00:00:00 2001 From: Jacob Lalonde Date: Fri, 2 Aug 2024 18:38:05 -0700 Subject: [LLDB][SBSaveCore] Fix bug where default values are not propagated. (#101770) In #100443, Mach-o and Minidump now only call process API's that take a `SaveCoreOption` as the container for the style and information if a thread should be included in the core or not. This introduced a bug where in subsequent method calls we were not honoring the defaults of both implementations. ~~To solve this I have made a copy of each SaveCoreOptions that is mutable by the respective plugin. Originally I wanted to leave the SaveCoreOptions as non const so these default value mutations could be shown back to the user. Changing that behavior is outside of the scope of this bugfix, but is context for why we are making a copy.~~ Removed const on the savecoreoptions so defaults can be inspected by the user CC: @Michael137 --- lldb/source/Core/PluginManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/Core/PluginManager.cpp') diff --git a/lldb/source/Core/PluginManager.cpp b/lldb/source/Core/PluginManager.cpp index fbd78a778057..f243807df509 100644 --- a/lldb/source/Core/PluginManager.cpp +++ b/lldb/source/Core/PluginManager.cpp @@ -702,7 +702,7 @@ PluginManager::GetObjectFileCreateMemoryCallbackForPluginName( } Status PluginManager::SaveCore(const lldb::ProcessSP &process_sp, - const lldb_private::SaveCoreOptions &options) { + lldb_private::SaveCoreOptions &options) { Status error; if (!options.GetOutputFile()) { error.SetErrorString("No output file specified"); -- cgit v1.2.3