1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
8 #define user_regs_struct user_regs
9 #define user_fpregs_struct user_fpregs
11 #if defined(__VFP_FP__) && !defined(__SOFTFP__)
12 struct user_vfpregs_struct
14 unsigned long long fpregs[32];
16 } __attribute__((__packed__));
24 pid_t m_tid; // thread id
25 pid_t m_ppid; // parent process
26 pid_t m_tgid; // thread group
27 struct user_regs_struct m_gpRegisters; // general purpose registers
28 struct user_fpregs_struct m_fpRegisters; // floating point registers
30 struct user_fpxregs_struct m_fpxRegisters; // x86 floating point registers
31 #elif defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)
32 struct user_vfpregs_struct m_vfpRegisters; // ARM VFP/NEON registers
36 ThreadInfo(pid_t tid);
38 bool Initialize(ICLRDataTarget* pDataTarget);
40 bool UnwindThread(CrashInfo& crashInfo, IXCLRDataProcess* pClrDataProcess);
41 void GetThreadStack(CrashInfo& crashInfo);
42 void GetThreadContext(uint32_t flags, CONTEXT* context) const;
44 inline const pid_t Tid() const { return m_tid; }
45 inline const pid_t Ppid() const { return m_ppid; }
46 inline const pid_t Tgid() const { return m_tgid; }
48 inline const user_regs_struct* GPRegisters() const { return &m_gpRegisters; }
49 inline const user_fpregs_struct* FPRegisters() const { return &m_fpRegisters; }
51 inline const user_fpxregs_struct* FPXRegisters() const { return &m_fpxRegisters; }
52 #elif defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)
53 inline const user_vfpregs_struct* VFPRegisters() const { return &m_vfpRegisters; }
57 void UnwindNativeFrames(CrashInfo& crashInfo, CONTEXT* pContext);
58 bool GetRegistersWithPTrace();
59 bool GetRegistersWithDataTarget(ICLRDataTarget* dataTarget);