#include "FreeBSDThread.h"
#include "POSIXStopInfo.h"
#include "Plugins/Process/Utility/RegisterContextFreeBSD_arm.h"
-#include "Plugins/Process/Utility/RegisterContextFreeBSD_arm64.h"
#include "Plugins/Process/Utility/RegisterContextFreeBSD_i386.h"
#include "Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h"
#include "Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h"
#include "Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.h"
+#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h"
#include "Plugins/Process/Utility/UnwindLLDB.h"
#include "ProcessFreeBSD.h"
#include "ProcessMonitor.h"
assert(target_arch.GetTriple().getOS() == llvm::Triple::FreeBSD);
switch (target_arch.GetMachine()) {
case llvm::Triple::aarch64:
- reg_interface = new RegisterContextFreeBSD_arm64(target_arch);
+ reg_interface = new RegisterInfoPOSIX_arm64(target_arch);
break;
case llvm::Triple::arm:
reg_interface = new RegisterContextFreeBSD_arm(target_arch);
#include "Plugins/Process/Linux/NativeProcessLinux.h"
#include "Plugins/Process/Linux/Procfs.h"
#include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
-#include "Plugins/Process/Utility/RegisterContextLinux_arm64.h"
+#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h"
// System includes - They have to be included after framework includes because
// they define some
const ArchSpec &target_arch, NativeThreadProtocol &native_thread,
uint32_t concrete_frame_idx)
: NativeRegisterContextLinux(native_thread, concrete_frame_idx,
- new RegisterContextLinux_arm64(target_arch)) {
+ new RegisterInfoPOSIX_arm64(target_arch)) {
switch (target_arch.GetMachine()) {
case llvm::Triple::aarch64:
m_reg_info.num_registers = k_num_registers_arm64;
RegisterContextDarwin_x86_64.cpp
RegisterContextDummy.cpp
RegisterContextFreeBSD_arm.cpp
- RegisterContextFreeBSD_arm64.cpp
RegisterContextFreeBSD_i386.cpp
RegisterContextFreeBSD_mips64.cpp
RegisterContextFreeBSD_powerpc.cpp
RegisterContextFreeBSD_x86_64.cpp
RegisterContextHistory.cpp
RegisterContextLinux_arm.cpp
- RegisterContextLinux_arm64.cpp
RegisterContextLinux_i386.cpp
RegisterContextLinux_x86_64.cpp
RegisterContextLinux_mips64.cpp
RegisterContextPOSIX_s390x.cpp
RegisterContextPOSIX_x86.cpp
RegisterContextThreadMemory.cpp
+ RegisterInfoPOSIX_arm64.cpp
StopInfoMachException.cpp
ThreadMemory.cpp
UnwindLLDB.cpp
+++ /dev/null
-//===-- RegisterContextFreeBSD_arm64.cpp ----------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===---------------------------------------------------------------------===//
-
-#include "RegisterContextFreeBSD_arm64.h"
-#include "RegisterContextPOSIX_arm64.h"
-#include <vector>
-
-using namespace lldb;
-
-// Based on RegisterContextDarwin_arm64.cpp
-#define GPR_OFFSET(idx) ((idx)*8)
-#define GPR_OFFSET_NAME(reg) \
- (LLVM_EXTENSION offsetof(RegisterContextFreeBSD_arm64::GPR, reg))
-
-#define FPU_OFFSET(idx) ((idx)*16 + sizeof(RegisterContextFreeBSD_arm64::GPR))
-#define FPU_OFFSET_NAME(reg) \
- (LLVM_EXTENSION offsetof(RegisterContextFreeBSD_arm64::FPU, reg))
-
-#define EXC_OFFSET_NAME(reg) \
- (LLVM_EXTENSION offsetof(RegisterContextFreeBSD_arm64::EXC, reg) + \
- sizeof(RegisterContextFreeBSD_arm64::GPR) + \
- sizeof(RegisterContextFreeBSD_arm64::FPU))
-#define DBG_OFFSET_NAME(reg) \
- (LLVM_EXTENSION offsetof(RegisterContextFreeBSD_arm64::DBG, reg) + \
- sizeof(RegisterContextFreeBSD_arm64::GPR) + \
- sizeof(RegisterContextFreeBSD_arm64::FPU) + \
- sizeof(RegisterContextFreeBSD_arm64::EXC))
-
-#define DEFINE_DBG(reg, i) \
- #reg, NULL, \
- sizeof(((RegisterContextFreeBSD_arm64::DBG *) NULL)->reg[i]), \
- DBG_OFFSET_NAME(reg[i]), lldb::eEncodingUint, lldb::eFormatHex, \
- {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, \
- LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, \
- dbg_##reg##i }, \
- NULL, NULL, NULL, 0
-#define REG_CONTEXT_SIZE \
- (sizeof(RegisterContextFreeBSD_arm64::GPR) + \
- sizeof(RegisterContextFreeBSD_arm64::FPU) + \
- sizeof(RegisterContextFreeBSD_arm64::EXC))
-
-//-----------------------------------------------------------------------------
-// Include RegisterInfos_arm64 to declare our g_register_infos_arm64 structure.
-//-----------------------------------------------------------------------------
-#define DECLARE_REGISTER_INFOS_ARM64_STRUCT
-#include "RegisterInfos_arm64.h"
-#undef DECLARE_REGISTER_INFOS_ARM64_STRUCT
-
-static const lldb_private::RegisterInfo *
-GetRegisterInfoPtr(const lldb_private::ArchSpec &target_arch) {
- switch (target_arch.GetMachine()) {
- case llvm::Triple::aarch64:
- return g_register_infos_arm64_le;
- default:
- assert(false && "Unhandled target architecture.");
- return nullptr;
- }
-}
-
-static uint32_t
-GetRegisterInfoCount(const lldb_private::ArchSpec &target_arch) {
- switch (target_arch.GetMachine()) {
- case llvm::Triple::aarch64:
- return static_cast<uint32_t>(sizeof(g_register_infos_arm64_le) /
- sizeof(g_register_infos_arm64_le[0]));
- default:
- assert(false && "Unhandled target architecture.");
- return 0;
- }
-}
-
-RegisterContextFreeBSD_arm64::RegisterContextFreeBSD_arm64(
- const lldb_private::ArchSpec &target_arch)
- : RegisterInfoInterface(target_arch),
- m_register_info_p(GetRegisterInfoPtr(target_arch)),
- m_register_info_count(GetRegisterInfoCount(target_arch)) {}
-
-size_t RegisterContextFreeBSD_arm64::GetGPRSize() const {
- return sizeof(struct RegisterContextFreeBSD_arm64::GPR);
-}
-
-const lldb_private::RegisterInfo *
-RegisterContextFreeBSD_arm64::GetRegisterInfo() const {
- return m_register_info_p;
-}
-
-uint32_t RegisterContextFreeBSD_arm64::GetRegisterCount() const {
- return m_register_info_count;
-}
+++ /dev/null
-//===-- RegisterContextFreeBSD_arm64.h --------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_RegisterContextFreeBSD_arm64_H_
-#define liblldb_RegisterContextFreeBSD_arm64_H_
-
-#include "RegisterInfoInterface.h"
-
-class RegisterContextFreeBSD_arm64
- : public lldb_private::RegisterInfoInterface {
-public:
- // based on RegisterContextDarwin_arm64.h
- struct GPR {
- uint64_t x[29]; // x0-x28
- uint64_t fp; // x29
- uint64_t lr; // x30
- uint64_t sp; // x31
- uint64_t pc; // pc
- uint32_t cpsr; // cpsr
- };
-
- // based on RegisterContextDarwin_arm64.h
- struct VReg {
- uint8_t bytes[16];
- };
-
- // based on RegisterContextDarwin_arm64.h
- struct FPU {
- VReg v[32];
- uint32_t fpsr;
- uint32_t fpcr;
- };
-
- // based on RegisterContextDarwin_arm64.h
- struct EXC {
- uint64_t far; // Virtual Fault Address
- uint32_t esr; // Exception syndrome
- uint32_t exception; // number of arm exception token
- };
-
- // based on RegisterContextDarwin_arm64.h
- struct DBG {
- uint64_t bvr[16];
- uint64_t bcr[16];
- uint64_t wvr[16];
- uint64_t wcr[16];
- uint64_t mdscr_el1;
- };
-
- RegisterContextFreeBSD_arm64(const lldb_private::ArchSpec &target_arch);
-
- size_t GetGPRSize() const override;
-
- const lldb_private::RegisterInfo *GetRegisterInfo() const override;
-
- uint32_t GetRegisterCount() const override;
-
-private:
- const lldb_private::RegisterInfo *m_register_info_p;
- uint32_t m_register_info_count;
-};
-
-#endif
-//===-- RegisterContextLinux_arm64.cpp -------------------------*- C++ -*-===//
+//===-- RegisterInfoPOSIX_arm64.cpp ----------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
#include "lldb/lldb-defines.h"
#include "llvm/Support/Compiler.h"
-#include "RegisterContextLinux_arm64.h"
+#include "RegisterInfoPOSIX_arm64.h"
// Based on RegisterContextDarwin_arm64.cpp
#define GPR_OFFSET(idx) ((idx)*8)
#define GPR_OFFSET_NAME(reg) \
- (LLVM_EXTENSION offsetof(RegisterContextLinux_arm64::GPR, reg))
+ (LLVM_EXTENSION offsetof(RegisterInfoPOSIX_arm64::GPR, reg))
-#define FPU_OFFSET(idx) ((idx)*16 + sizeof(RegisterContextLinux_arm64::GPR))
+#define FPU_OFFSET(idx) ((idx)*16 + sizeof(RegisterInfoPOSIX_arm64::GPR))
#define FPU_OFFSET_NAME(reg) \
- (LLVM_EXTENSION offsetof(RegisterContextLinux_arm64::FPU, reg) + \
- sizeof(RegisterContextLinux_arm64::GPR))
+ (LLVM_EXTENSION offsetof(RegisterInfoPOSIX_arm64::FPU, reg) + \
+ sizeof(RegisterInfoPOSIX_arm64::GPR))
#define EXC_OFFSET_NAME(reg) \
- (LLVM_EXTENSION offsetof(RegisterContextLinux_arm64::EXC, reg) + \
- sizeof(RegisterContextLinux_arm64::GPR) + \
- sizeof(RegisterContextLinux_arm64::FPU))
+ (LLVM_EXTENSION offsetof(RegisterInfoPOSIX_arm64::EXC, reg) + \
+ sizeof(RegisterInfoPOSIX_arm64::GPR) + \
+ sizeof(RegisterInfoPOSIX_arm64::FPU))
#define DBG_OFFSET_NAME(reg) \
- (LLVM_EXTENSION offsetof(RegisterContextLinux_arm64::DBG, reg) + \
- sizeof(RegisterContextLinux_arm64::GPR) + \
- sizeof(RegisterContextLinux_arm64::FPU) + \
- sizeof(RegisterContextLinux_arm64::EXC))
+ (LLVM_EXTENSION offsetof(RegisterInfoPOSIX_arm64::DBG, reg) + \
+ sizeof(RegisterInfoPOSIX_arm64::GPR) + \
+ sizeof(RegisterInfoPOSIX_arm64::FPU) + \
+ sizeof(RegisterInfoPOSIX_arm64::EXC))
#define DEFINE_DBG(reg, i) \
#reg, NULL, \
- sizeof(((RegisterContextLinux_arm64::DBG *) NULL)->reg[i]), \
+ sizeof(((RegisterInfoPOSIX_arm64::DBG *) NULL)->reg[i]), \
DBG_OFFSET_NAME(reg[i]), lldb::eEncodingUint, lldb::eFormatHex, \
{LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, \
LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, \
dbg_##reg##i }, \
NULL, NULL, NULL, 0
#define REG_CONTEXT_SIZE \
- (sizeof(RegisterContextLinux_arm64::GPR) + \
- sizeof(RegisterContextLinux_arm64::FPU) + \
- sizeof(RegisterContextLinux_arm64::EXC))
+ (sizeof(RegisterInfoPOSIX_arm64::GPR) + \
+ sizeof(RegisterInfoPOSIX_arm64::FPU) + \
+ sizeof(RegisterInfoPOSIX_arm64::EXC))
//-----------------------------------------------------------------------------
// Include RegisterInfos_arm64 to declare our g_register_infos_arm64 structure.
}
}
-RegisterContextLinux_arm64::RegisterContextLinux_arm64(
+RegisterInfoPOSIX_arm64::RegisterInfoPOSIX_arm64(
const lldb_private::ArchSpec &target_arch)
: lldb_private::RegisterInfoInterface(target_arch),
m_register_info_p(GetRegisterInfoPtr(target_arch)),
m_register_info_count(GetRegisterInfoCount(target_arch)) {}
-size_t RegisterContextLinux_arm64::GetGPRSize() const {
- return sizeof(struct RegisterContextLinux_arm64::GPR);
+size_t RegisterInfoPOSIX_arm64::GetGPRSize() const {
+ return sizeof(struct RegisterInfoPOSIX_arm64::GPR);
}
const lldb_private::RegisterInfo *
-RegisterContextLinux_arm64::GetRegisterInfo() const {
+RegisterInfoPOSIX_arm64::GetRegisterInfo() const {
return m_register_info_p;
}
-uint32_t RegisterContextLinux_arm64::GetRegisterCount() const {
+uint32_t RegisterInfoPOSIX_arm64::GetRegisterCount() const {
return m_register_info_count;
}
-//===-- RegisterContextLinux_arm64.h ----------------------------*- C++ -*-===//
+//===-- RegisterInfoPOSIX_arm64.h -------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
#include "lldb/Target/RegisterContext.h"
#include "lldb/lldb-private.h"
-class RegisterContextLinux_arm64 : public lldb_private::RegisterInfoInterface {
+class RegisterInfoPOSIX_arm64 : public lldb_private::RegisterInfoInterface {
public:
// based on RegisterContextDarwin_arm64.h
struct GPR {
uint64_t mdscr_el1;
};
- RegisterContextLinux_arm64(const lldb_private::ArchSpec &target_arch);
+ RegisterInfoPOSIX_arm64(const lldb_private::ArchSpec &target_arch);
size_t GetGPRSize() const override;
#include "lldb/Target/Unwind.h"
#include "Plugins/Process/Utility/RegisterContextFreeBSD_arm.h"
-#include "Plugins/Process/Utility/RegisterContextFreeBSD_arm64.h"
#include "Plugins/Process/Utility/RegisterContextFreeBSD_i386.h"
#include "Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h"
#include "Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h"
#include "Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.h"
#include "Plugins/Process/Utility/RegisterContextLinux_arm.h"
-#include "Plugins/Process/Utility/RegisterContextLinux_arm64.h"
#include "Plugins/Process/Utility/RegisterContextLinux_i386.h"
#include "Plugins/Process/Utility/RegisterContextLinux_s390x.h"
#include "Plugins/Process/Utility/RegisterContextLinux_x86_64.h"
+#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h"
#include "ProcessElfCore.h"
#include "RegisterContextPOSIXCore_arm.h"
#include "RegisterContextPOSIXCore_arm64.h"
case llvm::Triple::FreeBSD: {
switch (arch.GetMachine()) {
case llvm::Triple::aarch64:
- reg_interface = new RegisterContextFreeBSD_arm64(arch);
+ reg_interface = new RegisterInfoPOSIX_arm64(arch);
break;
case llvm::Triple::arm:
reg_interface = new RegisterContextFreeBSD_arm(arch);
reg_interface = new RegisterContextLinux_arm(arch);
break;
case llvm::Triple::aarch64:
- reg_interface = new RegisterContextLinux_arm64(arch);
+ reg_interface = new RegisterInfoPOSIX_arm64(arch);
break;
case llvm::Triple::systemz:
reg_interface = new RegisterContextLinux_s390x(arch);