40 :
Thread(process, tid), m_thread_name(), m_dispatch_queue_name(),
69 const bool force =
false;
72 reg_ctx_sp->InvalidateIfNeeded(force);
89 uint32_t concrete_frame_idx = 0;
94 if (concrete_frame_idx == 0) {
97 switch (
static_cast<ProcessKDP *
>(process_sp.get())
100 case llvm::MachO::CPU_TYPE_ARM:
102 std::make_shared<RegisterContextKDP_arm>(*
this, concrete_frame_idx);
104 case llvm::MachO::CPU_TYPE_ARM64:
105 reg_ctx_sp = std::make_shared<RegisterContextKDP_arm64>(
106 *
this, concrete_frame_idx);
108 case llvm::MachO::CPU_TYPE_I386:
109 reg_ctx_sp = std::make_shared<RegisterContextKDP_i386>(
110 *
this, concrete_frame_idx);
112 case llvm::MachO::CPU_TYPE_X86_64:
113 reg_ctx_sp = std::make_shared<RegisterContextKDP_x86_64>(
114 *
this, concrete_frame_idx);
117 llvm_unreachable(
"Add CPU type support in KDP");
142 uint8_t reply_command = exc_reply_packet.
GetU8(&offset);
145 const uint32_t count = exc_reply_packet.
GetU32(&offset);
149 const uint32_t exc_type = exc_reply_packet.
GetU32(&offset);
150 const uint32_t exc_code = exc_reply_packet.
GetU32(&offset);
151 const uint32_t exc_subcode = exc_reply_packet.
GetU32(&offset);
159 const bool pc_already_adjusted =
false;
160 const bool adjust_pc_if_needed =
true;
164 *
this, exc_type, 2, exc_code, exc_subcode, 0, pc_already_adjusted,
165 adjust_pc_if_needed);
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
CommunicationKDP & GetCommunication()
bool ShouldStop(bool &step_more)
lldb::RegisterContextSP GetRegisterContext() override
const char * GetQueueName() override
Retrieve the Queue name for the queue currently using this Thread.
ThreadKDP(lldb_private::Process &process, lldb::tid_t tid)
lldb::StopInfoSP m_cached_stop_info_sp
void Dump(lldb_private::Log *log, uint32_t index)
std::string m_thread_name
void RefreshStateAfterStop() override
lldb::RegisterContextSP CreateRegisterContextForFrame(lldb_private::StackFrame *frame) override
static bool ThreadIDIsValid(lldb::tid_t thread)
void SetStopInfoFrom_KDP_EXCEPTION(const lldb_private::DataExtractor &exc_reply_packet)
const char * GetName() override
bool CalculateStopInfo() override
Ask the thread subclass to set its stop info.
A plug-in interface definition class for debugging a process.
This base class provides an interface to stack frames.
uint32_t GetConcreteFrameIndex() const
Query this frame to find what frame it is in this Thread's StackFrameList, not counting inlined frame...
static lldb::StopInfoSP CreateStopReasonWithMachException(Thread &thread, uint32_t exc_type, uint32_t exc_data_count, uint64_t exc_code, uint64_t exc_sub_code, uint64_t exc_sub_sub_code, bool pc_already_adjusted=true, bool adjust_pc_if_needed=false)
static lldb::StopInfoSP CreateStopReasonWithSignal(Thread &thread, int signo, const char *description=nullptr, std::optional< int > code=std::nullopt)
void SetStopInfo(const lldb::StopInfoSP &stop_info_sp)
lldb::ProcessSP CalculateProcess() override
virtual void DestroyThread()
virtual Unwind & GetUnwinder()
lldb::ProcessSP GetProcess() const
lldb::RegisterContextSP m_reg_context_sp
The register context for this thread's current register state.
lldb::RegisterContextSP CreateRegisterContextForFrame(StackFrame *frame)
#define LLDB_INVALID_ADDRESS
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::RegisterContext > RegisterContextSP
lldb::user_id_t GetID() const
Get accessor for the user ID.