xref: /freebsd/contrib/llvm-project/lldb/include/lldb/Interpreter/Interfaces/ScriptedThreadPlanInterface.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1 //===-- ScriptedThreadPlanInterface.h ---------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_INTERPRETER_INTERFACES_SCRIPTEDTHREADPLANINTERFACE_H
10 #define LLDB_INTERPRETER_INTERFACES_SCRIPTEDTHREADPLANINTERFACE_H
11 
12 #include "lldb/lldb-private.h"
13 
14 #include "ScriptedInterface.h"
15 
16 namespace lldb_private {
17 class ScriptedThreadPlanInterface : public ScriptedInterface {
18 public:
19   virtual llvm::Expected<StructuredData::GenericSP>
20   CreatePluginObject(llvm::StringRef class_name,
21                      lldb::ThreadPlanSP thread_plan_sp,
22                      const StructuredDataImpl &args_sp) = 0;
23 
ExplainsStop(Event * event)24   virtual llvm::Expected<bool> ExplainsStop(Event *event) { return true; }
25 
ShouldStop(Event * event)26   virtual llvm::Expected<bool> ShouldStop(Event *event) { return true; }
27 
IsStale()28   virtual llvm::Expected<bool> IsStale() { return true; };
29 
GetRunState()30   virtual lldb::StateType GetRunState() { return lldb::eStateStepping; }
31 
GetStopDescription(lldb::StreamSP & stream)32   virtual llvm::Error GetStopDescription(lldb::StreamSP &stream) {
33     return llvm::Error::success();
34   }
35 };
36 } // namespace lldb_private
37 
38 #endif // LLDB_INTERPRETER_INTERFACES_SCRIPTEDTHREADPLANINTERFACE_H
39