160484Sobrien//===-- ThreadPlanBase.h ----------------------------------------*- C++ -*-===// 2218822Sdim// 3218822Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 433965Sjdp// See https://llvm.org/LICENSE.txt for license information. 533965Sjdp// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 633965Sjdp// 733965Sjdp//===----------------------------------------------------------------------===// 833965Sjdp 933965Sjdp#ifndef LLDB_TARGET_THREADPLANBASE_H 1033965Sjdp#define LLDB_TARGET_THREADPLANBASE_H 1133965Sjdp 1233965Sjdp#include "lldb/Target/Process.h" 1333965Sjdp#include "lldb/Target/Thread.h" 1433965Sjdp#include "lldb/Target/ThreadPlan.h" 1533965Sjdp 1633965Sjdpnamespace lldb_private { 1733965Sjdp 1860484Sobrien// Base thread plans: 19218822Sdim// This is the generic version of the bottom most plan on the plan stack. It 20218822Sdim// should 2133965Sjdp// be able to handle generic breakpoint hitting, and signals and exceptions. 2260484Sobrien 2360484Sobrienclass ThreadPlanBase : public ThreadPlan { 2433965Sjdp friend class Process; // RunThreadPlan manages "stopper" base plans. 2533965Sjdppublic: 2633965Sjdp ~ThreadPlanBase() override; 27218822Sdim 28218822Sdim void GetDescription(Stream *s, lldb::DescriptionLevel level) override; 29218822Sdim bool ValidatePlan(Stream *error) override; 30218822Sdim bool ShouldStop(Event *event_ptr) override; 3160484Sobrien Vote ShouldReportStop(Event *event_ptr) override; 3233965Sjdp bool StopOthers() override; 33130561Sobrien lldb::StateType GetPlanRunState() override; 3433965Sjdp bool WillStop() override; 3560484Sobrien bool MischiefManaged() override; 3660484Sobrien 37130561Sobrien bool OkayToDiscard() override { return false; } 3860484Sobrien 3960484Sobrien bool IsBasePlan() override { return true; } 4060484Sobrien 4160484Sobrienprotected: 4260484Sobrien bool DoWillResume(lldb::StateType resume_state, bool current_plan) override; 4360484Sobrien bool DoPlanExplainsStop(Event *event_ptr) override; 44130561Sobrien ThreadPlanBase(Thread &thread); 45130561Sobrien 4660484Sobrienprivate: 4760484Sobrien friend lldb::ThreadPlanSP Thread::QueueBasePlan(bool abort_other_plans); 4860484Sobrien 4960484Sobrien ThreadPlanBase(const ThreadPlanBase &) = delete; 5060484Sobrien const ThreadPlanBase &operator=(const ThreadPlanBase &) = delete; 51130561Sobrien}; 52130561Sobrien 5360484Sobrien} // namespace lldb_private 5460484Sobrien 5560484Sobrien#endif // LLDB_TARGET_THREADPLANBASE_H 5660484Sobrien