LLDB mainline
ThreadMachCore.h
Go to the documentation of this file.
1//===-- ThreadMachCore.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
9#ifndef LLDB_SOURCE_PLUGINS_PROCESS_MACH_CORE_THREADMACHCORE_H
10#define LLDB_SOURCE_PLUGINS_PROCESS_MACH_CORE_THREADMACHCORE_H
11
12#include <string>
13
14#include "lldb/Target/Thread.h"
15
16class ProcessMachCore;
17
19public:
21 uint32_t objfile_lc_thread_idx);
22
23 ~ThreadMachCore() override;
24
25 void RefreshStateAfterStop() override;
26
27 const char *GetName() override;
28
30
33
34 static bool ThreadIDIsValid(lldb::tid_t thread);
35
36 bool ShouldStop(bool &step_more);
37
38 const char *GetBasicInfoAsString();
39
40 void SetName(const char *name) override {
41 if (name && name[0])
42 m_thread_name.assign(name);
43 else
44 m_thread_name.clear();
45 }
46
48
49 void SetThreadDispatchQAddr(lldb::addr_t thread_dispatch_qaddr) {
50 m_thread_dispatch_qaddr = thread_dispatch_qaddr;
51 }
52
53protected:
54 friend class ProcessMachCore;
55
56 // Member variables.
57 std::string m_thread_name;
62
63 // Protected member functions.
64 bool CalculateStopInfo() override;
65};
66
67#endif // LLDB_SOURCE_PLUGINS_PROCESS_MACH_CORE_THREADMACHCORE_H
std::string m_thread_name
lldb::addr_t m_thread_dispatch_qaddr
void SetName(const char *name) override
bool ShouldStop(bool &step_more)
void RefreshStateAfterStop() override
void SetThreadDispatchQAddr(lldb::addr_t thread_dispatch_qaddr)
std::string m_dispatch_queue_name
uint32_t m_objfile_lc_thread_idx
static bool ThreadIDIsValid(lldb::tid_t thread)
const char * GetBasicInfoAsString()
~ThreadMachCore() override
lldb::RegisterContextSP CreateRegisterContextForFrame(lldb_private::StackFrame *frame) override
const char * GetName() override
bool CalculateStopInfo() override
Ask the thread subclass to set its stop info.
lldb::addr_t GetThreadDispatchQAddr()
lldb::RegisterContextSP GetRegisterContext() override
lldb::RegisterContextSP m_thread_reg_ctx_sp
A plug-in interface definition class for debugging a process.
Definition: Process.h:341
This base class provides an interface to stack frames.
Definition: StackFrame.h:43
uint64_t addr_t
Definition: lldb-types.h:80
std::shared_ptr< lldb_private::RegisterContext > RegisterContextSP
Definition: lldb-forward.h:392
uint64_t tid_t
Definition: lldb-types.h:84