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
12 #if defined(__aarch64__)
13 #define user_fpregs_struct user_fpsimd_struct
16 #if defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)
17 struct user_vfpregs_struct
19 unsigned long long fpregs[32];
21 } __attribute__((__packed__));
27 pid_t m_tid; // thread id
28 pid_t m_ppid; // parent process
29 pid_t m_tgid; // thread group
30 struct user_regs_struct m_gpRegisters; // general purpose registers
31 struct user_fpregs_struct m_fpRegisters; // floating point registers
33 struct user_fpxregs_struct m_fpxRegisters; // x86 floating point registers
34 #elif defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)
35 struct user_vfpregs_struct m_vfpRegisters; // ARM VFP/NEON registers
39 ThreadInfo(pid_t tid);
41 bool Initialize(ICLRDataTarget* pDataTarget);
43 bool UnwindThread(CrashInfo& crashInfo, IXCLRDataProcess* pClrDataProcess);
44 void GetThreadStack(CrashInfo& crashInfo);
45 void GetThreadContext(uint32_t flags, CONTEXT* context) const;
47 inline pid_t Tid() const { return m_tid; }
48 inline pid_t Ppid() const { return m_ppid; }
49 inline pid_t Tgid() const { return m_tgid; }
51 inline const user_regs_struct* GPRegisters() const { return &m_gpRegisters; }
52 inline const user_fpregs_struct* FPRegisters() const { return &m_fpRegisters; }
54 inline const user_fpxregs_struct* FPXRegisters() const { return &m_fpxRegisters; }
55 #elif defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)
56 inline const user_vfpregs_struct* VFPRegisters() const { return &m_vfpRegisters; }
60 void UnwindNativeFrames(CrashInfo& crashInfo, CONTEXT* pContext);
61 bool GetRegistersWithPTrace();
62 bool GetRegistersWithDataTarget(ICLRDataTarget* dataTarget);