LLDB  mainline
ThreadElfCore.cpp
Go to the documentation of this file.
1 //===-- ThreadElfCore.cpp -------------------------------------------------===//
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 
10 #include "lldb/Target/StopInfo.h"
11 #include "lldb/Target/Target.h"
12 #include "lldb/Target/Unwind.h"
14 #include "lldb/Utility/Log.h"
15 
29 #include "ProcessElfCore.h"
37 #include "ThreadElfCore.h"
38 
39 #include <memory>
40 
41 using namespace lldb;
42 using namespace lldb_private;
43 
44 // Construct a Thread object with given data
46  : Thread(process, td.tid), m_thread_name(td.name), m_thread_reg_ctx_sp(),
47  m_signo(td.signo), m_gpregset_data(td.gpregset), m_notes(td.notes) {}
48 
50 
52  GetRegisterContext()->InvalidateIfNeeded(false);
53 }
54 
55 RegisterContextSP ThreadElfCore::GetRegisterContext() {
56  if (!m_reg_context_sp) {
58  }
59  return m_reg_context_sp;
60 }
61 
62 RegisterContextSP
64  RegisterContextSP reg_ctx_sp;
65  uint32_t concrete_frame_idx = 0;
67 
68  if (frame)
69  concrete_frame_idx = frame->GetConcreteFrameIndex();
70 
71  if (concrete_frame_idx == 0) {
73  return m_thread_reg_ctx_sp;
74 
75  ProcessElfCore *process = static_cast<ProcessElfCore *>(GetProcess().get());
76  ArchSpec arch = process->GetArchitecture();
77  RegisterInfoInterface *reg_interface = nullptr;
78 
79  switch (arch.GetTriple().getOS()) {
80  case llvm::Triple::FreeBSD: {
81  switch (arch.GetMachine()) {
82  case llvm::Triple::aarch64:
83  case llvm::Triple::arm:
84  break;
85  case llvm::Triple::ppc:
86  reg_interface = new RegisterContextFreeBSD_powerpc32(arch);
87  break;
88  case llvm::Triple::ppc64:
89  reg_interface = new RegisterContextFreeBSD_powerpc64(arch);
90  break;
91  case llvm::Triple::mips64:
92  reg_interface = new RegisterContextFreeBSD_mips64(arch);
93  break;
94  case llvm::Triple::x86:
95  reg_interface = new RegisterContextFreeBSD_i386(arch);
96  break;
97  case llvm::Triple::x86_64:
98  reg_interface = new RegisterContextFreeBSD_x86_64(arch);
99  break;
100  default:
101  break;
102  }
103  break;
104  }
105 
106  case llvm::Triple::NetBSD: {
107  switch (arch.GetMachine()) {
108  case llvm::Triple::aarch64:
109  break;
110  case llvm::Triple::x86_64:
111  reg_interface = new RegisterContextNetBSD_x86_64(arch);
112  break;
113  default:
114  break;
115  }
116  break;
117  }
118 
119  case llvm::Triple::Linux: {
120  switch (arch.GetMachine()) {
121  case llvm::Triple::aarch64:
122  break;
123  case llvm::Triple::ppc64le:
124  reg_interface = new RegisterInfoPOSIX_ppc64le(arch);
125  break;
126  case llvm::Triple::systemz:
127  reg_interface = new RegisterContextLinux_s390x(arch);
128  break;
129  case llvm::Triple::x86:
130  reg_interface = new RegisterContextLinux_i386(arch);
131  break;
132  case llvm::Triple::x86_64:
133  reg_interface = new RegisterContextLinux_x86_64(arch);
134  break;
135  default:
136  break;
137  }
138  break;
139  }
140 
141  case llvm::Triple::OpenBSD: {
142  switch (arch.GetMachine()) {
143  case llvm::Triple::aarch64:
144  break;
145  case llvm::Triple::x86:
146  reg_interface = new RegisterContextOpenBSD_i386(arch);
147  break;
148  case llvm::Triple::x86_64:
149  reg_interface = new RegisterContextOpenBSD_x86_64(arch);
150  break;
151  default:
152  break;
153  }
154  break;
155  }
156 
157  default:
158  break;
159  }
160 
161  if (!reg_interface && arch.GetMachine() != llvm::Triple::aarch64 &&
162  arch.GetMachine() != llvm::Triple::arm) {
163  LLDB_LOGF(log, "elf-core::%s:: Architecture(%d) or OS(%d) not supported",
164  __FUNCTION__, arch.GetMachine(), arch.GetTriple().getOS());
165  assert(false && "Architecture or OS not supported");
166  }
167 
168  switch (arch.GetMachine()) {
169  case llvm::Triple::aarch64:
171  *this, arch, m_gpregset_data, m_notes);
172  break;
173  case llvm::Triple::arm:
174  m_thread_reg_ctx_sp = std::make_shared<RegisterContextCorePOSIX_arm>(
175  *this, std::make_unique<RegisterInfoPOSIX_arm>(arch), m_gpregset_data,
176  m_notes);
177  break;
178  case llvm::Triple::mipsel:
179  case llvm::Triple::mips:
180  m_thread_reg_ctx_sp = std::make_shared<RegisterContextCorePOSIX_mips64>(
181  *this, reg_interface, m_gpregset_data, m_notes);
182  break;
183  case llvm::Triple::mips64:
184  case llvm::Triple::mips64el:
185  m_thread_reg_ctx_sp = std::make_shared<RegisterContextCorePOSIX_mips64>(
186  *this, reg_interface, m_gpregset_data, m_notes);
187  break;
188  case llvm::Triple::ppc:
189  case llvm::Triple::ppc64:
190  m_thread_reg_ctx_sp = std::make_shared<RegisterContextCorePOSIX_powerpc>(
191  *this, reg_interface, m_gpregset_data, m_notes);
192  break;
193  case llvm::Triple::ppc64le:
194  m_thread_reg_ctx_sp = std::make_shared<RegisterContextCorePOSIX_ppc64le>(
195  *this, reg_interface, m_gpregset_data, m_notes);
196  break;
197  case llvm::Triple::systemz:
198  m_thread_reg_ctx_sp = std::make_shared<RegisterContextCorePOSIX_s390x>(
199  *this, reg_interface, m_gpregset_data, m_notes);
200  break;
201  case llvm::Triple::x86:
202  case llvm::Triple::x86_64:
203  m_thread_reg_ctx_sp = std::make_shared<RegisterContextCorePOSIX_x86_64>(
204  *this, reg_interface, m_gpregset_data, m_notes);
205  break;
206  default:
207  break;
208  }
209 
210  reg_ctx_sp = m_thread_reg_ctx_sp;
211  } else {
212  reg_ctx_sp = GetUnwinder().CreateRegisterContextForFrame(frame);
213  }
214  return reg_ctx_sp;
215 }
216 
218  ProcessSP process_sp(GetProcess());
219  if (process_sp) {
220  SetStopInfo(StopInfo::CreateStopReasonWithSignal(*this, m_signo));
221  return true;
222  }
223  return false;
224 }
225 
226 // Parse PRSTATUS from NOTE entry
228  memset(this, 0, sizeof(ELFLinuxPrStatus));
229 }
230 
232  constexpr size_t mips_linux_pr_status_size_o32 = 96;
233  constexpr size_t mips_linux_pr_status_size_n32 = 72;
234  constexpr size_t num_ptr_size_members = 10;
235  if (arch.IsMIPS()) {
236  std::string abi = arch.GetTargetABI();
237  assert(!abi.empty() && "ABI is not set");
238  if (!abi.compare("n64"))
239  return sizeof(ELFLinuxPrStatus);
240  else if (!abi.compare("o32"))
241  return mips_linux_pr_status_size_o32;
242  // N32 ABI
243  return mips_linux_pr_status_size_n32;
244  }
245  switch (arch.GetCore()) {
248  return 72;
249  default:
250  if (arch.GetAddressByteSize() == 8)
251  return sizeof(ELFLinuxPrStatus);
252  else
253  return sizeof(ELFLinuxPrStatus) - num_ptr_size_members * 4;
254  }
255 }
256 
258  const ArchSpec &arch) {
259  Status error;
260  if (GetSize(arch) > data.GetByteSize()) {
261  error.SetErrorStringWithFormat(
262  "NT_PRSTATUS size should be %zu, but the remaining bytes are: %" PRIu64,
263  GetSize(arch), data.GetByteSize());
264  return error;
265  }
266 
267  // Read field by field to correctly account for endianess of both the core
268  // dump and the platform running lldb.
269  offset_t offset = 0;
270  si_signo = data.GetU32(&offset);
271  si_code = data.GetU32(&offset);
272  si_errno = data.GetU32(&offset);
273 
274  pr_cursig = data.GetU16(&offset);
275  offset += 2; // pad
276 
277  pr_sigpend = data.GetAddress(&offset);
278  pr_sighold = data.GetAddress(&offset);
279 
280  pr_pid = data.GetU32(&offset);
281  pr_ppid = data.GetU32(&offset);
282  pr_pgrp = data.GetU32(&offset);
283  pr_sid = data.GetU32(&offset);
284 
285  pr_utime.tv_sec = data.GetAddress(&offset);
286  pr_utime.tv_usec = data.GetAddress(&offset);
287 
288  pr_stime.tv_sec = data.GetAddress(&offset);
289  pr_stime.tv_usec = data.GetAddress(&offset);
290 
291  pr_cutime.tv_sec = data.GetAddress(&offset);
292  pr_cutime.tv_usec = data.GetAddress(&offset);
293 
294  pr_cstime.tv_sec = data.GetAddress(&offset);
295  pr_cstime.tv_usec = data.GetAddress(&offset);
296 
297  return error;
298 }
299 
300 // Parse PRPSINFO from NOTE entry
302  memset(this, 0, sizeof(ELFLinuxPrPsInfo));
303 }
304 
306  constexpr size_t mips_linux_pr_psinfo_size_o32_n32 = 128;
307  if (arch.IsMIPS()) {
308  uint8_t address_byte_size = arch.GetAddressByteSize();
309  if (address_byte_size == 8)
310  return sizeof(ELFLinuxPrPsInfo);
311  return mips_linux_pr_psinfo_size_o32_n32;
312  }
313 
314  switch (arch.GetCore()) {
317  return sizeof(ELFLinuxPrPsInfo);
320  return 124;
321  default:
322  return 0;
323  }
324 }
325 
327  const ArchSpec &arch) {
328  Status error;
329  ByteOrder byteorder = data.GetByteOrder();
330  if (GetSize(arch) > data.GetByteSize()) {
331  error.SetErrorStringWithFormat(
332  "NT_PRPSINFO size should be %zu, but the remaining bytes are: %" PRIu64,
333  GetSize(arch), data.GetByteSize());
334  return error;
335  }
336  size_t size = 0;
337  offset_t offset = 0;
338 
339  pr_state = data.GetU8(&offset);
340  pr_sname = data.GetU8(&offset);
341  pr_zomb = data.GetU8(&offset);
342  pr_nice = data.GetU8(&offset);
343  if (data.GetAddressByteSize() == 8) {
344  // Word align the next field on 64 bit.
345  offset += 4;
346  }
347 
348  pr_flag = data.GetAddress(&offset);
349 
350  if (arch.IsMIPS()) {
351  // The pr_uid and pr_gid is always 32 bit irrespective of platforms
352  pr_uid = data.GetU32(&offset);
353  pr_gid = data.GetU32(&offset);
354  } else {
355  // 16 bit on 32 bit platforms, 32 bit on 64 bit platforms
356  pr_uid = data.GetMaxU64(&offset, data.GetAddressByteSize() >> 1);
357  pr_gid = data.GetMaxU64(&offset, data.GetAddressByteSize() >> 1);
358  }
359 
360  pr_pid = data.GetU32(&offset);
361  pr_ppid = data.GetU32(&offset);
362  pr_pgrp = data.GetU32(&offset);
363  pr_sid = data.GetU32(&offset);
364 
365  size = 16;
366  data.ExtractBytes(offset, size, byteorder, pr_fname);
367  offset += size;
368 
369  size = 80;
370  data.ExtractBytes(offset, size, byteorder, pr_psargs);
371  offset += size;
372 
373  return error;
374 }
375 
376 // Parse SIGINFO from NOTE entry
377 ELFLinuxSigInfo::ELFLinuxSigInfo() { memset(this, 0, sizeof(ELFLinuxSigInfo)); }
378 
380  if (arch.IsMIPS())
381  return sizeof(ELFLinuxSigInfo);
382  switch (arch.GetCore()) {
384  return sizeof(ELFLinuxSigInfo);
388  return 12;
389  default:
390  return 0;
391  }
392 }
393 
395  Status error;
396  if (GetSize(arch) > data.GetByteSize()) {
397  error.SetErrorStringWithFormat(
398  "NT_SIGINFO size should be %zu, but the remaining bytes are: %" PRIu64,
399  GetSize(arch), data.GetByteSize());
400  return error;
401  }
402 
403  // Parsing from a 32 bit ELF core file, and populating/reusing the structure
404  // properly, because the struct is for the 64 bit version
405  offset_t offset = 0;
406  si_signo = data.GetU32(&offset);
407  si_code = data.GetU32(&offset);
408  si_errno = data.GetU32(&offset);
409 
410  return error;
411 }
ELFLinuxPrStatus::pr_sid
uint32_t pr_sid
Definition: ThreadElfCore.h:47
ELFLinuxPrPsInfo::pr_fname
char pr_fname[16]
Definition: ThreadElfCore.h:107
ELFLinuxPrStatus::GetSize
static size_t GetSize(const lldb_private::ArchSpec &arch)
Definition: ThreadElfCore.cpp:231
lldb_private::ArchSpec
Definition: ArchSpec.h:33
lldb_private::ArchSpec::IsMIPS
bool IsMIPS() const
if MIPS architecture return true.
Definition: ArchSpec.cpp:545
ELFLinuxPrStatus
Definition: ThreadElfCore.h:34
lldb_private::DataExtractor::GetAddress
uint64_t GetAddress(lldb::offset_t *offset_ptr) const
Extract an address from *offset_ptr.
Definition: DataExtractor.cpp:652
ELFLinuxPrPsInfo::pr_psargs
char pr_psargs[80]
Definition: ThreadElfCore.h:108
lldb_private::ArchSpec::eCore_x86_32_i486
@ eCore_x86_32_i486
Definition: ArchSpec.h:184
ThreadElfCore::CreateRegisterContextForFrame
lldb::RegisterContextSP CreateRegisterContextForFrame(lldb_private::StackFrame *frame) override
Definition: ThreadElfCore.cpp:63
lldb_private::ArchSpec::GetMachine
llvm::Triple::ArchType GetMachine() const
Returns a machine family for the current architecture.
Definition: ArchSpec.cpp:667
ELFLinuxSigInfo::Parse
lldb_private::Status Parse(const lldb_private::DataExtractor &data, const lldb_private::ArchSpec &arch)
Definition: ThreadElfCore.cpp:394
RegisterContextLinux_x86_64
Definition: RegisterContextLinux_x86_64.h:14
ELFLinuxSigInfo::GetSize
static size_t GetSize(const lldb_private::ArchSpec &arch)
Definition: ThreadElfCore.cpp:379
ProcessElfCore.h
ThreadElfCore::RefreshStateAfterStop
void RefreshStateAfterStop() override
Definition: ThreadElfCore.cpp:51
ELFLinuxPrStatus::pr_stime
compat_timeval pr_stime
Definition: ThreadElfCore.h:50
lldb_private::Thread::GetUnwinder
virtual Unwind & GetUnwinder()
Definition: Thread.cpp:1862
ELFLinuxPrPsInfo::ELFLinuxPrPsInfo
ELFLinuxPrPsInfo()
Definition: ThreadElfCore.cpp:301
Unwind.h
lldb_private::ArchSpec::GetCore
Core GetCore() const
Definition: ArchSpec.h:423
RegisterContextOpenBSD_x86_64
Definition: RegisterContextOpenBSD_x86_64.h:14
RegisterContextLinux_x86_64.h
lldb_private::RegisterInfoInterface
Definition: RegisterInfoInterface.h:21
lldb_private::ArchSpec::eCore_s390x_generic
@ eCore_s390x_generic
Definition: ArchSpec.h:177
LLDB_LOGF
#define LLDB_LOGF(log,...)
Definition: Log.h:249
lldb_private::Process
Definition: Process.h:343
RegisterContextFreeBSD_powerpc.h
ELFLinuxPrStatus::pr_sigpend
uint64_t pr_sigpend
Definition: ThreadElfCore.h:41
ELFLinuxPrPsInfo::pr_flag
uint64_t pr_flag
Definition: ThreadElfCore.h:100
ThreadElfCore::m_gpregset_data
lldb_private::DataExtractor m_gpregset_data
Definition: ThreadElfCore.h:170
RegisterContextPOSIXCore_mips64.h
RegisterInfoPOSIX_arm.h
lldb::offset_t
uint64_t offset_t
Definition: lldb-types.h:87
ELFLinuxPrPsInfo::pr_pgrp
int32_t pr_pgrp
Definition: ThreadElfCore.h:105
ELFLinuxPrStatus::si_code
int32_t si_code
Definition: ThreadElfCore.h:36
ELFLinuxPrStatus::ELFLinuxPrStatus
ELFLinuxPrStatus()
Definition: ThreadElfCore.cpp:227
ELFLinuxSigInfo::si_errno
int32_t si_errno
Definition: ThreadElfCore.h:73
lldb_private::ArchSpec::GetTriple
llvm::Triple & GetTriple()
Architecture triple accessor.
Definition: ArchSpec.h:444
ThreadElfCore.h
RegisterContextOpenBSD_x86_64.h
ELFLinuxPrStatus::Parse
lldb_private::Status Parse(const lldb_private::DataExtractor &data, const lldb_private::ArchSpec &arch)
Definition: ThreadElfCore.cpp:257
RegisterContextNetBSD_x86_64
Definition: RegisterContextNetBSD_x86_64.h:14
lldb_private::DataExtractor::ExtractBytes
size_t ExtractBytes(lldb::offset_t offset, lldb::offset_t length, lldb::ByteOrder dst_byte_order, void *dst) const
Extract an arbitrary number of bytes in the specified byte order.
Definition: DataExtractor.cpp:662
ELFLinuxPrStatus::pr_ppid
uint32_t pr_ppid
Definition: ThreadElfCore.h:45
ELFLinuxPrPsInfo::Parse
lldb_private::Status Parse(const lldb_private::DataExtractor &data, const lldb_private::ArchSpec &arch)
Definition: ThreadElfCore.cpp:326
RegisterContextLinux_i386.h
RegisterContextPOSIXCore_arm.h
RegisterContextFreeBSD_mips64.h
ELFLinuxPrPsInfo
Definition: ThreadElfCore.h:95
Target.h
lldb_private::StackFrame::GetConcreteFrameIndex
uint32_t GetConcreteFrameIndex() const
Query this frame to find what frame it is in this Thread's StackFrameList, not counting inlined frame...
Definition: StackFrame.h:407
RegisterContextLinux_s390x.h
ELFLinuxPrPsInfo::GetSize
static size_t GetSize(const lldb_private::ArchSpec &arch)
Definition: ThreadElfCore.cpp:305
lldb_private::Thread::GetProcess
lldb::ProcessSP GetProcess() const
Definition: Thread.h:154
lldb_private::Thread::DestroyThread
virtual void DestroyThread()
Definition: Thread.cpp:248
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
ThreadElfCore::~ThreadElfCore
~ThreadElfCore() override
Definition: ThreadElfCore.cpp:49
lldb_private::DataExtractor::GetAddressByteSize
uint32_t GetAddressByteSize() const
Get the current address size.
Definition: DataExtractor.h:253
lldb_private::DataExtractor
Definition: DataExtractor.h:48
Log.h
lldb_private::Thread
Definition: Thread.h:62
RegisterContextCorePOSIX_arm64::Create
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)
Definition: RegisterContextPOSIXCore_arm64.cpp:21
ELFLinuxPrPsInfo::pr_nice
char pr_nice
Definition: ThreadElfCore.h:99
RegisterContextOpenBSD_i386
Definition: RegisterContextOpenBSD_i386.h:14
compat_timeval::tv_usec
uint64_t tv_usec
Definition: ThreadElfCore.h:20
ELFLinuxPrPsInfo::pr_ppid
int32_t pr_ppid
Definition: ThreadElfCore.h:104
lldb_private::DataExtractor::GetByteOrder
lldb::ByteOrder GetByteOrder() const
Get the current byte order value.
Definition: DataExtractor.h:583
ELFLinuxPrStatus::pr_pgrp
uint32_t pr_pgrp
Definition: ThreadElfCore.h:46
ThreadElfCore::ThreadElfCore
ThreadElfCore(lldb_private::Process &process, const ThreadData &td)
Definition: ThreadElfCore.cpp:45
lldb_private::DataExtractor::GetU8
uint8_t GetU8(lldb::offset_t *offset_ptr) const
Extract a uint8_t value from *offset_ptr.
Definition: DataExtractor.cpp:319
lldb_private::Thread::SetStopInfo
void SetStopInfo(const lldb::StopInfoSP &stop_info_sp)
Definition: Thread.cpp:434
lldb_private::GetLogIfAllCategoriesSet
Log * GetLogIfAllCategoriesSet(uint32_t mask)
Definition: Logging.cpp:58
lldb_private::ArchSpec::eCore_x86_32_i386
@ eCore_x86_32_i386
Definition: ArchSpec.h:183
RegisterInfoPOSIX_arm64.h
RegisterContextOpenBSD_i386.h
RegisterContextPOSIXCore_arm64.h
ELFLinuxSigInfo::si_signo
int32_t si_signo
Definition: ThreadElfCore.h:71
ELFLinuxPrPsInfo::pr_zomb
char pr_zomb
Definition: ThreadElfCore.h:98
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:38
RegisterContextFreeBSD_powerpc32
Definition: RegisterContextFreeBSD_powerpc.h:28
RegisterContextLinux_i386
Definition: RegisterContextLinux_i386.h:14
RegisterInfoPOSIX_ppc64le
Definition: RegisterInfoPOSIX_ppc64le.h:16
RegisterInfoPOSIX_ppc64le.h
lldb_private::ArchSpec::GetAddressByteSize
uint32_t GetAddressByteSize() const
Returns the size in bytes of an address of the current architecture.
Definition: ArchSpec.cpp:683
ELFLinuxSigInfo
Definition: ThreadElfCore.h:70
RegisterContextPOSIXCore_x86_64.h
ELFLinuxPrStatus::si_errno
int32_t si_errno
Definition: ThreadElfCore.h:37
ThreadElfCore::m_notes
std::vector< lldb_private::CoreNote > m_notes
Definition: ThreadElfCore.h:171
RegisterContextPOSIXCore_powerpc.h
lldb_private::Unwind::CreateRegisterContextForFrame
lldb::RegisterContextSP CreateRegisterContextForFrame(StackFrame *frame)
Definition: Unwind.h:56
ELFLinuxPrPsInfo::pr_sid
int32_t pr_sid
Definition: ThreadElfCore.h:106
ELFLinuxPrStatus::pr_pid
uint32_t pr_pid
Definition: ThreadElfCore.h:44
ELFLinuxSigInfo::si_code
int32_t si_code
Definition: ThreadElfCore.h:72
RegisterContextFreeBSD_x86_64.h
RegisterContextFreeBSD_powerpc64
Definition: RegisterContextFreeBSD_powerpc.h:40
ELFLinuxPrStatus::pr_cursig
int16_t pr_cursig
Definition: ThreadElfCore.h:39
lldb_private::Status
Definition: Status.h:44
compat_timeval::tv_sec
uint64_t tv_sec
Definition: ThreadElfCore.h:19
lldb_private::Thread::m_reg_context_sp
lldb::RegisterContextSP m_reg_context_sp
The register context for this thread's current register state.
Definition: Thread.h:1249
ELFLinuxPrStatus::pr_cutime
compat_timeval pr_cutime
Definition: ThreadElfCore.h:51
uint32_t
ELFLinuxPrStatus::pr_utime
compat_timeval pr_utime
Definition: ThreadElfCore.h:49
ELFLinuxPrPsInfo::pr_sname
char pr_sname
Definition: ThreadElfCore.h:97
lldb_private::DataExtractor::GetMaxU64
uint64_t GetMaxU64(lldb::offset_t *offset_ptr, size_t byte_size) const
Extract an unsigned integer of size byte_size from *offset_ptr.
Definition: DataExtractor.cpp:527
RegisterContextPOSIXCore_s390x.h
ELFLinuxSigInfo::ELFLinuxSigInfo
ELFLinuxSigInfo()
Definition: ThreadElfCore.cpp:377
RegisterContextFreeBSD_i386.h
ThreadData
Definition: ThreadElfCore.h:126
ELFLinuxPrStatus::pr_cstime
compat_timeval pr_cstime
Definition: ThreadElfCore.h:52
StopInfo.h
lldb_private::DataExtractor::GetU32
uint32_t GetU32(lldb::offset_t *offset_ptr) const
Extract a uint32_t value from *offset_ptr.
Definition: DataExtractor.cpp:428
ThreadElfCore::m_signo
int m_signo
Definition: ThreadElfCore.h:168
ELFLinuxPrStatus::pr_sighold
uint64_t pr_sighold
Definition: ThreadElfCore.h:42
DataExtractor.h
ThreadElfCore::m_thread_reg_ctx_sp
lldb::RegisterContextSP m_thread_reg_ctx_sp
Definition: ThreadElfCore.h:166
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::DataExtractor::GetU16
uint16_t GetU16(lldb::offset_t *offset_ptr) const
Extract a uint16_t value from *offset_ptr.
Definition: DataExtractor.cpp:350
RegisterContextFreeBSD_mips64
Definition: RegisterContextFreeBSD_mips64.h:14
lldb_private::ArchSpec::eCore_x86_64_x86_64
@ eCore_x86_64_x86_64
Definition: ArchSpec.h:188
ELFLinuxPrPsInfo::pr_gid
uint32_t pr_gid
Definition: ThreadElfCore.h:102
lldb_private::ArchSpec::GetTargetABI
std::string GetTargetABI() const
Return a string representing target application ABI.
Definition: ArchSpec.cpp:547
ELFLinuxPrStatus::si_signo
int32_t si_signo
Definition: ThreadElfCore.h:35
ELFLinuxPrPsInfo::pr_pid
int32_t pr_pid
Definition: ThreadElfCore.h:103
ProcessElfCore
Definition: ProcessElfCore.h:31
RegisterContextFreeBSD_i386
Definition: RegisterContextFreeBSD_i386.h:14
RegisterContextPOSIXCore_ppc64le.h
lldb_private::Log
Definition: Log.h:49
lldb_private::DataExtractor::GetByteSize
uint64_t GetByteSize() const
Get the number of bytes contained in this object.
Definition: DataExtractor.h:259
lldb_private::StackFrame
Definition: StackFrame.h:40
ELFLinuxPrPsInfo::pr_state
char pr_state
Definition: ThreadElfCore.h:96
lldb
Definition: SBAddress.h:15
RegisterContextNetBSD_x86_64.h
LIBLLDB_LOG_THREAD
#define LIBLLDB_LOG_THREAD
Definition: Logging.h:16
RegisterContext.h
ProcessElfCore::GetArchitecture
lldb_private::ArchSpec GetArchitecture()
Definition: ProcessElfCore.cpp:902
ThreadElfCore::GetRegisterContext
lldb::RegisterContextSP GetRegisterContext() override
Definition: ThreadElfCore.cpp:55
ThreadElfCore::CalculateStopInfo
bool CalculateStopInfo() override
Definition: ThreadElfCore.cpp:217
RegisterContextFreeBSD_x86_64
Definition: RegisterContextFreeBSD_x86_64.h:14
RegisterContextLinux_s390x
Definition: RegisterContextLinux_s390x.h:14
ELFLinuxPrPsInfo::pr_uid
uint32_t pr_uid
Definition: ThreadElfCore.h:101
lldb::ByteOrder
ByteOrder
Byte ordering definitions.
Definition: lldb-enumerations.h:138