ThreadPlanStepInstruction.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. //===-- ThreadPlanStepInstruction.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. #ifndef LLDB_TARGET_THREADPLANSTEPINSTRUCTION_H
  9. #define LLDB_TARGET_THREADPLANSTEPINSTRUCTION_H
  10. #include "lldb/Target/Thread.h"
  11. #include "lldb/Target/ThreadPlan.h"
  12. #include "lldb/lldb-private.h"
  13. namespace lldb_private {
  14. class ThreadPlanStepInstruction : public ThreadPlan {
  15. public:
  16. ThreadPlanStepInstruction(Thread &thread, bool step_over, bool stop_others,
  17. Vote report_stop_vote, Vote report_run_vote);
  18. ~ThreadPlanStepInstruction() override;
  19. void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
  20. bool ValidatePlan(Stream *error) override;
  21. bool ShouldStop(Event *event_ptr) override;
  22. bool StopOthers() override;
  23. lldb::StateType GetPlanRunState() override;
  24. bool WillStop() override;
  25. bool MischiefManaged() override;
  26. bool IsPlanStale() override;
  27. protected:
  28. bool DoPlanExplainsStop(Event *event_ptr) override;
  29. void SetUpState();
  30. private:
  31. friend lldb::ThreadPlanSP Thread::QueueThreadPlanForStepSingleInstruction(
  32. bool step_over, bool abort_other_plans, bool stop_other_threads,
  33. Status &status);
  34. lldb::addr_t m_instruction_addr;
  35. bool m_stop_other_threads;
  36. bool m_step_over;
  37. // These two are used only for the step over case.
  38. bool m_start_has_symbol;
  39. StackID m_stack_id;
  40. StackID m_parent_frame_id;
  41. ThreadPlanStepInstruction(const ThreadPlanStepInstruction &) = delete;
  42. const ThreadPlanStepInstruction &
  43. operator=(const ThreadPlanStepInstruction &) = delete;
  44. };
  45. } // namespace lldb_private
  46. #endif // LLDB_TARGET_THREADPLANSTEPINSTRUCTION_H