50 :
Thread(process, td.tid), m_thread_name(td.name), m_thread_reg_ctx_sp(),
51 m_signo(td.signo), m_code(td.code), m_gpregset_data(td.gpregset),
70 uint32_t concrete_frame_idx = 0;
76 bool is_linux =
false;
77 if (concrete_frame_idx == 0) {
86 case llvm::Triple::FreeBSD: {
88 case llvm::Triple::aarch64:
89 case llvm::Triple::arm:
91 case llvm::Triple::ppc:
94 case llvm::Triple::ppc64:
97 case llvm::Triple::mips64:
100 case llvm::Triple::x86:
103 case llvm::Triple::x86_64:
112 case llvm::Triple::NetBSD: {
114 case llvm::Triple::aarch64:
116 case llvm::Triple::x86:
119 case llvm::Triple::x86_64:
128 case llvm::Triple::Linux: {
131 case llvm::Triple::aarch64:
133 case llvm::Triple::ppc64le:
136 case llvm::Triple::systemz:
139 case llvm::Triple::x86:
142 case llvm::Triple::x86_64:
151 case llvm::Triple::OpenBSD: {
153 case llvm::Triple::aarch64:
155 case llvm::Triple::x86:
158 case llvm::Triple::x86_64:
171 if (!reg_interface && arch.
GetMachine() != llvm::Triple::aarch64 &&
174 LLDB_LOGF(log,
"elf-core::%s:: Architecture(%d) or OS(%d) not supported",
176 assert(
false &&
"Architecture or OS not supported");
180 case llvm::Triple::aarch64:
184 case llvm::Triple::arm:
189 case llvm::Triple::riscv64:
193 case llvm::Triple::mipsel:
194 case llvm::Triple::mips:
198 case llvm::Triple::mips64:
199 case llvm::Triple::mips64el:
203 case llvm::Triple::ppc:
204 case llvm::Triple::ppc64:
208 case llvm::Triple::ppc64le:
212 case llvm::Triple::systemz:
216 case llvm::Triple::x86:
217 case llvm::Triple::x86_64:
253 constexpr size_t mips_linux_pr_status_size_o32 = 96;
254 constexpr size_t mips_linux_pr_status_size_n32 = 72;
255 constexpr size_t num_ptr_size_members = 10;
258 assert(!abi.empty() &&
"ABI is not set");
259 if (!abi.compare(
"n64"))
261 else if (!abi.compare(
"o32"))
262 return mips_linux_pr_status_size_o32;
264 return mips_linux_pr_status_size_n32;
282 error.SetErrorStringWithFormat(
283 "NT_PRSTATUS size should be %zu, but the remaining bytes are: %" PRIu64,
327 constexpr size_t mips_linux_pr_psinfo_size_o32_n32 = 128;
330 if (address_byte_size == 8)
332 return mips_linux_pr_psinfo_size_o32_n32;
352 error.SetErrorStringWithFormat(
353 "NT_PRPSINFO size should be %zu, but the remaining bytes are: %" PRIu64,
418 error.SetErrorStringWithFormat(
419 "NT_SIGINFO size should be %zu, but the remaining bytes are: %" PRIu64,
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_LOGF(log,...)
lldb_private::ArchSpec GetArchitecture()
static std::unique_ptr< RegisterContextCorePOSIX_arm64 > Create(lldb_private::Thread &thread, const lldb_private::ArchSpec &arch, const lldb_private::DataExtractor &gpregset, llvm::ArrayRef< lldb_private::CoreNote > notes)
static std::unique_ptr< RegisterContextCorePOSIX_riscv64 > Create(lldb_private::Thread &thread, const lldb_private::ArchSpec &arch, const lldb_private::DataExtractor &gpregset, llvm::ArrayRef< lldb_private::CoreNote > notes)
void RefreshStateAfterStop() override
lldb::RegisterContextSP GetRegisterContext() override
~ThreadElfCore() override
ThreadElfCore(lldb_private::Process &process, const ThreadData &td)
lldb::RegisterContextSP CreateRegisterContextForFrame(lldb_private::StackFrame *frame) override
std::vector< lldb_private::CoreNote > m_notes
lldb::RegisterContextSP m_thread_reg_ctx_sp
lldb_private::DataExtractor m_gpregset_data
bool CalculateStopInfo() override
Ask the thread subclass to set its stop info.
An architecture specification class.
uint32_t GetAddressByteSize() const
Returns the size in bytes of an address of the current architecture.
llvm::Triple & GetTriple()
Architecture triple accessor.
bool IsMIPS() const
if MIPS architecture return true.
std::string GetTargetABI() const
Return a string representing target application ABI.
llvm::Triple::ArchType GetMachine() const
Returns a machine family for the current architecture.
A plug-in interface definition class for debugging a process.
RegisterInfo interface to patch RegisterInfo structure for archs.
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 CreateStopReasonWithSignal(Thread &thread, int signo, const char *description=nullptr, std::optional< int > code=std::nullopt)
void SetStopInfo(const lldb::StopInfoSP &stop_info_sp)
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)
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
ByteOrder
Byte ordering definitions.
std::shared_ptr< lldb_private::RegisterContext > RegisterContextSP
lldb_private::Status Parse(const lldb_private::DataExtractor &data, const lldb_private::ArchSpec &arch)
static size_t GetSize(const lldb_private::ArchSpec &arch)
static size_t GetSize(const lldb_private::ArchSpec &arch)
lldb_private::Status Parse(const lldb_private::DataExtractor &data, const lldb_private::ArchSpec &arch)
lldb_private::Status Parse(const lldb_private::DataExtractor &data, const lldb_private::ArchSpec &arch)
static size_t GetSize(const lldb_private::ArchSpec &arch)