49 :
Thread(process, td.tid), m_thread_name(td.name), m_thread_reg_ctx_sp(),
50 m_signo(td.signo), m_code(td.code), m_gpregset_data(td.gpregset),
69 uint32_t concrete_frame_idx = 0;
75 bool is_linux =
false;
76 if (concrete_frame_idx == 0) {
85 case llvm::Triple::FreeBSD: {
87 case llvm::Triple::aarch64:
88 case llvm::Triple::arm:
90 case llvm::Triple::ppc:
93 case llvm::Triple::ppc64:
96 case llvm::Triple::mips64:
99 case llvm::Triple::x86:
102 case llvm::Triple::x86_64:
111 case llvm::Triple::NetBSD: {
113 case llvm::Triple::aarch64:
115 case llvm::Triple::x86:
118 case llvm::Triple::x86_64:
127 case llvm::Triple::Linux: {
130 case llvm::Triple::aarch64:
132 case llvm::Triple::ppc64le:
135 case llvm::Triple::systemz:
138 case llvm::Triple::x86:
141 case llvm::Triple::x86_64:
150 case llvm::Triple::OpenBSD: {
152 case llvm::Triple::aarch64:
154 case llvm::Triple::x86:
157 case llvm::Triple::x86_64:
170 if (!reg_interface && arch.
GetMachine() != llvm::Triple::aarch64 &&
172 LLDB_LOGF(log,
"elf-core::%s:: Architecture(%d) or OS(%d) not supported",
174 assert(
false &&
"Architecture or OS not supported");
178 case llvm::Triple::aarch64:
182 case llvm::Triple::arm:
187 case llvm::Triple::mipsel:
188 case llvm::Triple::mips:
192 case llvm::Triple::mips64:
193 case llvm::Triple::mips64el:
197 case llvm::Triple::ppc:
198 case llvm::Triple::ppc64:
202 case llvm::Triple::ppc64le:
206 case llvm::Triple::systemz:
210 case llvm::Triple::x86:
211 case llvm::Triple::x86_64:
247 constexpr size_t mips_linux_pr_status_size_o32 = 96;
248 constexpr size_t mips_linux_pr_status_size_n32 = 72;
249 constexpr size_t num_ptr_size_members = 10;
252 assert(!abi.empty() &&
"ABI is not set");
253 if (!abi.compare(
"n64"))
255 else if (!abi.compare(
"o32"))
256 return mips_linux_pr_status_size_o32;
258 return mips_linux_pr_status_size_n32;
276 error.SetErrorStringWithFormat(
277 "NT_PRSTATUS size should be %zu, but the remaining bytes are: %" PRIu64,
321 constexpr size_t mips_linux_pr_psinfo_size_o32_n32 = 128;
324 if (address_byte_size == 8)
326 return mips_linux_pr_psinfo_size_o32_n32;
346 error.SetErrorStringWithFormat(
347 "NT_PRPSINFO size should be %zu, but the remaining bytes are: %" PRIu64,
412 error.SetErrorStringWithFormat(
413 "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)
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
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)