40#include "elf/external.h"
41#include "elf/common.h"
44#include <sys/utsname.h>
45#include <asm/ptrace.h>
63#define TRAP_HWBKPT 0x0004
109 gdb::byte_vector &tags,
int type)
override;
113 const gdb::byte_vector &tags,
int type)
override;
144 iovec.iov_base = ®s;
146 iovec.iov_len = 18 * 4;
148 iovec.iov_len =
sizeof (regs);
152 perror_with_name (_(
"Unable to fetch general registers"));
181 iovec.iov_base = ®s;
183 iovec.iov_len = 18 * 4;
185 iovec.iov_len =
sizeof (regs);
189 perror_with_name (_(
"Unable to fetch general registers"));
204 perror_with_name (_(
"Unable to store general registers"));
224 iovec.iov_base = ®s;
232 perror_with_name (_(
"Unable to fetch VFP registers"));
240 iovec.iov_len =
sizeof (regs);
244 perror_with_name (_(
"Unable to fetch vFP/SIMD registers"));
270 iovec.iov_base = ®s;
278 perror_with_name (_(
"Unable to fetch VFP registers"));
286 iovec.iov_len =
sizeof (regs);
290 perror_with_name (_(
"Unable to fetch FP/SIMD registers"));
307 perror_with_name (_(
"Unable to store VFP registers"));
313 perror_with_name (_(
"Unable to store FP/SIMD registers"));
352 = gdbarch_tdep<aarch64_gdbarch_tdep> (
regcache->
arch ());
369 = gdbarch_tdep<aarch64_gdbarch_tdep> (
regcache->
arch ());
387 = gdbarch_tdep<aarch64_gdbarch_tdep> (
regcache->
arch ());
402 = gdbarch_tdep<aarch64_gdbarch_tdep> (
regcache->
arch ());
417 = gdbarch_tdep<aarch64_gdbarch_tdep> (
regcache->
arch ());
420 uint64_t pauth_regset[2] = {0, 0};
423 iovec.iov_base = &pauth_regset;
424 iovec.iov_len =
sizeof (pauth_regset);
428 perror_with_name (_(
"unable to fetch pauth registers"));
443 = gdbarch_tdep<aarch64_gdbarch_tdep> (
regcache->
arch ());
446 gdb_assert (regno != -1);
448 uint64_t tag_ctl = 0;
451 iovec.iov_base = &tag_ctl;
452 iovec.iov_len =
sizeof (tag_ctl);
456 perror_with_name (_(
"unable to fetch MTE registers"));
468 = gdbarch_tdep<aarch64_gdbarch_tdep> (
regcache->
arch ());
471 gdb_assert (regno != -1);
473 uint64_t tag_ctl = 0;
482 iovec.iov_base = &tag_ctl;
483 iovec.iov_len =
sizeof (tag_ctl);
487 perror_with_name (_(
"unable to store MTE registers"));
497 = gdbarch_tdep<aarch64_gdbarch_tdep> (
regcache->
arch ());
500 gdb_assert (regno != -1);
504 memset(tpidrs, 0,
sizeof(tpidrs));
507 iovec.iov_base = tpidrs;
508 iovec.iov_len =
sizeof (tpidrs);
512 perror_with_name (_(
"unable to fetch TLS registers"));
525 = gdbarch_tdep<aarch64_gdbarch_tdep> (
regcache->
arch ());
528 gdb_assert (regno != -1);
532 memset(tpidrs, 0,
sizeof(tpidrs));
543 iovec.iov_base = &tpidrs;
544 iovec.iov_len =
sizeof (tpidrs);
548 perror_with_name (_(
"unable to store TLS register"));
558 = gdbarch_tdep<aarch64_gdbarch_tdep> (
regcache->
arch ());
604 && regno < tdep->sme_reg_base + 3)
640 && (regno < ARM_D0_REGNUM + tdep->vfp_register_count
664 = gdbarch_tdep<aarch64_gdbarch_tdep> (
regcache->
arch ());
702 && regno < tdep->sme_reg_base + 3)
739 && (regno < ARM_D0_REGNUM + tdep->vfp_register_count
765 regno, (gdb_byte *) gregsetp,
776 (
const gdb_byte *) gregsetp,
789 regno, (gdb_byte *) fpregsetp,
800 (
const gdb_byte *) fpregsetp,
825 parent_pid = parent->
ptid.pid ();
828 *child_state = *parent_state;
837 lwpid_t lwpid,
int idx,
void **base)
885 iovec.iov_base = regbuf;
954 if (siginfo.si_signo != SIGTRAP
962 const CORE_ADDR addr_trap
1003 gdb_assert (
inf != NULL);
1009 return inf->gdbarch;
1014 = gdbarch_tdep<aarch64_gdbarch_tdep> (
inf->gdbarch);
1017 if (vq == tdep->
vq && svq == tdep->
sme_svq)
1018 return inf->gdbarch;
1034 info.bfd_arch_info = bfd_lookup_arch (bfd_arch_aarch64, bfd_mach_aarch64);
1051 gdb::byte_vector &tags,
int type)
1066 const gdb::byte_vector &tags,
int type)
void aarch32_gp_regcache_collect(const struct regcache *regcache, uint32_t *regs, int arm_apcs_32)
void aarch32_gp_regcache_supply(struct regcache *regcache, uint32_t *regs, int arm_apcs_32)
void aarch32_vfp_regcache_collect(const struct regcache *regcache, gdb_byte *regs, const int vfp_register_count)
void aarch32_vfp_regcache_supply(struct regcache *regcache, gdb_byte *regs, const int vfp_register_count)
const target_desc * aarch32_read_description()
void aarch64_linux_get_debug_reg_capacity(int tid)
static void aarch64_fetch_registers(struct regcache *regcache, int regno)
static void fetch_sveregs_from_thread(struct regcache *regcache)
static void fetch_mteregs_from_thread(struct regcache *regcache)
void _initialize_aarch64_linux_nat()
static void fetch_zt_from_thread(struct regcache *regcache)
void supply_gregset(struct regcache *regcache, const gdb_gregset_t *gregsetp)
void fill_gregset(const struct regcache *regcache, gdb_gregset_t *gregsetp, int regno)
static void aarch32_store_registers(struct regcache *regcache, int regno)
static void fetch_za_from_thread(struct regcache *regcache)
static void store_gregs_to_thread(const struct regcache *regcache)
static void store_zt_to_thread(struct regcache *regcache)
static void store_fpregs_to_thread(const struct regcache *regcache)
static aarch64_linux_nat_target the_aarch64_linux_nat_target
void supply_fpregset(struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
ps_err_e ps_get_thread_area(struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base)
static void store_za_to_thread(struct regcache *regcache)
static void fetch_tlsregs_from_thread(struct regcache *regcache)
static void store_mteregs_to_thread(struct regcache *regcache)
static void store_sveregs_to_thread(struct regcache *regcache)
static void fetch_fpregs_from_thread(struct regcache *regcache)
static void fetch_pauth_masks_from_thread(struct regcache *regcache)
static void aarch64_store_registers(struct regcache *regcache, int regno)
static void store_tlsregs_to_thread(struct regcache *regcache)
static void fetch_gregs_from_thread(struct regcache *regcache)
void fill_fpregset(const struct regcache *regcache, gdb_fpregset_t *fpregsetp, int regno)
static void aarch32_fetch_registers(struct regcache *regcache, int regno)
const struct regset aarch64_linux_fpregset
const struct regset aarch64_linux_gregset
#define AARCH64_LINUX_SIZEOF_GREGSET
#define AARCH64_HWCAP_PACA
#define AARCH64_LINUX_SIZEOF_FPREGSET
ps_err_e aarch64_ps_get_thread_area(struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base, int is_64bit_p)
void aarch64_linux_prepare_to_resume(struct lwp_info *lwp)
void aarch64_linux_new_thread(struct lwp_info *lwp)
void aarch64_compat_siginfo_from_siginfo(compat_siginfo_t *to, siginfo_t *from)
void aarch64_siginfo_from_compat_siginfo(siginfo_t *to, compat_siginfo_t *from)
int aarch64_tls_register_count(int tid)
void aarch64_linux_delete_thread(struct arch_lwp_info *arch_lwp)
bool aarch64_mte_store_memtags(int tid, CORE_ADDR address, size_t len, const gdb::byte_vector &tags)
bool aarch64_mte_fetch_memtags(int tid, CORE_ADDR address, size_t len, gdb::byte_vector &tags)
void aarch64_initialize_hw_point()
struct aarch64_debug_reg_state * aarch64_get_debug_reg_state(pid_t pid)
bool aarch64_stopped_data_address(const struct aarch64_debug_reg_state *state, CORE_ADDR addr_trap, CORE_ADDR *addr_p)
void aarch64_remove_debug_reg_state(pid_t pid)
bool supports_zt_registers(int tid)
void aarch64_sve_regs_copy_from_reg_buf(int tid, struct reg_buffer_common *reg_buf)
void aarch64_za_regs_copy_from_reg_buf(int tid, struct reg_buffer_common *reg_buf, int za_regnum, int svg_regnum, int svcr_regnum)
uint64_t aarch64_za_get_svq(int tid)
void aarch64_zt_regs_copy_from_reg_buf(int tid, struct reg_buffer_common *reg_buf, int zt_regnum)
void aarch64_za_regs_copy_to_reg_buf(int tid, struct reg_buffer_common *reg_buf, int za_regnum, int svg_regnum, int svcr_regnum)
void aarch64_sve_regs_copy_to_reg_buf(int tid, struct reg_buffer_common *reg_buf)
uint64_t aarch64_sve_get_vq(int tid)
void aarch64_zt_regs_copy_to_reg_buf(int tid, struct reg_buffer_common *reg_buf, int zt_regnum)
aarch64_features aarch64_features_from_target_desc(const struct target_desc *tdesc)
const target_desc * aarch64_read_description(const aarch64_features &features)
#define AARCH64_PAUTH_CMASK_REGNUM(pauth_reg_base)
#define AARCH64_PAUTH_DMASK_REGNUM(pauth_reg_base)
gdb_static_assert(sizeof(splay_tree_key) >=sizeof(CORE_ADDR *))
struct gdbarch * target_gdbarch(void)
struct gdbarch * gdbarch_find_by_info(struct gdbarch_info info)
#define ARM_VFP3_REGS_SIZE
bool supports_memory_tagging() override
bool low_siginfo_fixup(siginfo_t *ptrace, gdb_byte *inf, int direction) override
void low_new_thread(struct lwp_info *lp) override
void post_startup_inferior(ptid_t) override
void low_forget_process(pid_t pid) override
int can_do_single_step() override
const struct target_desc * read_description() override
bool stopped_data_address(CORE_ADDR *) override
void low_new_fork(struct lwp_info *parent, pid_t child_pid) override
void low_delete_thread(struct arch_lwp_info *lp) override
void fetch_registers(struct regcache *, int) override
bool stopped_by_watchpoint() override
void store_registers(struct regcache *, int) override
void low_prepare_to_resume(struct lwp_info *lp) override
void post_attach(int pid) override
struct gdbarch * thread_architecture(ptid_t) override
bool store_memtags(CORE_ADDR address, size_t len, const gdb::byte_vector &tags, int type) override
bool fetch_memtags(CORE_ADDR address, size_t len, gdb::byte_vector &tags, int type) override
const target_info & info() const override
void post_startup_inferior(ptid_t) override
void post_attach(int) override
void raw_collect(int regnum, void *buf) const override
void raw_supply(int regnum, const void *buf) override
enum register_status get_register_status(int regnum) const override
struct gdbarch * get_frame_arch(frame_info_ptr this_frame)
frame_info_ptr get_current_frame(void)
#define ptrace(request, pid, addr, data)
const struct target_desc * gdbarch_target_desc(struct gdbarch *gdbarch)
CORE_ADDR gdbarch_remove_non_address_bits(struct gdbarch *gdbarch, CORE_ADDR pointer)
const struct bfd_arch_info * gdbarch_bfd_arch_info(struct gdbarch *gdbarch)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int int rusage_t pid_t pid
GDB_FPREGSET_T gdb_fpregset_t
GDB_GREGSET_T gdb_gregset_t
void add_inf_child_target(inf_child_target *target)
pid_t get_ptrace_pid(ptid_t ptid)
struct inferior * find_inferior_ptid(process_stratum_target *targ, ptid_t ptid)
bool linux_nat_get_siginfo(ptid_t ptid, siginfo_t *siginfo)
struct linux_nat_target * linux_target
CORE_ADDR linux_get_hwcap2()
CORE_ADDR linux_get_hwcap()
void regcache_collect_regset(const struct regset *regset, const struct regcache *regcache, int regnum, void *buf, size_t size)
void regcache_supply_regset(const struct regset *regset, struct regcache *regcache, int regnum, const void *buf, size_t size)
struct arch_lwp_info * arch_private
target_ops * beneath() const
virtual const struct target_desc * read_description() TARGET_DEFAULT_RETURN(NULL)