Fixup the Python-less build of ScriptedRecognizedStackFrame
authorKuba Mracek <mracek@apple.com>
Wed, 31 Oct 2018 04:43:09 +0000 (04:43 +0000)
committerKuba Mracek <mracek@apple.com>
Wed, 31 Oct 2018 04:43:09 +0000 (04:43 +0000)
llvm-svn: 345694

lldb/source/Commands/CommandObjectFrame.cpp
lldb/source/Target/StackFrameRecognizer.cpp

index 0dface6..74fcf3f 100644 (file)
@@ -883,6 +883,7 @@ Process 1234 stopped
 
 bool CommandObjectFrameRecognizerAdd::DoExecute(Args &command,
                                                 CommandReturnObject &result) {
+#ifndef LLDB_DISABLE_PYTHON
   if (m_options.m_class_name.empty()) {
     result.AppendErrorWithFormat(
         "%s needs a Python class name (-l argument).\n", m_cmd_name.c_str());
@@ -927,6 +928,7 @@ bool CommandObjectFrameRecognizerAdd::DoExecute(Args &command,
     auto func = ConstString(m_options.m_function);
     StackFrameRecognizerManager::AddRecognizer(recognizer_sp, module, func);
   }
+#endif
 
   result.SetStatus(eReturnStatusSuccessFinishNoResult);
   return result.Succeeded();
index cb86036..350d70b 100644 (file)
@@ -22,6 +22,8 @@
 using namespace lldb;
 using namespace lldb_private;
 
+#ifndef LLDB_DISABLE_PYTHON
+
 class ScriptedRecognizedStackFrame : public RecognizedStackFrame {
 public:
   ScriptedRecognizedStackFrame(ValueObjectListSP args) {
@@ -47,6 +49,8 @@ ScriptedStackFrameRecognizer::RecognizeFrame(lldb::StackFrameSP frame) {
   return RecognizedStackFrameSP(new ScriptedRecognizedStackFrame(args));
 }
 
+#endif
+
 class StackFrameRecognizerManagerImpl {
 public:
   void AddRecognizer(StackFrameRecognizerSP recognizer, ConstString &module,