Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:56

0001 //===-- ThreadPlanBase.h ----------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_TARGET_THREADPLANBASE_H
0010 #define LLDB_TARGET_THREADPLANBASE_H
0011 
0012 #include "lldb/Target/Process.h"
0013 #include "lldb/Target/Thread.h"
0014 #include "lldb/Target/ThreadPlan.h"
0015 
0016 namespace lldb_private {
0017 
0018 //  Base thread plans:
0019 //  This is the generic version of the bottom most plan on the plan stack.  It
0020 //  should
0021 //  be able to handle generic breakpoint hitting, and signals and exceptions.
0022 
0023 class ThreadPlanBase : public ThreadPlan {
0024   friend class Process; // RunThreadPlan manages "stopper" base plans.
0025 public:
0026   ~ThreadPlanBase() override;
0027 
0028   void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
0029   bool ValidatePlan(Stream *error) override;
0030   bool ShouldStop(Event *event_ptr) override;
0031   Vote ShouldReportStop(Event *event_ptr) override;
0032   bool StopOthers() override;
0033   lldb::StateType GetPlanRunState() override;
0034   bool WillStop() override;
0035   bool MischiefManaged() override;
0036 
0037   bool OkayToDiscard() override { return false; }
0038 
0039   bool IsBasePlan() override { return true; }
0040 
0041 protected:
0042   bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
0043   bool DoPlanExplainsStop(Event *event_ptr) override;
0044   ThreadPlanBase(Thread &thread);
0045 
0046 private:
0047   friend lldb::ThreadPlanSP Thread::QueueBasePlan(bool abort_other_plans);
0048 
0049   ThreadPlanBase(const ThreadPlanBase &) = delete;
0050   const ThreadPlanBase &operator=(const ThreadPlanBase &) = delete;
0051 };
0052 
0053 } // namespace lldb_private
0054 
0055 #endif // LLDB_TARGET_THREADPLANBASE_H