1254721Semaste//===-- ThreadPlanStepInRange.h ---------------------------------*- C++ -*-===// 2254721Semaste// 3254721Semaste// The LLVM Compiler Infrastructure 4254721Semaste// 5254721Semaste// This file is distributed under the University of Illinois Open Source 6254721Semaste// License. See LICENSE.TXT for details. 7254721Semaste// 8254721Semaste//===----------------------------------------------------------------------===// 9254721Semaste 10254721Semaste#ifndef liblldb_ThreadPlanStepInRange_h_ 11254721Semaste#define liblldb_ThreadPlanStepInRange_h_ 12254721Semaste 13254721Semaste// C Includes 14254721Semaste// C++ Includes 15254721Semaste// Other libraries and framework includes 16254721Semaste// Project includes 17254721Semaste#include "lldb/Core/AddressRange.h" 18254721Semaste#include "lldb/Target/StackID.h" 19254721Semaste#include "lldb/Target/Thread.h" 20254721Semaste#include "lldb/Target/ThreadPlanStepRange.h" 21254721Semaste#include "lldb/Target/ThreadPlanShouldStopHere.h" 22254721Semaste 23254721Semastenamespace lldb_private { 24254721Semaste 25254721Semasteclass ThreadPlanStepInRange : 26254721Semaste public ThreadPlanStepRange, 27254721Semaste public ThreadPlanShouldStopHere 28254721Semaste{ 29254721Semastepublic: 30254721Semaste ThreadPlanStepInRange (Thread &thread, 31254721Semaste const AddressRange &range, 32254721Semaste const SymbolContext &addr_context, 33254721Semaste lldb::RunMode stop_others); 34254721Semaste 35254721Semaste ThreadPlanStepInRange (Thread &thread, 36254721Semaste const AddressRange &range, 37254721Semaste const SymbolContext &addr_context, 38254721Semaste const char *step_into_function_name, 39254721Semaste lldb::RunMode stop_others); 40254721Semaste 41254721Semaste virtual 42254721Semaste ~ThreadPlanStepInRange (); 43254721Semaste 44254721Semaste virtual void 45254721Semaste GetDescription (Stream *s, lldb::DescriptionLevel level); 46254721Semaste 47254721Semaste virtual bool 48254721Semaste ShouldStop (Event *event_ptr); 49254721Semaste 50254721Semaste void SetAvoidRegexp(const char *name); 51254721Semaste 52254721Semaste void SetStepInTarget (const char *target) 53254721Semaste { 54254721Semaste m_step_into_target.SetCString(target); 55254721Semaste } 56254721Semaste 57254721Semaste static lldb::ThreadPlanSP 58254721Semaste DefaultShouldStopHereCallback (ThreadPlan *current_plan, Flags &flags, void *baton); 59254721Semaste 60254721Semaste static void 61254721Semaste SetDefaultFlagValue (uint32_t new_value); 62254721Semaste 63254721Semaste bool 64254721Semaste IsVirtualStep(); 65254721Semaste 66254721Semasteprotected: 67254721Semaste virtual bool DoWillResume (lldb::StateType resume_state, bool current_plan); 68254721Semaste 69254721Semaste virtual bool 70254721Semaste DoPlanExplainsStop (Event *event_ptr); 71254721Semaste 72254721Semaste virtual void 73254721Semaste SetFlagsToDefault (); 74254721Semaste 75254721Semaste bool 76269024Semaste FrameMatchesAvoidCriteria (); 77254721Semaste 78254721Semasteprivate: 79254721Semaste 80254721Semaste friend lldb::ThreadPlanSP 81254721Semaste Thread::QueueThreadPlanForStepOverRange (bool abort_other_plans, 82254721Semaste const AddressRange &range, 83254721Semaste const SymbolContext &addr_context, 84254721Semaste lldb::RunMode stop_others); 85254721Semaste friend lldb::ThreadPlanSP 86254721Semaste Thread::QueueThreadPlanForStepInRange (bool abort_other_plans, 87254721Semaste const AddressRange &range, 88254721Semaste const SymbolContext &addr_context, 89254721Semaste const char *step_in_target, 90254721Semaste lldb::RunMode stop_others, 91254721Semaste bool avoid_code_without_debug_info); 92254721Semaste 93254721Semaste 94254721Semaste // Need an appropriate marker for the current stack so we can tell step out 95254721Semaste // from step in. 96254721Semaste 97254721Semaste static uint32_t s_default_flag_values; 98254721Semaste lldb::ThreadPlanSP m_sub_plan_sp; // Keep track of the last plan we were running. If it fails, we should stop. 99254721Semaste std::unique_ptr<RegularExpression> m_avoid_regexp_ap; 100254721Semaste bool m_step_past_prologue; // FIXME: For now hard-coded to true, we could put a switch in for this if there's 101254721Semaste // demand for that. 102254721Semaste bool m_virtual_step; // true if we've just done a "virtual step", i.e. just moved the inline stack depth. 103254721Semaste ConstString m_step_into_target; 104254721Semaste DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepInRange); 105254721Semaste 106254721Semaste}; 107254721Semaste 108254721Semaste} // namespace lldb_private 109254721Semaste 110254721Semaste#endif // liblldb_ThreadPlanStepInRange_h_ 111