Skip to content

Commit 1f986f6

Browse files
committed
Revert "[lldb] Add minidump save-core functionality to ELF object files"
This reverts commit aafa05e. Broke builder on aarch64 -- https://lab.llvm.org/buildbot/#/builders/96/builds/10926
1 parent 7ec7272 commit 1f986f6

File tree

14 files changed

+10
-1202
lines changed

14 files changed

+10
-1202
lines changed

lldb/include/lldb/Core/PluginManager.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,7 @@ class PluginManager {
192192

193193
static Status SaveCore(const lldb::ProcessSP &process_sp,
194194
const FileSpec &outfile,
195-
lldb::SaveCoreStyle &core_style,
196-
const ConstString plugin_name);
195+
lldb::SaveCoreStyle &core_style);
197196

198197
// ObjectContainer
199198
static bool

lldb/source/API/SBProcess.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,8 +1228,7 @@ lldb::SBError SBProcess::SaveCore(const char *file_name) {
12281228

12291229
FileSpec core_file(file_name);
12301230
SaveCoreStyle core_style = SaveCoreStyle::eSaveCoreFull;
1231-
error.ref() =
1232-
PluginManager::SaveCore(process_sp, core_file, core_style, ConstString());
1231+
error.ref() = PluginManager::SaveCore(process_sp, core_file, core_style);
12331232
return LLDB_RECORD_RESULT(error);
12341233
}
12351234

lldb/source/Commands/CommandObjectProcess.cpp

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,13 +1180,12 @@ static constexpr OptionEnumValues SaveCoreStyles() {
11801180
class CommandObjectProcessSaveCore : public CommandObjectParsed {
11811181
public:
11821182
CommandObjectProcessSaveCore(CommandInterpreter &interpreter)
1183-
: CommandObjectParsed(
1184-
interpreter, "process save-core",
1185-
"Save the current process as a core file using an "
1186-
"appropriate file type.",
1187-
"process save-core [-s corefile-style -p plugin-name] FILE",
1188-
eCommandRequiresProcess | eCommandTryTargetAPILock |
1189-
eCommandProcessMustBeLaunched) {}
1183+
: CommandObjectParsed(interpreter, "process save-core",
1184+
"Save the current process as a core file using an "
1185+
"appropriate file type.",
1186+
"process save-core [-s corefile-style] FILE",
1187+
eCommandRequiresProcess | eCommandTryTargetAPILock |
1188+
eCommandProcessMustBeLaunched) {}
11901189

11911190
~CommandObjectProcessSaveCore() override = default;
11921191

@@ -1209,9 +1208,6 @@ class CommandObjectProcessSaveCore : public CommandObjectParsed {
12091208
Status error;
12101209

12111210
switch (short_option) {
1212-
case 'p':
1213-
m_requested_plugin_name.SetString(option_arg);
1214-
break;
12151211
case 's':
12161212
m_requested_save_core_style =
12171213
(lldb::SaveCoreStyle)OptionArgParser::ToOptionEnum(
@@ -1227,12 +1223,10 @@ class CommandObjectProcessSaveCore : public CommandObjectParsed {
12271223

12281224
void OptionParsingStarting(ExecutionContext *execution_context) override {
12291225
m_requested_save_core_style = eSaveCoreUnspecified;
1230-
m_requested_plugin_name.Clear();
12311226
}
12321227

12331228
// Instance variables to hold the values for command options.
12341229
SaveCoreStyle m_requested_save_core_style;
1235-
ConstString m_requested_plugin_name;
12361230
};
12371231

12381232
protected:
@@ -1243,8 +1237,7 @@ class CommandObjectProcessSaveCore : public CommandObjectParsed {
12431237
FileSpec output_file(command.GetArgumentAtIndex(0));
12441238
SaveCoreStyle corefile_style = m_options.m_requested_save_core_style;
12451239
Status error =
1246-
PluginManager::SaveCore(process_sp, output_file, corefile_style,
1247-
m_options.m_requested_plugin_name);
1240+
PluginManager::SaveCore(process_sp, output_file, corefile_style);
12481241
if (error.Success()) {
12491242
if (corefile_style == SaveCoreStyle::eSaveCoreDirtyOnly ||
12501243
corefile_style == SaveCoreStyle::eSaveCoreStackOnly) {

lldb/source/Commands/Options.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -749,9 +749,6 @@ let Command = "process save_core" in {
749749
def process_save_core_style : Option<"style", "s">, Group<1>,
750750
EnumArg<"SaveCoreStyle", "SaveCoreStyles()">, Desc<"Request a specific style "
751751
"of corefile to be saved.">;
752-
def process_save_core_plugin_name : Option<"plugin-name", "p">,
753-
OptionalArg<"Plugin">, Desc<"Specify a plugin name to create the core file."
754-
"This allows core files to be saved in different formats.">;
755752
}
756753

757754
let Command = "process trace save" in {

lldb/source/Core/PluginManager.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -685,13 +685,10 @@ PluginManager::GetObjectFileCreateMemoryCallbackForPluginName(
685685

686686
Status PluginManager::SaveCore(const lldb::ProcessSP &process_sp,
687687
const FileSpec &outfile,
688-
lldb::SaveCoreStyle &core_style,
689-
const ConstString plugin_name) {
688+
lldb::SaveCoreStyle &core_style) {
690689
Status error;
691690
auto &instances = GetObjectFileInstances().GetInstances();
692691
for (auto &instance : instances) {
693-
if (plugin_name && instance.name != plugin_name)
694-
continue;
695692
if (instance.save_core &&
696693
instance.save_core(process_sp, outfile, core_style, error))
697694
return error;

lldb/source/Plugins/ObjectFile/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
add_subdirectory(Breakpad)
22
add_subdirectory(ELF)
33
add_subdirectory(Mach-O)
4-
add_subdirectory(Minidump)
54
add_subdirectory(PDB)
65
add_subdirectory(PECOFF)
76
add_subdirectory(JIT)

lldb/source/Plugins/ObjectFile/Minidump/CMakeLists.txt

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)