summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r--lldb/source/Commands/CommandObjectFrame.cpp4
-rw-r--r--lldb/source/Commands/CommandObjectType.cpp42
2 files changed, 20 insertions, 26 deletions
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index d743900e67b..5669ce174d5 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -852,7 +852,7 @@ Process 1234 stopped
bool CommandObjectFrameRecognizerAdd::DoExecute(Args &command,
CommandReturnObject &result) {
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
if (m_options.m_class_name.empty()) {
result.AppendErrorWithFormat(
"%s needs a Python class name (-l argument).\n", m_cmd_name.c_str());
@@ -1106,7 +1106,7 @@ CommandObjectMultiwordFrame::CommandObjectMultiwordFrame(
CommandObjectSP(new CommandObjectFrameSelect(interpreter)));
LoadSubCommand("variable",
CommandObjectSP(new CommandObjectFrameVariable(interpreter)));
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
LoadSubCommand("recognizer", CommandObjectSP(new CommandObjectFrameRecognizer(
interpreter)));
#endif
diff --git a/lldb/source/Commands/CommandObjectType.cpp b/lldb/source/Commands/CommandObjectType.cpp
index 265acb4ad8a..aca166ed165 100644
--- a/lldb/source/Commands/CommandObjectType.cpp
+++ b/lldb/source/Commands/CommandObjectType.cpp
@@ -163,7 +163,7 @@ public:
std::string &data) override {
StreamFileSP error_sp = io_handler.GetErrorStreamFileSP();
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
ScriptInterpreter *interpreter = GetDebugger().GetScriptInterpreter();
if (interpreter) {
StringList lines;
@@ -256,7 +256,7 @@ public:
"error: script interpreter missing, didn't add python command.\n");
error_sp->Flush();
}
-#endif // LLDB_DISABLE_PYTHON
+#endif
io_handler.SetIsDone(true);
}
@@ -395,7 +395,7 @@ protected:
std::string &data) override {
StreamFileSP error_sp = io_handler.GetErrorStreamFileSP();
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
ScriptInterpreter *interpreter = GetDebugger().GetScriptInterpreter();
if (interpreter) {
StringList lines;
@@ -475,7 +475,7 @@ protected:
error_sp->Flush();
}
-#endif // LLDB_DISABLE_PYTHON
+#endif
io_handler.SetIsDone(true);
}
@@ -1168,12 +1168,6 @@ public:
"Show a list of current formats.") {}
};
-#ifndef LLDB_DISABLE_PYTHON
-
-// CommandObjectTypeSummaryAdd
-
-#endif // LLDB_DISABLE_PYTHON
-
Status CommandObjectTypeSummaryAdd::CommandOptions::SetOptionValue(
uint32_t option_idx, llvm::StringRef option_arg,
ExecutionContext *execution_context) {
@@ -1256,7 +1250,7 @@ void CommandObjectTypeSummaryAdd::CommandOptions::OptionParsingStarting(
m_category = "default";
}
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
bool CommandObjectTypeSummaryAdd::Execute_ScriptSummary(
Args &command, CommandReturnObject &result) {
@@ -1381,7 +1375,7 @@ bool CommandObjectTypeSummaryAdd::Execute_ScriptSummary(
return result.Succeeded();
}
-#endif // LLDB_DISABLE_PYTHON
+#endif
bool CommandObjectTypeSummaryAdd::Execute_StringSummary(
Args &command, CommandReturnObject &result) {
@@ -1579,13 +1573,13 @@ bool CommandObjectTypeSummaryAdd::DoExecute(Args &command,
WarnOnPotentialUnquotedUnsignedType(command, result);
if (m_options.m_is_add_script) {
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
return Execute_ScriptSummary(command, result);
#else
result.AppendError("python is disabled");
result.SetStatus(eReturnStatusFailed);
return false;
-#endif // LLDB_DISABLE_PYTHON
+#endif
}
return Execute_StringSummary(command, result);
@@ -2153,7 +2147,7 @@ public:
"Show a list of current filters.") {}
};
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
// CommandObjectTypeSynthList
@@ -2166,7 +2160,7 @@ public:
"Show a list of current synthetic providers.") {}
};
-#endif // LLDB_DISABLE_PYTHON
+#endif
// CommandObjectTypeFilterDelete
@@ -2181,7 +2175,7 @@ public:
~CommandObjectTypeFilterDelete() override = default;
};
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
// CommandObjectTypeSynthDelete
@@ -2197,7 +2191,7 @@ public:
~CommandObjectTypeSynthDelete() override = default;
};
-#endif // LLDB_DISABLE_PYTHON
+#endif
// CommandObjectTypeFilterClear
@@ -2210,7 +2204,7 @@ public:
"type filter clear", "Delete all existing filter.") {}
};
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
// CommandObjectTypeSynthClear
class CommandObjectTypeSynthClear : public CommandObjectTypeFormatterClear {
@@ -2374,7 +2368,7 @@ bool CommandObjectTypeSynthAdd::AddSynth(ConstString type_name,
}
}
-#endif // LLDB_DISABLE_PYTHON
+#endif
#define LLDB_OPTIONS_type_filter_add
#include "CommandOptions.inc"
@@ -2924,7 +2918,7 @@ public:
~CommandObjectTypeFormat() override = default;
};
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
class CommandObjectTypeSynth : public CommandObjectMultiword {
public:
@@ -2953,7 +2947,7 @@ public:
~CommandObjectTypeSynth() override = default;
};
-#endif // LLDB_DISABLE_PYTHON
+#endif
class CommandObjectTypeFilter : public CommandObjectMultiword {
public:
@@ -3039,10 +3033,10 @@ CommandObjectType::CommandObjectType(CommandInterpreter &interpreter)
CommandObjectSP(new CommandObjectTypeFormat(interpreter)));
LoadSubCommand("summary",
CommandObjectSP(new CommandObjectTypeSummary(interpreter)));
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
LoadSubCommand("synthetic",
CommandObjectSP(new CommandObjectTypeSynth(interpreter)));
-#endif // LLDB_DISABLE_PYTHON
+#endif
LoadSubCommand("lookup",
CommandObjectSP(new CommandObjectTypeLookup(interpreter)));
}
OpenPOWER on IntegriCloud