mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
Read the tpidr register from NT_ARM_TLS core dump notes on FreeBSD/Aarch64.
This commit is contained in:
@ -142,10 +142,42 @@ aarch64_fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
|||||||
void *cb_data,
|
void *cb_data,
|
||||||
const struct regcache *regcache)
|
const struct regcache *regcache)
|
||||||
{
|
{
|
||||||
|
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||||
|
|
||||||
cb (".reg", AARCH64_FBSD_SIZEOF_GREGSET, AARCH64_FBSD_SIZEOF_GREGSET,
|
cb (".reg", AARCH64_FBSD_SIZEOF_GREGSET, AARCH64_FBSD_SIZEOF_GREGSET,
|
||||||
&aarch64_fbsd_gregset, NULL, cb_data);
|
&aarch64_fbsd_gregset, NULL, cb_data);
|
||||||
cb (".reg2", AARCH64_FBSD_SIZEOF_FPREGSET, AARCH64_FBSD_SIZEOF_FPREGSET,
|
cb (".reg2", AARCH64_FBSD_SIZEOF_FPREGSET, AARCH64_FBSD_SIZEOF_FPREGSET,
|
||||||
&aarch64_fbsd_fpregset, NULL, cb_data);
|
&aarch64_fbsd_fpregset, NULL, cb_data);
|
||||||
|
|
||||||
|
if (tdep->has_tls ())
|
||||||
|
{
|
||||||
|
const struct regcache_map_entry aarch64_fbsd_tls_regmap[] =
|
||||||
|
{
|
||||||
|
{ 1, tdep->tls_regnum, 8 },
|
||||||
|
{ 0 }
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct regset aarch64_fbsd_tls_regset =
|
||||||
|
{
|
||||||
|
aarch64_fbsd_tls_regmap,
|
||||||
|
regcache_supply_regset, regcache_collect_regset
|
||||||
|
};
|
||||||
|
|
||||||
|
cb (".reg-aarch-tls", AARCH64_FBSD_SIZEOF_TLSREGSET,
|
||||||
|
AARCH64_FBSD_SIZEOF_TLSREGSET, &aarch64_fbsd_tls_regset,
|
||||||
|
"TLS register", cb_data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Implement the "core_read_description" gdbarch method. */
|
||||||
|
|
||||||
|
static const struct target_desc *
|
||||||
|
aarch64_fbsd_core_read_description (struct gdbarch *gdbarch,
|
||||||
|
struct target_ops *target, bfd *abfd)
|
||||||
|
{
|
||||||
|
asection *tls = bfd_get_section_by_name (abfd, ".reg-aarch-tls");
|
||||||
|
|
||||||
|
return aarch64_read_description (0, false, false, tls != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Implement the 'init_osabi' method of struct gdb_osabi_handler. */
|
/* Implement the 'init_osabi' method of struct gdb_osabi_handler. */
|
||||||
@ -168,6 +200,8 @@ aarch64_fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
|||||||
|
|
||||||
set_gdbarch_iterate_over_regset_sections
|
set_gdbarch_iterate_over_regset_sections
|
||||||
(gdbarch, aarch64_fbsd_iterate_over_regset_sections);
|
(gdbarch, aarch64_fbsd_iterate_over_regset_sections);
|
||||||
|
set_gdbarch_core_read_description (gdbarch,
|
||||||
|
aarch64_fbsd_core_read_description);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _initialize_aarch64_fbsd_tdep ();
|
void _initialize_aarch64_fbsd_tdep ();
|
||||||
|
@ -32,6 +32,9 @@
|
|||||||
alignment. */
|
alignment. */
|
||||||
#define AARCH64_FBSD_SIZEOF_FPREGSET (33 * V_REGISTER_SIZE)
|
#define AARCH64_FBSD_SIZEOF_FPREGSET (33 * V_REGISTER_SIZE)
|
||||||
|
|
||||||
|
/* The TLS regset consists of a single register. */
|
||||||
|
#define AARCH64_FBSD_SIZEOF_TLSREGSET (X_REGISTER_SIZE)
|
||||||
|
|
||||||
extern const struct regset aarch64_fbsd_gregset;
|
extern const struct regset aarch64_fbsd_gregset;
|
||||||
extern const struct regset aarch64_fbsd_fpregset;
|
extern const struct regset aarch64_fbsd_fpregset;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user