#include "elf/common.h"
#include "ax.h"
#include "tracepoint.h"
+#include "debug.h"
#include <signal.h>
#include <sys/user.h>
#include "gdb_proc_service.h"
#include "arch/aarch64.h"
+#include "linux-aarch32-tdesc.h"
#include "linux-aarch64-tdesc.h"
#include "nat/aarch64-sve-linux-ptrace.h"
#include "tdesc.h"
&pauth_regset[1]);
}
-/* Enable miscellaneous debugging output. The name is historical - it
- was originally used to debug LinuxThreads support. */
-extern int debug_threads;
-
/* Implementation of linux_target_ops method "get_pc". */
static CORE_ADDR
/* Matches HWCAP_PACA in kernel header arch/arm64/include/uapi/asm/hwcap.h. */
#define AARCH64_HWCAP_PACA (1 << 30)
-/* Fetch the AT_HWCAP entry from the auxv vector. */
-
-static bool
-aarch64_get_hwcap (unsigned long *valp)
-{
- unsigned char *data = (unsigned char *) alloca (16);
- int offset = 0;
-
- while ((*the_target->read_auxv) (offset, data, 16) == 16)
- {
- unsigned long *data_p = (unsigned long *)data;
- if (data_p[0] == AT_HWCAP)
- {
- *valp = data_p[1];
- return true;
- }
-
- offset += 16;
- }
-
- *valp = 0;
- return false;
-}
-
/* Implementation of linux_target_ops method "arch_setup". */
static void
if (is_elf64)
{
uint64_t vq = aarch64_sve_get_vq (tid);
- unsigned long hwcap = 0;
- bool pauth_p = aarch64_get_hwcap (&hwcap) && (hwcap & AARCH64_HWCAP_PACA);
+ unsigned long hwcap = linux_get_hwcap (8);
+ bool pauth_p = hwcap & AARCH64_HWCAP_PACA;
current_process ()->tdesc = aarch64_linux_read_description (vq, pauth_p);
}
else
- current_process ()->tdesc = tdesc_arm_with_neon;
+ current_process ()->tdesc = aarch32_linux_read_description ();
aarch64_linux_get_debug_reg_capacity (lwpid_of (current_thread));
}
for (i = 0; i < len; i++)
le_buf[i] = htole32 (buf[i]);
- write_inferior_memory (*to, (const unsigned char *) le_buf, byte_len);
+ target_write_memory (*to, (const unsigned char *) le_buf, byte_len);
xfree (le_buf);
#else
- write_inferior_memory (*to, (const unsigned char *) buf, byte_len);
+ target_write_memory (*to, (const unsigned char *) buf, byte_len);
#endif
*to += byte_len;
initialize_regsets_info (&aarch64_regsets_info);
initialize_regsets_info (&aarch64_sve_regsets_info);
-
-#if GDB_SELF_TEST
- initialize_low_tdesc ();
-#endif
}