40#include "elf/external.h"
41#include "elf/common.h"
44#include <sys/utsname.h>
45#include <asm/ptrace.h>
60#define TRAP_HWBKPT 0x0004
106 gdb::byte_vector &tags,
int type)
override;
110 const gdb::byte_vector &tags,
int type)
override;
141 iovec.iov_base = ®s;
143 iovec.iov_len = 18 * 4;
145 iovec.iov_len =
sizeof (regs);
178 iovec.iov_base = ®s;
180 iovec.iov_len = 18 * 4;
182 iovec.iov_len =
sizeof (regs);
221 iovec.iov_base = ®s;
237 iovec.iov_len =
sizeof (regs);
267 iovec.iov_base = ®s;
283 iovec.iov_len =
sizeof (regs);
320 std::unique_ptr<gdb_byte[]> base
347 iovec.iov_base = base.get ();
362 = gdbarch_tdep<aarch64_gdbarch_tdep> (
regcache->
arch ());
365 uint64_t pauth_regset[2] = {0, 0};
368 iovec.iov_base = &pauth_regset;
369 iovec.iov_len =
sizeof (pauth_regset);
388 = gdbarch_tdep<aarch64_gdbarch_tdep> (
regcache->
arch ());
391 gdb_assert (regno != -1);
393 uint64_t tag_ctl = 0;
396 iovec.iov_base = &tag_ctl;
397 iovec.iov_len =
sizeof (tag_ctl);
413 = gdbarch_tdep<aarch64_gdbarch_tdep> (
regcache->
arch ());
416 gdb_assert (regno != -1);
418 uint64_t tag_ctl = 0;
427 iovec.iov_base = &tag_ctl;
428 iovec.iov_len =
sizeof (tag_ctl);
442 = gdbarch_tdep<aarch64_gdbarch_tdep> (
regcache->
arch ());
445 gdb_assert (regno != -1);
450 iovec.iov_base = tpidrs;
451 iovec.iov_len =
sizeof (tpidrs);
468 = gdbarch_tdep<aarch64_gdbarch_tdep> (
regcache->
arch ());
471 gdb_assert (regno != -1);
485 iovec.iov_base = &tpidrs;
486 iovec.iov_len =
sizeof (tpidrs);
500 = gdbarch_tdep<aarch64_gdbarch_tdep> (
regcache->
arch ());
564 && (regno < ARM_D0_REGNUM + tdep->vfp_register_count
588 = gdbarch_tdep<aarch64_gdbarch_tdep> (
regcache->
arch ());
642 && (regno < ARM_D0_REGNUM + tdep->vfp_register_count
668 regno, (gdb_byte *) gregsetp,
679 (
const gdb_byte *) gregsetp,
692 regno, (gdb_byte *) fpregsetp,
703 (
const gdb_byte *) fpregsetp,
728 parent_pid = parent->
ptid.pid ();
731 *child_state = *parent_state;
740 lwpid_t lwpid,
int idx,
void **base)
785 iovec.iov_base = regbuf;
845 if (siginfo.si_signo != SIGTRAP
853 const CORE_ADDR addr_trap
894 gdb_assert (
inf != NULL);
904 = gdbarch_tdep<aarch64_gdbarch_tdep> (
inf->gdbarch);
919 info.bfd_arch_info = bfd_lookup_arch (bfd_arch_aarch64, bfd_mach_aarch64);
936 gdb::byte_vector &tags,
int type)
941 if (
type ==
static_cast<int> (aarch64_memtag_type::mte_allocation))
951 const gdb::byte_vector &tags,
int type)
956 if (
type ==
static_cast<int> (aarch64_memtag_type::mte_allocation))
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()
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 store_gregs_to_thread(const 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 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)
void aarch64_sve_regs_copy_to_reg_buf(struct reg_buffer_common *reg_buf, const void *buf)
std::unique_ptr< gdb_byte[]> aarch64_sve_get_sveregs(int tid)
void aarch64_sve_regs_copy_from_reg_buf(const struct reg_buffer_common *reg_buf, void *buf)
uint64_t aarch64_sve_get_vq(int tid)
bool aarch64_sve_set_vq(int tid, uint64_t vq)
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
void perror_with_name(const char *string)