forked from Imagelibrary/binutils-gdb
Compare commits
15 Commits
users/vrie
...
users/palv
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37c2487312 | ||
|
|
6577f365eb | ||
|
|
4686f81068 | ||
|
|
b5375c5da9 | ||
|
|
13391ff8bc | ||
|
|
c07ec968f7 | ||
|
|
0a24685343 | ||
|
|
8f29211c3f | ||
|
|
c44885db3b | ||
|
|
11da1b13b3 | ||
|
|
08106042d9 | ||
|
|
602707187f | ||
|
|
52abb4de08 | ||
|
|
6dff2a6ffe | ||
|
|
d65edaa0bc |
@@ -2460,6 +2460,11 @@ elf_i386_relocate_section (bfd *output_bfd,
|
||||
goto do_relocation;
|
||||
|
||||
case R_386_GOTOFF:
|
||||
/* NB: We can't use the PLT entry as the function address
|
||||
for PIC since the PIC register may not be set up
|
||||
properly for indirect call. */
|
||||
if (bfd_link_pic (info))
|
||||
goto bad_ifunc_reloc;
|
||||
relocation -= (gotplt->output_section->vma
|
||||
+ gotplt->output_offset);
|
||||
goto do_relocation;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
In releases, the date is not included in either version strings or
|
||||
sonames. */
|
||||
#define BFD_VERSION_DATE 20220721
|
||||
#define BFD_VERSION_DATE 20220722
|
||||
#define BFD_VERSION @bfd_version@
|
||||
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
|
||||
#define REPORT_BUGS_TO @report_bugs_to@
|
||||
|
||||
@@ -47,10 +47,6 @@
|
||||
/* Is the prototype for getopt in <unistd.h> in the expected format? */
|
||||
#undef HAVE_DECL_GETOPT
|
||||
|
||||
/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_SBRK
|
||||
|
||||
/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_STPCPY
|
||||
@@ -107,9 +103,6 @@
|
||||
/* Define to 1 if msgpack is available. */
|
||||
#undef HAVE_MSGPACK
|
||||
|
||||
/* Define to 1 if you have the `sbrk' function. */
|
||||
#undef HAVE_SBRK
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
|
||||
12
binutils/configure
vendored
12
binutils/configure
vendored
@@ -13352,7 +13352,7 @@ $as_echo "#define HAVE_MMAP 1" >>confdefs.h
|
||||
fi
|
||||
rm -f conftest.mmap conftest.txt
|
||||
|
||||
for ac_func in getc_unlocked mkdtemp mkstemp sbrk utimensat utimes
|
||||
for ac_func in getc_unlocked mkdtemp mkstemp utimensat utimes
|
||||
do :
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||
@@ -13678,16 +13678,6 @@ fi
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
|
||||
_ACEOF
|
||||
ac_fn_c_check_decl "$LINENO" "sbrk" "ac_cv_have_decl_sbrk" "$ac_includes_default"
|
||||
if test "x$ac_cv_have_decl_sbrk" = xyes; then :
|
||||
ac_have_decl=1
|
||||
else
|
||||
ac_have_decl=0
|
||||
fi
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_SBRK $ac_have_decl
|
||||
_ACEOF
|
||||
ac_fn_c_check_decl "$LINENO" "stpcpy" "ac_cv_have_decl_stpcpy" "$ac_includes_default"
|
||||
if test "x$ac_cv_have_decl_stpcpy" = xyes; then :
|
||||
ac_have_decl=1
|
||||
|
||||
@@ -186,7 +186,7 @@ AC_CHECK_HEADERS(fcntl.h inttypes.h stdint.h sys/file.h \
|
||||
sys/stat.h sys/time.h sys/types.h unistd.h)
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_FUNC_MMAP
|
||||
AC_CHECK_FUNCS(getc_unlocked mkdtemp mkstemp sbrk utimensat utimes)
|
||||
AC_CHECK_FUNCS(getc_unlocked mkdtemp mkstemp utimensat utimes)
|
||||
|
||||
AC_MSG_CHECKING([for mbstate_t])
|
||||
AC_TRY_COMPILE([#include <wchar.h>],
|
||||
@@ -266,7 +266,7 @@ if test $bu_cv_header_utime_h = yes; then
|
||||
AC_DEFINE(HAVE_GOOD_UTIME_H, 1, [Does <utime.h> define struct utimbuf?])
|
||||
fi
|
||||
|
||||
AC_CHECK_DECLS([asprintf, environ, getc_unlocked, sbrk, stpcpy, strnlen])
|
||||
AC_CHECK_DECLS([asprintf, environ, getc_unlocked, stpcpy, strnlen])
|
||||
|
||||
# Link in zlib if we can. This allows us to read compressed debug
|
||||
# sections. This is used only by readelf.c (objdump uses bfd for
|
||||
|
||||
@@ -58,12 +58,6 @@
|
||||
extern char *stpcpy (char *, const char *);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SBRK
|
||||
#if !HAVE_DECL_SBRK
|
||||
extern char *sbrk ();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !HAVE_DECL_ENVIRON
|
||||
extern char **environ;
|
||||
#endif
|
||||
|
||||
@@ -641,7 +641,12 @@ proc copy_setup { } {
|
||||
global test_prog
|
||||
global host_triplet
|
||||
|
||||
set res [build_wrapper testglue.o]
|
||||
if {[target_info exists needs_status_wrapper] && \
|
||||
[target_info needs_status_wrapper] != "0"} {
|
||||
set res [build_wrapper testglue.o]
|
||||
} else {
|
||||
set res ""
|
||||
}
|
||||
set flags { debug }
|
||||
|
||||
if { [istarget *-*-uclinux*] && ![istarget tic6x-*-*] && ![istarget arm*-*-uclinuxfdpiceabi] } {
|
||||
|
||||
@@ -90,7 +90,7 @@ aarch64_fbsd_nat_target::fetch_registers (struct regcache *regcache,
|
||||
&aarch64_fbsd_fpregset);
|
||||
|
||||
gdbarch *gdbarch = regcache->arch ();
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
if (tdep->has_tls ())
|
||||
{
|
||||
const struct regcache_map_entry aarch64_fbsd_tls_regmap[] =
|
||||
@@ -123,7 +123,7 @@ aarch64_fbsd_nat_target::store_registers (struct regcache *regcache,
|
||||
PT_SETFPREGS, &aarch64_fbsd_fpregset);
|
||||
|
||||
gdbarch *gdbarch = regcache->arch ();
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
if (tdep->has_tls ())
|
||||
{
|
||||
const struct regcache_map_entry aarch64_fbsd_tls_regmap[] =
|
||||
|
||||
@@ -143,7 +143,7 @@ aarch64_fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||
void *cb_data,
|
||||
const struct regcache *regcache)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
cb (".reg", AARCH64_FBSD_SIZEOF_GREGSET, AARCH64_FBSD_SIZEOF_GREGSET,
|
||||
&aarch64_fbsd_gregset, NULL, cb_data);
|
||||
@@ -190,7 +190,7 @@ static CORE_ADDR
|
||||
aarch64_fbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
|
||||
CORE_ADDR lm_addr, CORE_ADDR offset)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
struct regcache *regcache;
|
||||
|
||||
regcache = get_thread_arch_regcache (current_inferior ()->process_target (),
|
||||
@@ -213,7 +213,7 @@ aarch64_fbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
|
||||
static void
|
||||
aarch64_fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Generic FreeBSD support. */
|
||||
fbsd_init_abi (info, gdbarch);
|
||||
|
||||
@@ -359,7 +359,7 @@ static void
|
||||
fetch_pauth_masks_from_thread (struct regcache *regcache)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep
|
||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
||||
= gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
|
||||
int ret;
|
||||
struct iovec iovec;
|
||||
uint64_t pauth_regset[2] = {0, 0};
|
||||
@@ -385,7 +385,7 @@ static void
|
||||
fetch_mteregs_from_thread (struct regcache *regcache)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep
|
||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
||||
= gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
|
||||
int regno = tdep->mte_reg_base;
|
||||
|
||||
gdb_assert (regno != -1);
|
||||
@@ -410,7 +410,7 @@ static void
|
||||
store_mteregs_to_thread (struct regcache *regcache)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep
|
||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
||||
= gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
|
||||
int regno = tdep->mte_reg_base;
|
||||
|
||||
gdb_assert (regno != -1);
|
||||
@@ -439,7 +439,7 @@ static void
|
||||
fetch_tlsregs_from_thread (struct regcache *regcache)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep
|
||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
||||
= gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
|
||||
int regno = tdep->tls_regnum;
|
||||
|
||||
gdb_assert (regno != -1);
|
||||
@@ -464,7 +464,7 @@ static void
|
||||
store_tlsregs_to_thread (struct regcache *regcache)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep
|
||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
||||
= gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
|
||||
int regno = tdep->tls_regnum;
|
||||
|
||||
gdb_assert (regno != -1);
|
||||
@@ -493,7 +493,7 @@ static void
|
||||
aarch64_fetch_registers (struct regcache *regcache, int regno)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep
|
||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
||||
= gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
|
||||
|
||||
if (regno == -1)
|
||||
{
|
||||
@@ -543,7 +543,7 @@ static void
|
||||
aarch32_fetch_registers (struct regcache *regcache, int regno)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep
|
||||
= (arm_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
||||
= gdbarch_tdep<arm_gdbarch_tdep> (regcache->arch ());
|
||||
|
||||
if (regno == -1)
|
||||
{
|
||||
@@ -579,7 +579,7 @@ static void
|
||||
aarch64_store_registers (struct regcache *regcache, int regno)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep
|
||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
||||
= gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
|
||||
|
||||
if (regno == -1)
|
||||
{
|
||||
@@ -619,7 +619,7 @@ static void
|
||||
aarch32_store_registers (struct regcache *regcache, int regno)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep
|
||||
= (arm_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
||||
= gdbarch_tdep<arm_gdbarch_tdep> (regcache->arch ());
|
||||
|
||||
if (regno == -1)
|
||||
{
|
||||
@@ -893,7 +893,7 @@ aarch64_linux_nat_target::thread_architecture (ptid_t ptid)
|
||||
|
||||
/* Only return it if the current vector length matches the one in the tdep. */
|
||||
aarch64_gdbarch_tdep *tdep
|
||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (inf->gdbarch);
|
||||
= gdbarch_tdep<aarch64_gdbarch_tdep> (inf->gdbarch);
|
||||
uint64_t vq = aarch64_sve_get_vq (ptid.lwp ());
|
||||
if (vq == tdep->vq)
|
||||
return inf->gdbarch;
|
||||
|
||||
@@ -289,7 +289,7 @@ aarch64_linux_sigframe_init (const struct tramp_frame *self,
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
CORE_ADDR sp = get_frame_register_unsigned (this_frame, AARCH64_SP_REGNUM);
|
||||
CORE_ADDR sigcontext_addr = (sp + AARCH64_RT_SIGFRAME_UCONTEXT_OFFSET
|
||||
+ AARCH64_UCONTEXT_SIGCONTEXT_OFFSET );
|
||||
@@ -643,7 +643,7 @@ aarch64_linux_collect_sve_regset (const struct regset *regset,
|
||||
gdb_byte *header = (gdb_byte *) buf;
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
uint64_t vq = tdep->vq;
|
||||
|
||||
gdb_assert (buf != NULL);
|
||||
@@ -679,7 +679,7 @@ aarch64_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||
void *cb_data,
|
||||
const struct regcache *regcache)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
cb (".reg", AARCH64_LINUX_SIZEOF_GREGSET, AARCH64_LINUX_SIZEOF_GREGSET,
|
||||
&aarch64_linux_gregset, NULL, cb_data);
|
||||
@@ -1748,7 +1748,7 @@ aarch64_linux_report_signal_info (struct gdbarch *gdbarch,
|
||||
struct ui_out *uiout,
|
||||
enum gdb_signal siggnal)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (!tdep->has_mte () || siggnal != GDB_SIGNAL_SEGV)
|
||||
return;
|
||||
@@ -1970,7 +1970,7 @@ aarch64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
NULL };
|
||||
static const char *const stap_register_indirection_suffixes[] = { "]",
|
||||
NULL };
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
tdep->lowest_pc = 0x8000;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
static void
|
||||
aarch64_newlib_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Jump buffer - support for longjmp.
|
||||
Offset of original PC in jump buffer (in registers). */
|
||||
|
||||
@@ -502,7 +502,7 @@ aarch64_analyze_prologue (struct gdbarch *gdbarch,
|
||||
else if (inst.opcode->iclass == ic_system)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep
|
||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
= gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
int ra_state_val = 0;
|
||||
|
||||
if (insn == 0xd503233f /* paciasp. */
|
||||
@@ -640,7 +640,7 @@ aarch64_analyze_prologue_test (void)
|
||||
struct aarch64_prologue_cache cache;
|
||||
cache.saved_regs = trad_frame_alloc_saved_regs (gdbarch);
|
||||
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Test the simple prologue in which frame pointer is used. */
|
||||
{
|
||||
@@ -1076,7 +1076,7 @@ aarch64_prologue_frame_unwind_stop_reason (struct frame_info *this_frame,
|
||||
|
||||
/* Halt the backtrace at "_start". */
|
||||
gdbarch *arch = get_frame_arch (this_frame);
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (arch);
|
||||
if (cache->prev_pc <= tdep->lowest_pc)
|
||||
return UNWIND_OUTERMOST;
|
||||
|
||||
@@ -1120,7 +1120,7 @@ aarch64_prologue_prev_register (struct frame_info *this_frame,
|
||||
CORE_ADDR lr;
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
aarch64_gdbarch_tdep *tdep
|
||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
= gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
lr = frame_unwind_register_unsigned (this_frame, AARCH64_LR_REGNUM);
|
||||
|
||||
@@ -1289,7 +1289,7 @@ aarch64_dwarf2_prev_register (struct frame_info *this_frame,
|
||||
void **this_cache, int regnum)
|
||||
{
|
||||
gdbarch *arch = get_frame_arch (this_frame);
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (arch);
|
||||
CORE_ADDR lr;
|
||||
|
||||
switch (regnum)
|
||||
@@ -1315,7 +1315,7 @@ aarch64_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
|
||||
struct dwarf2_frame_state_reg *reg,
|
||||
struct frame_info *this_frame)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
switch (regnum)
|
||||
{
|
||||
@@ -1355,7 +1355,7 @@ static bool
|
||||
aarch64_execute_dwarf_cfa_vendor_op (struct gdbarch *gdbarch, gdb_byte op,
|
||||
struct dwarf2_frame_state *fs)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
struct dwarf2_frame_state_reg *ra_state;
|
||||
|
||||
if (op == DW_CFA_AARCH64_negate_ra_state)
|
||||
@@ -1996,7 +1996,7 @@ aarch64_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
|
||||
static struct type *
|
||||
aarch64_vnq_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->vnq_type == NULL)
|
||||
{
|
||||
@@ -2023,7 +2023,7 @@ aarch64_vnq_type (struct gdbarch *gdbarch)
|
||||
static struct type *
|
||||
aarch64_vnd_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->vnd_type == NULL)
|
||||
{
|
||||
@@ -2053,7 +2053,7 @@ aarch64_vnd_type (struct gdbarch *gdbarch)
|
||||
static struct type *
|
||||
aarch64_vns_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->vns_type == NULL)
|
||||
{
|
||||
@@ -2083,7 +2083,7 @@ aarch64_vns_type (struct gdbarch *gdbarch)
|
||||
static struct type *
|
||||
aarch64_vnh_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->vnh_type == NULL)
|
||||
{
|
||||
@@ -2116,7 +2116,7 @@ aarch64_vnh_type (struct gdbarch *gdbarch)
|
||||
static struct type *
|
||||
aarch64_vnb_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->vnb_type == NULL)
|
||||
{
|
||||
@@ -2143,7 +2143,7 @@ aarch64_vnb_type (struct gdbarch *gdbarch)
|
||||
static struct type *
|
||||
aarch64_vnv_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->vnv_type == NULL)
|
||||
{
|
||||
@@ -2214,7 +2214,7 @@ aarch64_vnv_type (struct gdbarch *gdbarch)
|
||||
static int
|
||||
aarch64_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (reg >= AARCH64_DWARF_X0 && reg <= AARCH64_DWARF_X0 + 30)
|
||||
return AARCH64_X0_REGNUM + reg - AARCH64_DWARF_X0;
|
||||
@@ -2518,7 +2518,7 @@ aarch64_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
|
||||
CORE_ADDR jb_addr;
|
||||
gdb_byte buf[X_REGISTER_SIZE];
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
|
||||
jb_addr = get_frame_register_unsigned (frame, AARCH64_X0_REGNUM);
|
||||
@@ -2549,7 +2549,7 @@ aarch64_gen_return_address (struct gdbarch *gdbarch,
|
||||
static const char *
|
||||
aarch64_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
static const char *const q_name[] =
|
||||
{
|
||||
@@ -2663,7 +2663,7 @@ aarch64_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
|
||||
static struct type *
|
||||
aarch64_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
int p_regnum = regnum - gdbarch_num_regs (gdbarch);
|
||||
|
||||
@@ -2700,7 +2700,7 @@ static int
|
||||
aarch64_pseudo_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
||||
const struct reggroup *group)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
int p_regnum = regnum - gdbarch_num_regs (gdbarch);
|
||||
|
||||
@@ -2754,7 +2754,7 @@ static struct value *
|
||||
aarch64_pseudo_read_value (struct gdbarch *gdbarch, readable_regcache *regcache,
|
||||
int regnum)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
struct value *result_value = allocate_value (register_type (gdbarch, regnum));
|
||||
|
||||
VALUE_LVAL (result_value) = lval_register;
|
||||
@@ -2824,7 +2824,7 @@ static void
|
||||
aarch64_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
int regnum, const gdb_byte *buf)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
regnum -= gdbarch_num_regs (gdbarch);
|
||||
|
||||
if (regnum >= AARCH64_Q0_REGNUM && regnum < AARCH64_Q0_REGNUM + 32)
|
||||
@@ -3377,7 +3377,7 @@ aarch64_get_tdesc_vq (const struct target_desc *tdesc)
|
||||
static int
|
||||
aarch64_cannot_store_register (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (!tdep->has_pauth ())
|
||||
return 0;
|
||||
@@ -3444,7 +3444,7 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
best_arch = gdbarch_list_lookup_by_info (best_arch->next, &info))
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep
|
||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (best_arch->gdbarch);
|
||||
= gdbarch_tdep<aarch64_gdbarch_tdep> (best_arch->gdbarch);
|
||||
if (tdep && tdep->vq == vq)
|
||||
return best_arch->gdbarch;
|
||||
}
|
||||
@@ -3693,7 +3693,7 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
static void
|
||||
aarch64_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
||||
{
|
||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep == NULL)
|
||||
return;
|
||||
@@ -3915,7 +3915,7 @@ aarch64_record_branch_except_sys (aarch64_insn_decode_record *aarch64_insn_r)
|
||||
{
|
||||
|
||||
aarch64_gdbarch_tdep *tdep
|
||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (aarch64_insn_r->gdbarch);
|
||||
= gdbarch_tdep<aarch64_gdbarch_tdep> (aarch64_insn_r->gdbarch);
|
||||
uint8_t insn_bits24_27, insn_bits28_31, insn_bits22_23;
|
||||
uint32_t record_buf[4];
|
||||
|
||||
|
||||
@@ -1111,7 +1111,7 @@ static void
|
||||
supply_gprs64 (struct regcache *regcache, uint64_t *vals)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep
|
||||
= (ppc_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
||||
= gdbarch_tdep<ppc_gdbarch_tdep> (regcache->arch ());
|
||||
int regno;
|
||||
|
||||
for (regno = 0; regno < ppc_num_gprs; regno++)
|
||||
@@ -1133,7 +1133,7 @@ static void
|
||||
supply_fprs (struct regcache *regcache, double *vals)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
int regno;
|
||||
|
||||
/* This function should never be called on architectures without
|
||||
@@ -1151,7 +1151,7 @@ supply_fprs (struct regcache *regcache, double *vals)
|
||||
static int
|
||||
special_register_p (struct gdbarch *gdbarch, int regno)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
return regno == gdbarch_pc_regnum (gdbarch)
|
||||
|| regno == tdep->ppc_ps_regnum
|
||||
@@ -1174,7 +1174,7 @@ supply_sprs64 (struct regcache *regcache,
|
||||
uint32_t fpscr)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
regcache->raw_supply (gdbarch_pc_regnum (gdbarch), (char *) &iar);
|
||||
regcache->raw_supply (tdep->ppc_ps_regnum, (char *) &msr);
|
||||
@@ -1196,7 +1196,7 @@ supply_sprs32 (struct regcache *regcache,
|
||||
uint32_t fpscr)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
regcache->raw_supply (gdbarch_pc_regnum (gdbarch), (char *) &iar);
|
||||
regcache->raw_supply (tdep->ppc_ps_regnum, (char *) &msr);
|
||||
@@ -1219,7 +1219,7 @@ static void
|
||||
fetch_regs_user_thread (struct regcache *regcache, pthdb_pthread_t pdtid)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
int status, i;
|
||||
pthdb_context_t ctx;
|
||||
|
||||
@@ -1274,7 +1274,7 @@ fetch_regs_kernel_thread (struct regcache *regcache, int regno,
|
||||
pthdb_tid_t tid)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
uint64_t gprs64[ppc_num_gprs];
|
||||
uint32_t gprs32[ppc_num_gprs];
|
||||
double fprs[ppc_num_fprs];
|
||||
@@ -1377,7 +1377,7 @@ static void
|
||||
fill_gprs64 (const struct regcache *regcache, uint64_t *vals)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep
|
||||
= (ppc_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
||||
= gdbarch_tdep<ppc_gdbarch_tdep> (regcache->arch ());
|
||||
int regno;
|
||||
|
||||
for (regno = 0; regno < ppc_num_gprs; regno++)
|
||||
@@ -1390,7 +1390,7 @@ static void
|
||||
fill_gprs32 (const struct regcache *regcache, uint32_t *vals)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep
|
||||
= (ppc_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
||||
= gdbarch_tdep<ppc_gdbarch_tdep> (regcache->arch ());
|
||||
int regno;
|
||||
|
||||
for (regno = 0; regno < ppc_num_gprs; regno++)
|
||||
@@ -1404,7 +1404,7 @@ static void
|
||||
fill_fprs (const struct regcache *regcache, double *vals)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
int regno;
|
||||
|
||||
/* This function should never be called on architectures without
|
||||
@@ -1428,7 +1428,7 @@ fill_sprs64 (const struct regcache *regcache,
|
||||
uint32_t *fpscr)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Verify that the size of the size of the IAR buffer is the
|
||||
same as the raw size of the PC (in the register cache). If
|
||||
@@ -1462,7 +1462,7 @@ fill_sprs32 (const struct regcache *regcache,
|
||||
uint32_t *fpscr)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Verify that the size of the size of the IAR buffer is the
|
||||
same as the raw size of the PC (in the register cache). If
|
||||
@@ -1499,7 +1499,7 @@ static void
|
||||
store_regs_user_thread (const struct regcache *regcache, pthdb_pthread_t pdtid)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
int status, i;
|
||||
pthdb_context_t ctx;
|
||||
uint32_t int32;
|
||||
@@ -1589,7 +1589,7 @@ store_regs_kernel_thread (const struct regcache *regcache, int regno,
|
||||
pthdb_tid_t tid)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
uint64_t gprs64[ppc_num_gprs];
|
||||
uint32_t gprs32[ppc_num_gprs];
|
||||
double fprs[ppc_num_fprs];
|
||||
|
||||
@@ -362,7 +362,7 @@ alpha_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
/* Hook into the MDEBUG frame unwinder. */
|
||||
alpha_mdebug_init_abi (info, gdbarch);
|
||||
|
||||
alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
|
||||
tdep->dynamic_sigtramp_offset = alpha_linux_sigtramp_offset;
|
||||
tdep->sigcontext_addr = alpha_linux_sigcontext_addr;
|
||||
tdep->pc_in_sigtramp = alpha_linux_pc_in_sigtramp;
|
||||
|
||||
@@ -250,7 +250,7 @@ static void
|
||||
alphanbsd_init_abi (struct gdbarch_info info,
|
||||
struct gdbarch *gdbarch)
|
||||
{
|
||||
alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Hook into the DWARF CFI frame unwinder. */
|
||||
alpha_dwarf2_init_abi (info, gdbarch);
|
||||
|
||||
@@ -97,7 +97,7 @@ alphaobsd_sigcontext_addr (struct frame_info *this_frame)
|
||||
static void
|
||||
alphaobsd_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Hook into the DWARF CFI frame unwinder. */
|
||||
alpha_dwarf2_init_abi (info, gdbarch);
|
||||
|
||||
@@ -615,7 +615,7 @@ alpha_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
||||
{
|
||||
enum type_code code = type->code ();
|
||||
alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if ((code == TYPE_CODE_STRUCT
|
||||
|| code == TYPE_CODE_UNION
|
||||
@@ -851,7 +851,7 @@ static int
|
||||
alpha_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
CORE_ADDR jb_addr;
|
||||
gdb_byte raw_buffer[ALPHA_REGISTER_SIZE];
|
||||
@@ -891,7 +891,7 @@ alpha_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
|
||||
*this_prologue_cache = info;
|
||||
|
||||
gdbarch *arch = get_frame_arch (this_frame);
|
||||
alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (arch);
|
||||
info->sigcontext_addr = tdep->sigcontext_addr (this_frame);
|
||||
|
||||
return info;
|
||||
@@ -904,7 +904,7 @@ static CORE_ADDR
|
||||
alpha_sigtramp_register_address (struct gdbarch *gdbarch,
|
||||
CORE_ADDR sigcontext_addr, int regnum)
|
||||
{
|
||||
alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (regnum >= 0 && regnum < 32)
|
||||
return sigcontext_addr + tdep->sc_regs_offset + regnum * 8;
|
||||
@@ -925,7 +925,7 @@ alpha_sigtramp_frame_this_id (struct frame_info *this_frame,
|
||||
struct frame_id *this_id)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
|
||||
struct alpha_sigtramp_unwind_cache *info
|
||||
= alpha_sigtramp_frame_unwind_cache (this_frame, this_prologue_cache);
|
||||
CORE_ADDR stack_addr, code_addr;
|
||||
@@ -1000,7 +1000,7 @@ alpha_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
/* We shouldn't even bother to try if the OSABI didn't register a
|
||||
sigcontext_addr handler or pc_in_sigtramp handler. */
|
||||
alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
|
||||
if (tdep->sigcontext_addr == NULL)
|
||||
return 0;
|
||||
|
||||
@@ -1041,7 +1041,7 @@ static int heuristic_fence_post = 0;
|
||||
static CORE_ADDR
|
||||
alpha_heuristic_proc_start (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
{
|
||||
alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
|
||||
CORE_ADDR last_non_nop = pc;
|
||||
CORE_ADDR fence = pc - heuristic_fence_post;
|
||||
CORE_ADDR orig_pc = pc;
|
||||
|
||||
@@ -97,7 +97,7 @@ amd64_darwin_sigcontext_addr (struct frame_info *this_frame)
|
||||
static void
|
||||
x86_darwin_init_abi_64 (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
amd64_init_abi (info, gdbarch,
|
||||
amd64_target_description (X86_XSTATE_SSE_MASK, true));
|
||||
|
||||
@@ -102,7 +102,7 @@ amd64_fbsd_nat_target::fetch_registers (struct regcache *regcache, int regnum)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
#if defined(PT_GETFSBASE) || defined(PT_GETGSBASE)
|
||||
const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
#endif
|
||||
pid_t pid = get_ptrace_pid (regcache->ptid ());
|
||||
const struct regset *gregset = find_gregset (gdbarch);
|
||||
@@ -174,7 +174,7 @@ amd64_fbsd_nat_target::store_registers (struct regcache *regcache, int regnum)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
#if defined(PT_GETFSBASE) || defined(PT_GETGSBASE)
|
||||
const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
#endif
|
||||
pid_t pid = get_ptrace_pid (regcache->ptid ());
|
||||
const struct regset *gregset = find_gregset (gdbarch);
|
||||
|
||||
@@ -262,7 +262,7 @@ amd64fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||
void *cb_data,
|
||||
const struct regcache *regcache)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
cb (".reg", AMD64_FBSD_SIZEOF_GREGSET, AMD64_FBSD_SIZEOF_GREGSET,
|
||||
&amd64_fbsd_gregset, NULL, cb_data);
|
||||
@@ -299,7 +299,7 @@ amd64fbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
|
||||
static void
|
||||
amd64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Generic FreeBSD support. */
|
||||
fbsd_init_abi (info, gdbarch);
|
||||
|
||||
@@ -1659,7 +1659,7 @@ amd64_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||
void *cb_data,
|
||||
const struct regcache *regcache)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
cb (".reg", 27 * 8, 27 * 8, &i386_gregset, NULL, cb_data);
|
||||
cb (".reg2", 512, 512, &amd64_fpregset, NULL, cb_data);
|
||||
@@ -1796,7 +1796,7 @@ static void
|
||||
amd64_linux_init_abi_common(struct gdbarch_info info, struct gdbarch *gdbarch,
|
||||
int num_disp_step_buffers)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
linux_init_abi (info, gdbarch, num_disp_step_buffers);
|
||||
|
||||
@@ -1849,7 +1849,7 @@ amd64_linux_init_abi_common(struct gdbarch_info info, struct gdbarch *gdbarch,
|
||||
static void
|
||||
amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
struct tdesc_arch_data *tdesc_data = info.tdesc_data;
|
||||
const struct tdesc_feature *feature;
|
||||
int valid_p;
|
||||
@@ -2063,7 +2063,7 @@ amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
static void
|
||||
amd64_x32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
struct tdesc_arch_data *tdesc_data = info.tdesc_data;
|
||||
const struct tdesc_feature *feature;
|
||||
int valid_p;
|
||||
|
||||
@@ -97,7 +97,7 @@ int amd64nbsd_r_reg_offset[] =
|
||||
static void
|
||||
amd64nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Initialize general-purpose register set details first. */
|
||||
tdep->gregset_reg_offset = amd64nbsd_r_reg_offset;
|
||||
|
||||
@@ -420,7 +420,7 @@ static const struct frame_unwind amd64obsd_trapframe_unwind =
|
||||
static void
|
||||
amd64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
amd64_init_abi (info, gdbarch,
|
||||
amd64_target_description (X86_XSTATE_SSE_MASK, true));
|
||||
|
||||
@@ -80,7 +80,7 @@ amd64_sol2_mcontext_addr (struct frame_info *this_frame)
|
||||
static void
|
||||
amd64_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
tdep->gregset_reg_offset = amd64_sol2_gregset_reg_offset;
|
||||
tdep->gregset_num_regs = ARRAY_SIZE (amd64_sol2_gregset_reg_offset);
|
||||
|
||||
@@ -247,7 +247,7 @@ static const int amd64_dwarf_regmap_len =
|
||||
static int
|
||||
amd64_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int ymm0_regnum = tdep->ymm0_regnum;
|
||||
int regnum = -1;
|
||||
|
||||
@@ -331,7 +331,7 @@ static const char * const amd64_dword_names[] =
|
||||
static const char *
|
||||
amd64_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
if (i386_byte_regnum_p (gdbarch, regnum))
|
||||
return amd64_byte_names[regnum - tdep->al_regnum];
|
||||
else if (i386_zmm_regnum_p (gdbarch, regnum))
|
||||
@@ -353,7 +353,7 @@ amd64_pseudo_register_read_value (struct gdbarch *gdbarch,
|
||||
readable_regcache *regcache,
|
||||
int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
value *result_value = allocate_value (register_type (gdbarch, regnum));
|
||||
VALUE_LVAL (result_value) = lval_register;
|
||||
@@ -413,7 +413,7 @@ amd64_pseudo_register_write (struct gdbarch *gdbarch,
|
||||
struct regcache *regcache,
|
||||
int regnum, const gdb_byte *buf)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (i386_byte_regnum_p (gdbarch, regnum))
|
||||
{
|
||||
@@ -465,7 +465,7 @@ static int
|
||||
amd64_ax_pseudo_register_collect (struct gdbarch *gdbarch,
|
||||
struct agent_expr *ax, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (i386_byte_regnum_p (gdbarch, regnum))
|
||||
{
|
||||
@@ -2749,7 +2749,7 @@ static struct amd64_frame_cache *
|
||||
amd64_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
struct amd64_frame_cache *cache;
|
||||
CORE_ADDR addr;
|
||||
@@ -2832,7 +2832,7 @@ amd64_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
void **this_cache)
|
||||
{
|
||||
gdbarch *arch = get_frame_arch (this_frame);
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
|
||||
|
||||
/* We shouldn't even bother if we don't have a sigcontext_addr
|
||||
handler. */
|
||||
@@ -3032,7 +3032,7 @@ amd64_supply_fpregset (const struct regset *regset, struct regcache *regcache,
|
||||
int regnum, const void *fpregs, size_t len)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
gdb_assert (len >= tdep->sizeof_fpregset);
|
||||
amd64_supply_fxsave (regcache, regnum, fpregs);
|
||||
@@ -3049,7 +3049,7 @@ amd64_collect_fpregset (const struct regset *regset,
|
||||
int regnum, void *fpregs, size_t len)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
gdb_assert (len >= tdep->sizeof_fpregset);
|
||||
amd64_collect_fxsave (regcache, regnum, fpregs);
|
||||
@@ -3073,7 +3073,7 @@ amd64_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
|
||||
gdb_byte buf[8];
|
||||
CORE_ADDR jb_addr;
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int jb_pc_offset = tdep->jb_pc_offset;
|
||||
int len = TYPE_LENGTH (builtin_type (gdbarch)->builtin_func_ptr);
|
||||
|
||||
@@ -3117,7 +3117,7 @@ void
|
||||
amd64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch,
|
||||
const target_desc *default_tdesc)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
const struct target_desc *tdesc = info.target_desc;
|
||||
static const char *const stap_integer_prefixes[] = { "$", NULL };
|
||||
static const char *const stap_register_prefixes[] = { "%", NULL };
|
||||
@@ -3296,7 +3296,7 @@ amd64_none_init_abi (gdbarch_info info, gdbarch *arch)
|
||||
static struct type *
|
||||
amd64_x32_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
switch (regnum - tdep->eax_regnum)
|
||||
{
|
||||
@@ -3314,7 +3314,7 @@ void
|
||||
amd64_x32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch,
|
||||
const target_desc *default_tdesc)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
amd64_init_abi (info, gdbarch, default_tdesc);
|
||||
|
||||
@@ -3384,7 +3384,7 @@ amd64_supply_fxsave (struct regcache *regcache, int regnum,
|
||||
const void *fxsave)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
i387_supply_fxsave (regcache, regnum, fxsave);
|
||||
|
||||
@@ -3407,7 +3407,7 @@ amd64_supply_xsave (struct regcache *regcache, int regnum,
|
||||
const void *xsave)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
i387_supply_xsave (regcache, regnum, xsave);
|
||||
|
||||
@@ -3442,7 +3442,7 @@ amd64_collect_fxsave (const struct regcache *regcache, int regnum,
|
||||
void *fxsave)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
gdb_byte *regs = (gdb_byte *) fxsave;
|
||||
|
||||
i387_collect_fxsave (regcache, regnum, fxsave);
|
||||
@@ -3463,7 +3463,7 @@ amd64_collect_xsave (const struct regcache *regcache, int regnum,
|
||||
void *xsave, int gcore)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
gdb_byte *regs = (gdb_byte *) xsave;
|
||||
|
||||
i387_collect_xsave (regcache, regnum, xsave, gcore);
|
||||
|
||||
@@ -1277,7 +1277,7 @@ amd64_windows_auto_wide_charset (void)
|
||||
static void
|
||||
amd64_windows_init_abi_common (gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* The dwarf2 unwinder (appended very early by i386_gdbarch_init) is
|
||||
preferred over the SEH one. The reasons are:
|
||||
|
||||
@@ -411,7 +411,7 @@ static std::vector<CORE_ADDR>
|
||||
arc_linux_software_single_step (struct regcache *regcache)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
arc_gdbarch_tdep *tdep = (arc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arc_gdbarch_tdep *tdep = gdbarch_tdep<arc_gdbarch_tdep> (gdbarch);
|
||||
struct gdb_non_printing_memory_disassembler dis (gdbarch);
|
||||
|
||||
/* Read current instruction. */
|
||||
@@ -694,7 +694,7 @@ arc_linux_core_read_description (struct gdbarch *gdbarch,
|
||||
static void
|
||||
arc_linux_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
arc_gdbarch_tdep *tdep = (arc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arc_gdbarch_tdep *tdep = gdbarch_tdep<arc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
arc_linux_debug_printf ("GNU/Linux OS/ABI initialization.");
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ arc_newlib_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
arc_newlib_debug_printf ("Initialization.");
|
||||
|
||||
arc_gdbarch_tdep *tdep = (arc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arc_gdbarch_tdep *tdep = gdbarch_tdep<arc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Offset of original PC in longjmp jump buffer (in registers). Value of PC
|
||||
offset can be found in newlib/libc/machine/arc/setjmp.S. */
|
||||
|
||||
@@ -1002,7 +1002,7 @@ arc_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
|
||||
arc_debug_printf ("called");
|
||||
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
arc_gdbarch_tdep *tdep = (arc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arc_gdbarch_tdep *tdep = gdbarch_tdep<arc_gdbarch_tdep> (gdbarch);
|
||||
int pc_offset = tdep->jb_pc * ARC_REGISTER_SIZE;
|
||||
gdb_byte buf[ARC_REGISTER_SIZE];
|
||||
CORE_ADDR jb_addr = get_frame_register_unsigned (frame, ARC_FIRST_ARG_REGNUM);
|
||||
@@ -1810,7 +1810,7 @@ arc_make_sigtramp_frame_cache (struct frame_info *this_frame)
|
||||
arc_debug_printf ("called");
|
||||
|
||||
gdbarch *arch = get_frame_arch (this_frame);
|
||||
arc_gdbarch_tdep *tdep = (arc_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
arc_gdbarch_tdep *tdep = gdbarch_tdep<arc_gdbarch_tdep> (arch);
|
||||
|
||||
/* Allocate new frame cache instance and space for saved register info. */
|
||||
struct arc_frame_cache *cache = FRAME_OBSTACK_ZALLOC (struct arc_frame_cache);
|
||||
@@ -1887,7 +1887,7 @@ arc_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
arc_debug_printf ("called");
|
||||
|
||||
gdbarch *arch = get_frame_arch (this_frame);
|
||||
arc_gdbarch_tdep *tdep = (arc_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
arc_gdbarch_tdep *tdep = gdbarch_tdep<arc_gdbarch_tdep> (arch);
|
||||
|
||||
/* If we have a sigcontext_addr handler, then just return 1 (same as the
|
||||
"default_frame_sniffer ()"). */
|
||||
@@ -2414,7 +2414,7 @@ arc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
static void
|
||||
arc_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
||||
{
|
||||
arc_gdbarch_tdep *tdep = (arc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arc_gdbarch_tdep *tdep = gdbarch_tdep<arc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
gdb_printf (file, "arc_dump_tdep: jb_pc = %i\n", tdep->jb_pc);
|
||||
|
||||
|
||||
@@ -1198,11 +1198,13 @@ gdbarch_free (struct gdbarch *arch)
|
||||
xfree (obstack);
|
||||
}
|
||||
|
||||
/* See gdbarch.h. */
|
||||
|
||||
struct gdbarch_tdep *
|
||||
gdbarch_tdep (struct gdbarch *gdbarch)
|
||||
gdbarch_tdep_1 (struct gdbarch *gdbarch)
|
||||
{
|
||||
if (gdbarch_debug >= 2)
|
||||
gdb_printf (gdb_stdlog, "gdbarch_tdep called\n");
|
||||
gdb_printf (gdb_stdlog, "gdbarch_tdep_1 called\n");
|
||||
return gdbarch->tdep;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ arm_fbsd_nat_target::fetch_registers (struct regcache *regcache, int regnum)
|
||||
#endif
|
||||
#ifdef PT_GETREGSET
|
||||
gdbarch *gdbarch = regcache->arch ();
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->tls_regnum > 0)
|
||||
{
|
||||
@@ -90,7 +90,7 @@ arm_fbsd_nat_target::store_registers (struct regcache *regcache, int regnum)
|
||||
#endif
|
||||
#ifdef PT_GETREGSET
|
||||
gdbarch *gdbarch = regcache->arch ();
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->tls_regnum > 0)
|
||||
{
|
||||
|
||||
@@ -159,7 +159,7 @@ arm_fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||
void *cb_data,
|
||||
const struct regcache *regcache)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
cb (".reg", ARM_FBSD_SIZEOF_GREGSET, ARM_FBSD_SIZEOF_GREGSET,
|
||||
&arm_fbsd_gregset, NULL, cb_data);
|
||||
@@ -233,7 +233,7 @@ static CORE_ADDR
|
||||
arm_fbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
|
||||
CORE_ADDR lm_addr, CORE_ADDR offset)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
struct regcache *regcache;
|
||||
|
||||
regcache = get_thread_arch_regcache (current_inferior ()->process_target (),
|
||||
@@ -256,7 +256,7 @@ arm_fbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
|
||||
static void
|
||||
arm_fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Generic FreeBSD support. */
|
||||
fbsd_init_abi (info, gdbarch);
|
||||
|
||||
@@ -339,7 +339,7 @@ fetch_vfp_regs (struct regcache *regcache)
|
||||
gdb_byte regbuf[ARM_VFP3_REGS_SIZE];
|
||||
int ret, tid;
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Get the thread id for the ptrace call. */
|
||||
tid = regcache->ptid ().lwp ();
|
||||
@@ -368,7 +368,7 @@ store_vfp_regs (const struct regcache *regcache)
|
||||
gdb_byte regbuf[ARM_VFP3_REGS_SIZE];
|
||||
int ret, tid;
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Get the thread id for the ptrace call. */
|
||||
tid = regcache->ptid ().lwp ();
|
||||
@@ -413,7 +413,7 @@ void
|
||||
arm_linux_nat_target::fetch_registers (struct regcache *regcache, int regno)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (-1 == regno)
|
||||
{
|
||||
@@ -450,7 +450,7 @@ void
|
||||
arm_linux_nat_target::store_registers (struct regcache *regcache, int regno)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (-1 == regno)
|
||||
{
|
||||
|
||||
@@ -712,7 +712,7 @@ arm_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||
void *cb_data,
|
||||
const struct regcache *regcache)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
cb (".reg", ARM_LINUX_SIZEOF_GREGSET, ARM_LINUX_SIZEOF_GREGSET,
|
||||
&arm_linux_gregset, NULL, cb_data);
|
||||
@@ -1716,7 +1716,7 @@ arm_linux_init_abi (struct gdbarch_info info,
|
||||
NULL };
|
||||
static const char *const stap_register_indirection_suffixes[] = { "]",
|
||||
NULL };
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
linux_init_abi (info, gdbarch, 1);
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ static arm_netbsd_nat_target the_arm_netbsd_nat_target;
|
||||
static void
|
||||
arm_supply_vfpregset (struct regcache *regcache, struct fpreg *fpregset)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (regcache->arch ());
|
||||
if (tdep->vfp_register_count == 0)
|
||||
return;
|
||||
|
||||
@@ -97,7 +97,7 @@ fetch_fp_register (struct regcache *regcache, int regno)
|
||||
return;
|
||||
}
|
||||
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (regcache->arch ());
|
||||
if (regno == ARM_FPSCR_REGNUM && tdep->vfp_register_count != 0)
|
||||
regcache->raw_supply (ARM_FPSCR_REGNUM, (char *) &vfp.vfp_fpscr);
|
||||
else if (regno >= ARM_D0_REGNUM
|
||||
@@ -279,7 +279,7 @@ store_fp_register (const struct regcache *regcache, int regno)
|
||||
return;
|
||||
}
|
||||
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (regcache->arch ());
|
||||
if (regno == ARM_FPSCR_REGNUM && tdep->vfp_register_count != 0)
|
||||
regcache->raw_collect (ARM_FPSCR_REGNUM, (char *) &vfp.vfp_fpscr);
|
||||
else if (regno >= ARM_D0_REGNUM
|
||||
@@ -301,7 +301,7 @@ store_fp_register (const struct regcache *regcache, int regno)
|
||||
static void
|
||||
store_fp_regs (const struct regcache *regcache)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (regcache->arch ());
|
||||
int lwp = regcache->ptid ().lwp ();
|
||||
if (tdep->vfp_register_count == 0)
|
||||
return;
|
||||
|
||||
@@ -111,7 +111,7 @@ static void
|
||||
arm_netbsd_init_abi_common (struct gdbarch_info info,
|
||||
struct gdbarch *gdbarch)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
tdep->lowest_pc = 0x8000;
|
||||
switch (info.byte_order)
|
||||
@@ -148,7 +148,7 @@ static void
|
||||
arm_netbsd_elf_init_abi (struct gdbarch_info info,
|
||||
struct gdbarch *gdbarch)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
arm_netbsd_init_abi_common (info, gdbarch);
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ arm_none_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||
void *cb_data,
|
||||
const struct regcache *regcache)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
cb (".reg", ARM_NONE_SIZEOF_GREGSET, ARM_NONE_SIZEOF_GREGSET,
|
||||
&arm_none_gregset, nullptr, cb_data);
|
||||
|
||||
@@ -76,7 +76,7 @@ static void
|
||||
armobsd_init_abi (struct gdbarch_info info,
|
||||
struct gdbarch *gdbarch)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->fp_model == ARM_FLOAT_AUTO)
|
||||
tdep->fp_model = ARM_FLOAT_SOFT_VFP;
|
||||
|
||||
157
gdb/arm-tdep.c
157
gdb/arm-tdep.c
@@ -355,7 +355,7 @@ static void
|
||||
arm_cache_init (struct arm_prologue_cache *cache, struct frame_info *frame)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
arm_cache_init (cache, gdbarch);
|
||||
cache->sp = get_frame_register_unsigned (frame, ARM_SP_REGNUM);
|
||||
@@ -479,14 +479,12 @@ arm_cache_set_active_sp_value (struct arm_prologue_cache *cache,
|
||||
gdb_assert_not_reached ("Invalid SP selection");
|
||||
}
|
||||
|
||||
/* Return true if REGNUM is one of the stack pointers. */
|
||||
/* Return true if REGNUM is one of the alternative stack pointers. */
|
||||
|
||||
static bool
|
||||
arm_cache_is_sp_register (struct arm_prologue_cache *cache,
|
||||
arm_gdbarch_tdep *tdep, int regnum)
|
||||
arm_is_alternative_sp_register (arm_gdbarch_tdep *tdep, int regnum)
|
||||
{
|
||||
if ((regnum == ARM_SP_REGNUM)
|
||||
|| (regnum == tdep->m_profile_msp_regnum)
|
||||
if ((regnum == tdep->m_profile_msp_regnum)
|
||||
|| (regnum == tdep->m_profile_msp_s_regnum)
|
||||
|| (regnum == tdep->m_profile_msp_ns_regnum)
|
||||
|| (regnum == tdep->m_profile_psp_regnum)
|
||||
@@ -503,8 +501,7 @@ static void
|
||||
arm_cache_switch_prev_sp (struct arm_prologue_cache *cache,
|
||||
arm_gdbarch_tdep *tdep, int sp_regnum)
|
||||
{
|
||||
gdb_assert (sp_regnum != ARM_SP_REGNUM);
|
||||
gdb_assert (arm_cache_is_sp_register (cache, tdep, sp_regnum));
|
||||
gdb_assert (arm_is_alternative_sp_register (tdep, sp_regnum));
|
||||
|
||||
if (tdep->have_sec_ext)
|
||||
gdb_assert (sp_regnum != tdep->m_profile_msp_regnum
|
||||
@@ -556,7 +553,7 @@ bool arm_unwind_secure_frames = true;
|
||||
int
|
||||
arm_psr_thumb_bit (struct gdbarch *gdbarch)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->is_m)
|
||||
return XPSR_T;
|
||||
@@ -577,20 +574,24 @@ arm_is_thumb (struct regcache *regcache)
|
||||
return (cpsr & t_bit) != 0;
|
||||
}
|
||||
|
||||
/* Determine if FRAME is executing in Thumb mode. */
|
||||
/* Determine if FRAME is executing in Thumb mode. FRAME must be an ARM
|
||||
frame. */
|
||||
|
||||
int
|
||||
arm_frame_is_thumb (struct frame_info *frame)
|
||||
{
|
||||
CORE_ADDR cpsr;
|
||||
ULONGEST t_bit = arm_psr_thumb_bit (get_frame_arch (frame));
|
||||
/* Check the architecture of FRAME. */
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
gdb_assert (gdbarch_bfd_arch_info (gdbarch)->arch == bfd_arch_arm);
|
||||
|
||||
/* Every ARM frame unwinder can unwind the T bit of the CPSR, either
|
||||
directly (from a signal frame or dummy frame) or by interpreting
|
||||
the saved LR (from a prologue or DWARF frame). So consult it and
|
||||
trust the unwinders. */
|
||||
cpsr = get_frame_register_unsigned (frame, ARM_PS_REGNUM);
|
||||
CORE_ADDR cpsr = get_frame_register_unsigned (frame, ARM_PS_REGNUM);
|
||||
|
||||
/* Find and extract the thumb bit. */
|
||||
ULONGEST t_bit = arm_psr_thumb_bit (gdbarch);
|
||||
return (cpsr & t_bit) != 0;
|
||||
}
|
||||
|
||||
@@ -664,7 +665,7 @@ arm_pc_is_thumb (struct gdbarch *gdbarch, CORE_ADDR memaddr)
|
||||
struct bound_minimal_symbol sym;
|
||||
char type;
|
||||
arm_displaced_step_copy_insn_closure *dsc = nullptr;
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (gdbarch_displaced_step_copy_insn_closure_by_addr_p (gdbarch))
|
||||
dsc = ((arm_displaced_step_copy_insn_closure * )
|
||||
@@ -768,7 +769,7 @@ arm_pc_is_thumb (struct gdbarch *gdbarch, CORE_ADDR memaddr)
|
||||
static int
|
||||
arm_m_addr_is_magic (struct gdbarch *gdbarch, CORE_ADDR addr)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
if (tdep->have_sec_ext)
|
||||
{
|
||||
switch ((addr & 0xff000000))
|
||||
@@ -810,7 +811,7 @@ arm_m_addr_is_magic (struct gdbarch *gdbarch, CORE_ADDR addr)
|
||||
static CORE_ADDR
|
||||
arm_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR val)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* On M-profile devices, do not strip the low bit from EXC_RETURN
|
||||
(the magic exception return address). */
|
||||
@@ -938,7 +939,7 @@ thumb_analyze_prologue (struct gdbarch *gdbarch,
|
||||
CORE_ADDR start, CORE_ADDR limit,
|
||||
struct arm_prologue_cache *cache)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
|
||||
int i;
|
||||
@@ -1878,7 +1879,7 @@ arm_analyze_prologue (struct gdbarch *gdbarch,
|
||||
CORE_ADDR offset, current_pc;
|
||||
pv_t regs[ARM_FPS_REGNUM];
|
||||
CORE_ADDR unrecognized_pc = 0;
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Search the prologue looking for instructions that set up the
|
||||
frame pointer, adjust the stack pointer, and save registers.
|
||||
@@ -2126,7 +2127,7 @@ arm_scan_prologue (struct frame_info *this_frame,
|
||||
CORE_ADDR prologue_start, prologue_end;
|
||||
CORE_ADDR prev_pc = get_frame_pc (this_frame);
|
||||
CORE_ADDR block_addr = get_frame_address_in_block (this_frame);
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Assume there is no frame until proven otherwise. */
|
||||
cache->framereg = ARM_SP_REGNUM;
|
||||
@@ -2231,7 +2232,7 @@ arm_make_prologue_cache (struct frame_info *this_frame)
|
||||
return cache;
|
||||
|
||||
arm_gdbarch_tdep *tdep =
|
||||
(arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
|
||||
gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
|
||||
|
||||
prev_sp = unwound_fp + cache->framesize;
|
||||
arm_cache_set_active_sp_value (cache, tdep, prev_sp);
|
||||
@@ -2262,7 +2263,7 @@ arm_prologue_unwind_stop_reason (struct frame_info *this_frame,
|
||||
/* This is meant to halt the backtrace at "_start". */
|
||||
pc = get_frame_pc (this_frame);
|
||||
gdbarch *arch = get_frame_arch (this_frame);
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (arch);
|
||||
if (pc <= tdep->lowest_pc)
|
||||
return UNWIND_OUTERMOST;
|
||||
|
||||
@@ -2290,7 +2291,7 @@ arm_prologue_this_id (struct frame_info *this_frame,
|
||||
cache = (struct arm_prologue_cache *) *this_cache;
|
||||
|
||||
arm_gdbarch_tdep *tdep
|
||||
= (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
|
||||
= gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
|
||||
|
||||
/* Use function start address as part of the frame ID. If we cannot
|
||||
identify the start address (due to missing symbol information),
|
||||
@@ -2317,7 +2318,7 @@ arm_prologue_prev_register (struct frame_info *this_frame,
|
||||
*this_cache = arm_make_prologue_cache (this_frame);
|
||||
cache = (struct arm_prologue_cache *) *this_cache;
|
||||
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* If this frame has signed the return address, mark it as so. */
|
||||
if (tdep->have_pacbti && cache->ra_signed_state.has_value ()
|
||||
@@ -2347,7 +2348,7 @@ arm_prologue_prev_register (struct frame_info *this_frame,
|
||||
|
||||
/* The value might be one of the alternative SP, if so, use the
|
||||
value already constructed. */
|
||||
if (arm_cache_is_sp_register (cache, tdep, prev_regnum))
|
||||
if (arm_is_alternative_sp_register (tdep, prev_regnum))
|
||||
{
|
||||
sp_value = arm_cache_get_sp_register (cache, tdep, prev_regnum);
|
||||
return frame_unwind_got_constant (this_frame, prev_regnum, sp_value);
|
||||
@@ -2985,7 +2986,7 @@ arm_exidx_fill_cache (struct frame_info *this_frame, gdb_byte *entry)
|
||||
|
||||
/* We already got the previous SP. */
|
||||
arm_gdbarch_tdep *tdep
|
||||
= (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
|
||||
= gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
|
||||
arm_cache_set_active_sp_value (cache, tdep, vsp);
|
||||
|
||||
return cache;
|
||||
@@ -3110,7 +3111,7 @@ arm_make_epilogue_frame_cache (struct frame_info *this_frame)
|
||||
|
||||
/* Since we are in epilogue, the SP has been restored. */
|
||||
arm_gdbarch_tdep *tdep
|
||||
= (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
|
||||
= gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
|
||||
arm_cache_set_active_sp_value (cache, tdep,
|
||||
get_frame_register_unsigned (this_frame,
|
||||
ARM_SP_REGNUM));
|
||||
@@ -3149,7 +3150,7 @@ arm_epilogue_frame_this_id (struct frame_info *this_frame,
|
||||
func = pc;
|
||||
|
||||
arm_gdbarch_tdep *tdep
|
||||
= (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
|
||||
= gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
|
||||
*this_id = frame_id_build (arm_cache_get_prev_sp_value (cache, tdep), pc);
|
||||
}
|
||||
|
||||
@@ -3273,7 +3274,7 @@ arm_make_stub_cache (struct frame_info *this_frame)
|
||||
arm_cache_init (cache, this_frame);
|
||||
|
||||
arm_gdbarch_tdep *tdep
|
||||
= (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
|
||||
= gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
|
||||
arm_cache_set_active_sp_value (cache, tdep,
|
||||
get_frame_register_unsigned (this_frame,
|
||||
ARM_SP_REGNUM));
|
||||
@@ -3295,7 +3296,7 @@ arm_stub_this_id (struct frame_info *this_frame,
|
||||
cache = (struct arm_prologue_cache *) *this_cache;
|
||||
|
||||
arm_gdbarch_tdep *tdep
|
||||
= (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
|
||||
= gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
|
||||
*this_id = frame_id_build (arm_cache_get_prev_sp_value (cache, tdep),
|
||||
get_frame_pc (this_frame));
|
||||
}
|
||||
@@ -3343,7 +3344,7 @@ static struct arm_prologue_cache *
|
||||
arm_m_exception_cache (struct frame_info *this_frame)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
struct arm_prologue_cache *cache;
|
||||
CORE_ADDR lr;
|
||||
@@ -3654,7 +3655,7 @@ arm_m_exception_this_id (struct frame_info *this_frame,
|
||||
|
||||
/* Our frame ID for a stub frame is the current SP and LR. */
|
||||
arm_gdbarch_tdep *tdep
|
||||
= (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
|
||||
= gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
|
||||
*this_id = frame_id_build (arm_cache_get_prev_sp_value (cache, tdep),
|
||||
get_frame_pc (this_frame));
|
||||
}
|
||||
@@ -3676,7 +3677,7 @@ arm_m_exception_prev_register (struct frame_info *this_frame,
|
||||
|
||||
/* The value was already reconstructed into PREV_SP. */
|
||||
arm_gdbarch_tdep *tdep
|
||||
= (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
|
||||
= gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
|
||||
if (prev_regnum == ARM_SP_REGNUM)
|
||||
return frame_unwind_got_constant (this_frame, prev_regnum,
|
||||
arm_cache_get_prev_sp_value (cache, tdep));
|
||||
@@ -3694,7 +3695,7 @@ arm_m_exception_prev_register (struct frame_info *this_frame,
|
||||
|
||||
/* The value might be one of the alternative SP, if so, use the
|
||||
value already constructed. */
|
||||
if (arm_cache_is_sp_register (cache, tdep, prev_regnum))
|
||||
if (arm_is_alternative_sp_register (tdep, prev_regnum))
|
||||
{
|
||||
sp_value = arm_cache_get_sp_register (cache, tdep, prev_regnum);
|
||||
return frame_unwind_got_constant (this_frame, prev_regnum, sp_value);
|
||||
@@ -3764,7 +3765,7 @@ arm_normal_frame_base (struct frame_info *this_frame, void **this_cache)
|
||||
cache = (struct arm_prologue_cache *) *this_cache;
|
||||
|
||||
arm_gdbarch_tdep *tdep
|
||||
= (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
|
||||
= gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
|
||||
return arm_cache_get_prev_sp_value (cache, tdep) - cache->framesize;
|
||||
}
|
||||
|
||||
@@ -3780,7 +3781,7 @@ arm_dwarf2_prev_register (struct frame_info *this_frame, void **this_cache,
|
||||
int regnum)
|
||||
{
|
||||
struct gdbarch * gdbarch = get_frame_arch (this_frame);
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
CORE_ADDR lr;
|
||||
ULONGEST cpsr;
|
||||
|
||||
@@ -4304,7 +4305,7 @@ arm_vfp_call_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type,
|
||||
static int
|
||||
arm_vfp_abi_for_function (struct gdbarch *gdbarch, struct type *func_type)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Variadic functions always use the base ABI. Assume that functions
|
||||
without debug info are not variadic. */
|
||||
@@ -4338,7 +4339,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
int use_vfp_abi;
|
||||
struct type *ftype;
|
||||
unsigned vfp_regs_free = (1 << 16) - 1;
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Determine the type of this function and whether the VFP ABI
|
||||
applies. */
|
||||
@@ -4610,7 +4611,7 @@ arm_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
|
||||
static struct type *
|
||||
arm_ext_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (!tdep->arm_ext_type)
|
||||
tdep->arm_ext_type
|
||||
@@ -4623,7 +4624,7 @@ arm_ext_type (struct gdbarch *gdbarch)
|
||||
static struct type *
|
||||
arm_neon_double_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->neon_double_type == NULL)
|
||||
{
|
||||
@@ -4662,7 +4663,7 @@ arm_neon_double_type (struct gdbarch *gdbarch)
|
||||
static struct type *
|
||||
arm_neon_quad_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->neon_quad_type == NULL)
|
||||
{
|
||||
@@ -4700,7 +4701,7 @@ arm_neon_quad_type (struct gdbarch *gdbarch)
|
||||
static bool
|
||||
is_q_pseudo (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Q pseudo registers are available for both NEON (Q0~Q15) and
|
||||
MVE (Q0~Q7) features. */
|
||||
@@ -4721,7 +4722,7 @@ is_q_pseudo (struct gdbarch *gdbarch, int regnum)
|
||||
static bool
|
||||
is_s_pseudo (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->have_s_pseudos
|
||||
&& regnum >= tdep->s_pseudo_base
|
||||
@@ -4740,7 +4741,7 @@ is_s_pseudo (struct gdbarch *gdbarch, int regnum)
|
||||
static bool
|
||||
is_mve_pseudo (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->have_mve
|
||||
&& regnum >= tdep->mve_pseudo_base
|
||||
@@ -4759,7 +4760,7 @@ is_mve_pseudo (struct gdbarch *gdbarch, int regnum)
|
||||
static bool
|
||||
is_pacbti_pseudo (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->have_pacbti
|
||||
&& regnum >= tdep->pacbti_pseudo_base
|
||||
@@ -4775,7 +4776,7 @@ is_pacbti_pseudo (struct gdbarch *gdbarch, int regnum)
|
||||
static struct type *
|
||||
arm_register_type (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (is_s_pseudo (gdbarch, regnum))
|
||||
return builtin_type (gdbarch)->builtin_float;
|
||||
@@ -4854,7 +4855,7 @@ arm_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
|
||||
/* PACBTI register containing the Pointer Authentication Code. */
|
||||
if (reg == ARM_DWARF_RA_AUTH_CODE)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->have_pacbti)
|
||||
return tdep->pacbti_pseudo_base;
|
||||
@@ -5000,7 +5001,7 @@ arm_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
|
||||
int buf_len;
|
||||
enum bfd_endian order = gdbarch_byte_order_for_code (gdbarch);
|
||||
int i, any, last_it, last_it_count;
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* If we are using BKPT breakpoints, none of this is necessary. */
|
||||
if (tdep->thumb2_breakpoint == NULL)
|
||||
@@ -8308,7 +8309,7 @@ arm_displaced_init_closure (struct gdbarch *gdbarch, CORE_ADDR from,
|
||||
CORE_ADDR to,
|
||||
arm_displaced_step_copy_insn_closure *dsc)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
unsigned int i, len, offset;
|
||||
enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
|
||||
int size = dsc->is_thumb? 2 : 4;
|
||||
@@ -8471,7 +8472,7 @@ static const gdb_byte arm_default_thumb_be_breakpoint[] = THUMB_BE_BREAKPOINT;
|
||||
static int
|
||||
arm_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
|
||||
|
||||
if (arm_pc_is_thumb (gdbarch, *pcptr))
|
||||
@@ -8506,7 +8507,7 @@ arm_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
|
||||
static const gdb_byte *
|
||||
arm_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
switch (kind)
|
||||
{
|
||||
@@ -8578,7 +8579,7 @@ arm_extract_return_value (struct type *type, struct regcache *regs,
|
||||
{
|
||||
struct gdbarch *gdbarch = regs->arch ();
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (TYPE_CODE_FLT == type->code ())
|
||||
{
|
||||
@@ -8689,7 +8690,7 @@ arm_return_in_memory (struct gdbarch *gdbarch, struct type *type)
|
||||
return (TYPE_LENGTH (type) > 16);
|
||||
}
|
||||
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
if (tdep->arm_abi != ARM_ABI_APCS)
|
||||
{
|
||||
/* The AAPCS says all aggregates not larger than a word are returned
|
||||
@@ -8795,7 +8796,7 @@ arm_store_return_value (struct type *type, struct regcache *regs,
|
||||
if (type->code () == TYPE_CODE_FLT)
|
||||
{
|
||||
gdb_byte buf[ARM_FP_REGISTER_SIZE];
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
switch (tdep->fp_model)
|
||||
{
|
||||
@@ -8884,7 +8885,7 @@ arm_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||
struct type *valtype, struct regcache *regcache,
|
||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
struct type *func_type = function ? value_type (function) : NULL;
|
||||
enum arm_vfp_cprc_base_type vfp_base_type;
|
||||
int vfp_base_count;
|
||||
@@ -8976,7 +8977,7 @@ static int
|
||||
arm_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
CORE_ADDR jb_addr;
|
||||
gdb_byte buf[ARM_INT_REGISTER_SIZE];
|
||||
@@ -9165,14 +9166,16 @@ static void
|
||||
show_fp_model (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep
|
||||
= (arm_gdbarch_tdep *) gdbarch_tdep (target_gdbarch ());
|
||||
|
||||
if (arm_fp_model == ARM_FLOAT_AUTO
|
||||
&& gdbarch_bfd_arch_info (target_gdbarch ())->arch == bfd_arch_arm)
|
||||
gdb_printf (file, _("\
|
||||
{
|
||||
arm_gdbarch_tdep *tdep
|
||||
= gdbarch_tdep<arm_gdbarch_tdep> (target_gdbarch ());
|
||||
|
||||
gdb_printf (file, _("\
|
||||
The current ARM floating point model is \"auto\" (currently \"%s\").\n"),
|
||||
fp_model_strings[tdep->fp_model]);
|
||||
fp_model_strings[tdep->fp_model]);
|
||||
}
|
||||
else
|
||||
gdb_printf (file, _("\
|
||||
The current ARM floating point model is \"%s\".\n"),
|
||||
@@ -9203,14 +9206,16 @@ static void
|
||||
arm_show_abi (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep
|
||||
= (arm_gdbarch_tdep *) gdbarch_tdep (target_gdbarch ());
|
||||
|
||||
if (arm_abi_global == ARM_ABI_AUTO
|
||||
&& gdbarch_bfd_arch_info (target_gdbarch ())->arch == bfd_arch_arm)
|
||||
gdb_printf (file, _("\
|
||||
{
|
||||
arm_gdbarch_tdep *tdep
|
||||
= gdbarch_tdep<arm_gdbarch_tdep> (target_gdbarch ());
|
||||
|
||||
gdb_printf (file, _("\
|
||||
The current ARM ABI is \"auto\" (currently \"%s\").\n"),
|
||||
arm_abi_strings[tdep->arm_abi]);
|
||||
arm_abi_strings[tdep->arm_abi]);
|
||||
}
|
||||
else
|
||||
gdb_printf (file, _("The current ARM ABI is \"%s\".\n"),
|
||||
arm_abi_string);
|
||||
@@ -9284,7 +9289,7 @@ show_disassembly_style_sfunc (struct ui_file *file, int from_tty,
|
||||
static const char *
|
||||
arm_register_name (struct gdbarch *gdbarch, int i)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (is_s_pseudo (gdbarch, i))
|
||||
{
|
||||
@@ -9455,7 +9460,7 @@ static enum register_status
|
||||
arm_mve_pseudo_read (struct gdbarch *gdbarch, readable_regcache *regcache,
|
||||
int regnum, gdb_byte *buf)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* P0 is the first 16 bits of VPR. */
|
||||
return regcache->raw_read_part (tdep->mve_vpr_regnum, 0, 2, buf);
|
||||
@@ -9469,7 +9474,7 @@ arm_pseudo_read (struct gdbarch *gdbarch, readable_regcache *regcache,
|
||||
char name_buf[4];
|
||||
gdb_byte reg_buf[8];
|
||||
int offset, double_regnum;
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
gdb_assert (regnum >= num_regs);
|
||||
|
||||
@@ -9541,7 +9546,7 @@ static void
|
||||
arm_mve_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
int regnum, const gdb_byte *buf)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* P0 is the first 16 bits of VPR. */
|
||||
regcache->raw_write_part (tdep->mve_vpr_regnum, 0, 2, buf);
|
||||
@@ -9555,7 +9560,7 @@ arm_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
char name_buf[4];
|
||||
gdb_byte reg_buf[8];
|
||||
int offset, double_regnum;
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
gdb_assert (regnum >= num_regs);
|
||||
|
||||
@@ -9643,7 +9648,7 @@ arm_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
||||
static void
|
||||
arm_register_g_packet_guesses (struct gdbarch *gdbarch)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->is_m)
|
||||
{
|
||||
@@ -9686,7 +9691,7 @@ arm_register_g_packet_guesses (struct gdbarch *gdbarch)
|
||||
static int
|
||||
arm_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *frame)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->is_m && get_frame_type (frame) == SIGTRAMP_FRAME)
|
||||
{
|
||||
@@ -10245,7 +10250,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
best_arch = gdbarch_list_lookup_by_info (best_arch->next, &info))
|
||||
{
|
||||
arm_gdbarch_tdep *tdep
|
||||
= (arm_gdbarch_tdep *) gdbarch_tdep (best_arch->gdbarch);
|
||||
= gdbarch_tdep<arm_gdbarch_tdep> (best_arch->gdbarch);
|
||||
|
||||
if (arm_abi != ARM_ABI_AUTO && arm_abi != tdep->arm_abi)
|
||||
continue;
|
||||
@@ -10565,7 +10570,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
static void
|
||||
arm_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep == NULL)
|
||||
return;
|
||||
@@ -12774,7 +12779,7 @@ arm_record_coproc_data_proc (arm_insn_decode_record *arm_insn_r)
|
||||
{
|
||||
uint32_t op, op1_ebit, coproc, bits_24_25;
|
||||
arm_gdbarch_tdep *tdep
|
||||
= (arm_gdbarch_tdep *) gdbarch_tdep (arm_insn_r->gdbarch);
|
||||
= gdbarch_tdep<arm_gdbarch_tdep> (arm_insn_r->gdbarch);
|
||||
struct regcache *reg_cache = arm_insn_r->regcache;
|
||||
|
||||
arm_insn_r->opcode = bits (arm_insn_r->arm_insn, 24, 27);
|
||||
@@ -13262,7 +13267,7 @@ static int
|
||||
thumb_record_ldm_stm_swi (arm_insn_decode_record *thumb_insn_r)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep
|
||||
= (arm_gdbarch_tdep *) gdbarch_tdep (thumb_insn_r->gdbarch);
|
||||
= gdbarch_tdep<arm_gdbarch_tdep> (thumb_insn_r->gdbarch);
|
||||
struct regcache *reg_cache = thumb_insn_r->regcache;
|
||||
|
||||
uint32_t ret = 0; /* function return value: -1:record failure ; 0:success */
|
||||
|
||||
@@ -115,7 +115,7 @@ arm_wince_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
static void
|
||||
arm_wince_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
|
||||
|
||||
windows_init_abi (info, gdbarch);
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ avr_register_type (struct gdbarch *gdbarch, int reg_nr)
|
||||
if (reg_nr == AVR_PC_REGNUM)
|
||||
return builtin_type (gdbarch)->builtin_uint32;
|
||||
|
||||
avr_gdbarch_tdep *tdep = (avr_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
avr_gdbarch_tdep *tdep = gdbarch_tdep<avr_gdbarch_tdep> (gdbarch);
|
||||
if (reg_nr == AVR_PSEUDO_PC_REGNUM)
|
||||
return tdep->pc_type;
|
||||
|
||||
@@ -750,7 +750,7 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
|
||||
gdb_assert (vpc < AVR_MAX_PROLOGUE_SIZE);
|
||||
|
||||
/* Handle static small stack allocation using rcall or push. */
|
||||
avr_gdbarch_tdep *tdep = (avr_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
avr_gdbarch_tdep *tdep = gdbarch_tdep<avr_gdbarch_tdep> (gdbarch);
|
||||
while (scan_stage == 1 && vpc < len)
|
||||
{
|
||||
insn = extract_unsigned_integer (&prologue[vpc], 2, byte_order);
|
||||
@@ -1053,7 +1053,7 @@ avr_frame_unwind_cache (struct frame_info *this_frame,
|
||||
|
||||
/* The previous frame's SP needed to be computed. Save the computed
|
||||
value. */
|
||||
avr_gdbarch_tdep *tdep = (avr_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
avr_gdbarch_tdep *tdep = gdbarch_tdep<avr_gdbarch_tdep> (gdbarch);
|
||||
info->saved_regs[AVR_SP_REGNUM].set_value (info->prev_sp
|
||||
- 1 + tdep->call_length);
|
||||
|
||||
@@ -1135,7 +1135,7 @@ avr_frame_prev_register (struct frame_info *this_frame,
|
||||
int i;
|
||||
gdb_byte buf[3];
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
avr_gdbarch_tdep *tdep = (avr_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
avr_gdbarch_tdep *tdep = gdbarch_tdep<avr_gdbarch_tdep> (gdbarch);
|
||||
|
||||
read_memory (info->saved_regs[AVR_PC_REGNUM].addr (),
|
||||
buf, tdep->call_length);
|
||||
@@ -1277,7 +1277,7 @@ avr_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
{
|
||||
int i;
|
||||
gdb_byte buf[3];
|
||||
avr_gdbarch_tdep *tdep = (avr_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
avr_gdbarch_tdep *tdep = gdbarch_tdep<avr_gdbarch_tdep> (gdbarch);
|
||||
int call_length = tdep->call_length;
|
||||
CORE_ADDR return_pc = avr_convert_iaddr_to_raw (bp_addr);
|
||||
int regnum = AVR_ARGN_REGNUM;
|
||||
@@ -1461,7 +1461,7 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
best_arch = gdbarch_list_lookup_by_info (best_arch->next, &info))
|
||||
{
|
||||
avr_gdbarch_tdep *tdep
|
||||
= (avr_gdbarch_tdep *) gdbarch_tdep (best_arch->gdbarch);
|
||||
= gdbarch_tdep<avr_gdbarch_tdep> (best_arch->gdbarch);
|
||||
|
||||
if (tdep->call_length == call_length)
|
||||
return best_arch->gdbarch;
|
||||
|
||||
@@ -766,7 +766,7 @@ bfin_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
|
||||
enum bfin_abi
|
||||
bfin_abi (struct gdbarch *gdbarch)
|
||||
{
|
||||
bfin_gdbarch_tdep *tdep = (bfin_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
bfin_gdbarch_tdep *tdep = gdbarch_tdep<bfin_gdbarch_tdep> (gdbarch);
|
||||
return tdep->bfin_abi;
|
||||
}
|
||||
|
||||
@@ -792,7 +792,7 @@ bfin_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||
{
|
||||
bfin_gdbarch_tdep *tdep
|
||||
= (bfin_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
||||
= gdbarch_tdep<bfin_gdbarch_tdep> (arches->gdbarch);
|
||||
|
||||
if (tdep->bfin_abi != abi)
|
||||
continue;
|
||||
|
||||
@@ -124,7 +124,8 @@ static void breakpoint_adjustment_warning (CORE_ADDR, CORE_ADDR, int, int);
|
||||
|
||||
static CORE_ADDR adjust_breakpoint_address (struct gdbarch *gdbarch,
|
||||
CORE_ADDR bpaddr,
|
||||
enum bptype bptype);
|
||||
enum bptype bptype,
|
||||
struct program_space *pspace);
|
||||
|
||||
static int watchpoint_locations_match (struct bp_location *loc1,
|
||||
struct bp_location *loc2);
|
||||
@@ -7103,8 +7104,11 @@ breakpoint_adjustment_warning (CORE_ADDR from_addr, CORE_ADDR to_addr,
|
||||
|
||||
static CORE_ADDR
|
||||
adjust_breakpoint_address (struct gdbarch *gdbarch,
|
||||
CORE_ADDR bpaddr, enum bptype bptype)
|
||||
CORE_ADDR bpaddr, enum bptype bptype,
|
||||
struct program_space *pspace)
|
||||
{
|
||||
gdb_assert (pspace != nullptr);
|
||||
|
||||
if (bptype == bp_watchpoint
|
||||
|| bptype == bp_hardware_watchpoint
|
||||
|| bptype == bp_read_watchpoint
|
||||
@@ -7129,11 +7133,18 @@ adjust_breakpoint_address (struct gdbarch *gdbarch,
|
||||
{
|
||||
CORE_ADDR adjusted_bpaddr = bpaddr;
|
||||
|
||||
/* Some targets have architectural constraints on the placement
|
||||
of breakpoint instructions. Obtain the adjusted address. */
|
||||
if (gdbarch_adjust_breakpoint_address_p (gdbarch))
|
||||
{
|
||||
/* Some targets have architectural constraints on the placement
|
||||
of breakpoint instructions. Obtain the adjusted address. */
|
||||
adjusted_bpaddr = gdbarch_adjust_breakpoint_address (gdbarch, bpaddr);
|
||||
/* Targets that implement this adjustment function will likely
|
||||
inspect either the symbol table, target memory at BPADDR, or
|
||||
even state registers, so ensure a suitable thread (and its
|
||||
associated program space) are currently selected. */
|
||||
scoped_restore_current_pspace_and_thread restore_pspace_thread;
|
||||
switch_to_program_space_and_thread (pspace);
|
||||
adjusted_bpaddr
|
||||
= gdbarch_adjust_breakpoint_address (gdbarch, bpaddr);
|
||||
}
|
||||
|
||||
adjusted_bpaddr = address_significant (gdbarch, adjusted_bpaddr);
|
||||
@@ -8087,7 +8098,8 @@ code_breakpoint::add_location (const symtab_and_line &sal)
|
||||
not want its scan of the location chain to find a breakpoint and
|
||||
location that's only been partially initialized. */
|
||||
adjusted_address = adjust_breakpoint_address (loc_gdbarch,
|
||||
sal.pc, type);
|
||||
sal.pc, type,
|
||||
sal.pspace);
|
||||
|
||||
/* Sort the locations by their ADDRESS. */
|
||||
new_loc = allocate_location ();
|
||||
@@ -10077,7 +10089,8 @@ watch_command_1 (const char *arg, int accessflag, int from_tty,
|
||||
scope_breakpoint->loc->address
|
||||
= adjust_breakpoint_address (scope_breakpoint->loc->gdbarch,
|
||||
scope_breakpoint->loc->requested_address,
|
||||
scope_breakpoint->type);
|
||||
scope_breakpoint->type,
|
||||
current_program_space);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
static void
|
||||
cris_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
|
||||
|
||||
linux_init_abi (info, gdbarch, 0);
|
||||
|
||||
|
||||
@@ -313,7 +313,7 @@ cris_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
|
||||
void **this_cache)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
struct cris_unwind_cache *info;
|
||||
CORE_ADDR addr;
|
||||
@@ -450,7 +450,7 @@ static int
|
||||
crisv32_single_step_through_delay (struct gdbarch *gdbarch,
|
||||
struct frame_info *this_frame)
|
||||
{
|
||||
cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
|
||||
ULONGEST erp;
|
||||
int ret = 0;
|
||||
|
||||
@@ -696,7 +696,7 @@ cris_frame_unwind_cache (struct frame_info *this_frame,
|
||||
void **this_prologue_cache)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
|
||||
struct cris_unwind_cache *info;
|
||||
|
||||
if ((*this_prologue_cache))
|
||||
@@ -1334,7 +1334,7 @@ crisv32_scan_prologue (CORE_ADDR pc, struct frame_info *this_frame,
|
||||
static CORE_ADDR
|
||||
cris_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
{
|
||||
cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
|
||||
CORE_ADDR func_addr, func_end;
|
||||
struct symtab_and_line sal;
|
||||
CORE_ADDR pc_after_prologue;
|
||||
@@ -1369,7 +1369,7 @@ cris_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
|
||||
static const gdb_byte *
|
||||
cris_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
|
||||
{
|
||||
cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
|
||||
static unsigned char break8_insn[] = {0x38, 0xe9};
|
||||
static unsigned char break15_insn[] = {0x3f, 0xe9};
|
||||
|
||||
@@ -1388,7 +1388,7 @@ static int
|
||||
cris_spec_reg_applicable (struct gdbarch *gdbarch,
|
||||
struct cris_spec_reg spec_reg)
|
||||
{
|
||||
cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
|
||||
unsigned int version = tdep->cris_version;
|
||||
|
||||
switch (spec_reg.applicable_version)
|
||||
@@ -3767,7 +3767,7 @@ cris_supply_gregset (const struct regset *regset, struct regcache *regcache,
|
||||
int regnum, const void *gregs, size_t len)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
|
||||
int i;
|
||||
const cris_elf_greg_t *regp = static_cast<const cris_elf_greg_t *>(gregs);
|
||||
|
||||
@@ -3861,7 +3861,7 @@ Makes GDB use the NRP register instead of the ERP register in certain cases."),
|
||||
static void
|
||||
cris_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
||||
{
|
||||
cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
|
||||
if (tdep != NULL)
|
||||
{
|
||||
gdb_printf (file, "cris_dump_tdep: tdep->cris_version = %i\n",
|
||||
@@ -3941,7 +3941,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||
{
|
||||
cris_gdbarch_tdep *tdep
|
||||
= (cris_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
||||
= gdbarch_tdep<cris_gdbarch_tdep> (arches->gdbarch);
|
||||
|
||||
if (tdep->cris_version == usr_cmd_cris_version
|
||||
&& tdep->cris_mode == usr_cmd_cris_mode
|
||||
|
||||
@@ -2518,7 +2518,11 @@ csky_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
||||
if (reggroup == save_reggroup || reggroup == restore_reggroup)
|
||||
return raw_p;
|
||||
|
||||
if (((regnum >= CSKY_R0_REGNUM) && (regnum <= CSKY_R0_REGNUM + 31))
|
||||
if ((((regnum >= CSKY_R0_REGNUM) && (regnum <= CSKY_R0_REGNUM + 31))
|
||||
|| (regnum == CSKY_PC_REGNUM)
|
||||
|| (regnum == CSKY_EPC_REGNUM)
|
||||
|| (regnum == CSKY_CR0_REGNUM)
|
||||
|| (regnum == CSKY_EPSR_REGNUM))
|
||||
&& (reggroup == general_reggroup))
|
||||
return 1;
|
||||
|
||||
@@ -2548,6 +2552,12 @@ csky_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
||||
&& (reggroup == fr_reggroup))
|
||||
return 6;
|
||||
|
||||
if (tdesc_has_registers (gdbarch_target_desc (gdbarch)))
|
||||
{
|
||||
if (tdesc_register_in_reggroup_p (gdbarch, regnum, reggroup) > 0)
|
||||
return 7;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2557,16 +2567,16 @@ static int
|
||||
csky_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dw_reg)
|
||||
{
|
||||
/* For GPRs. */
|
||||
if (dw_reg >= CSKY_R0_REGNUM && dw_reg <= (CSKY_R0_REGNUM + 31))
|
||||
if (dw_reg >= CSKY_R0_REGNUM && dw_reg <= CSKY_R0_REGNUM + 31)
|
||||
return dw_reg;
|
||||
|
||||
/* For Hi, Lo, PC. */
|
||||
if ((dw_reg == CSKY_HI_REGNUM) || (dw_reg == CSKY_LO_REGNUM)
|
||||
|| (dw_reg == CSKY_PC_REGNUM))
|
||||
if (dw_reg == CSKY_HI_REGNUM || dw_reg == CSKY_LO_REGNUM
|
||||
|| dw_reg == CSKY_PC_REGNUM)
|
||||
return dw_reg;
|
||||
|
||||
/* For Float and Vector pseudo registers. */
|
||||
if ((dw_reg >= FV_PSEUDO_REGNO_FIRST) && (dw_reg <= FV_PSEUDO_REGNO_LAST))
|
||||
if (dw_reg >= FV_PSEUDO_REGNO_FIRST && dw_reg <= FV_PSEUDO_REGNO_LAST)
|
||||
{
|
||||
char name_buf[4];
|
||||
|
||||
@@ -2674,7 +2684,7 @@ csky_pseudo_register_name (struct gdbarch *gdbarch, int regno)
|
||||
{
|
||||
int num_regs = gdbarch_num_regs (gdbarch);
|
||||
csky_gdbarch_tdep *tdep
|
||||
= (csky_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
= gdbarch_tdep<csky_gdbarch_tdep> (gdbarch);
|
||||
|
||||
regno -= num_regs;
|
||||
|
||||
@@ -2722,7 +2732,7 @@ csky_pseudo_register_read (struct gdbarch *gdbarch,
|
||||
{
|
||||
int num_regs = gdbarch_num_regs (gdbarch);
|
||||
csky_gdbarch_tdep *tdep
|
||||
= (csky_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
= gdbarch_tdep<csky_gdbarch_tdep> (gdbarch);
|
||||
|
||||
regnum -= num_regs;
|
||||
|
||||
@@ -2774,7 +2784,7 @@ csky_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
{
|
||||
int num_regs = gdbarch_num_regs (gdbarch);
|
||||
csky_gdbarch_tdep *tdep
|
||||
= (csky_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
= gdbarch_tdep<csky_gdbarch_tdep> (gdbarch);
|
||||
|
||||
regnum -= num_regs;
|
||||
|
||||
@@ -2902,7 +2912,7 @@ csky_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||
{
|
||||
csky_gdbarch_tdep *tdep
|
||||
= (csky_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
||||
= gdbarch_tdep<csky_gdbarch_tdep> (arches->gdbarch);
|
||||
if (fpu_abi != tdep->fpu_abi)
|
||||
continue;
|
||||
if (vdsp_version != tdep->vdsp_version)
|
||||
@@ -3020,6 +3030,8 @@ csky_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
set_gdbarch_num_regs (gdbarch, (num_regs + 1));
|
||||
tdesc_use_registers (gdbarch, info.target_desc, std::move (tdesc_data));
|
||||
set_gdbarch_register_type (gdbarch, csky_register_type);
|
||||
set_gdbarch_register_reggroup_p (gdbarch,
|
||||
csky_register_reggroup_p);
|
||||
}
|
||||
|
||||
if (tdep->fv_pseudo_registers_count)
|
||||
|
||||
@@ -93,7 +93,7 @@ struct frv_gdbarch_tdep : gdbarch_tdep
|
||||
enum frv_abi
|
||||
frv_abi (struct gdbarch *gdbarch)
|
||||
{
|
||||
frv_gdbarch_tdep *tdep = (frv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
frv_gdbarch_tdep *tdep = gdbarch_tdep<frv_gdbarch_tdep> (gdbarch);
|
||||
return tdep->frv_abi;
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ frv_register_name (struct gdbarch *gdbarch, int reg)
|
||||
if (reg >= frv_num_regs + frv_num_pseudo_regs)
|
||||
return "?toolarge?";
|
||||
|
||||
frv_gdbarch_tdep *tdep = (frv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
frv_gdbarch_tdep *tdep = gdbarch_tdep<frv_gdbarch_tdep> (gdbarch);
|
||||
return tdep->register_names[reg];
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ ft32_register_type (struct gdbarch *gdbarch, int reg_nr)
|
||||
{
|
||||
if (reg_nr == FT32_PC_REGNUM)
|
||||
{
|
||||
ft32_gdbarch_tdep *tdep = (ft32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ft32_gdbarch_tdep *tdep = gdbarch_tdep<ft32_gdbarch_tdep> (gdbarch);
|
||||
return tdep->pc_type;
|
||||
}
|
||||
else if (reg_nr == FT32_SP_REGNUM || reg_nr == FT32_FP_REGNUM)
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "infrun.h"
|
||||
#include "osabi.h"
|
||||
#include "displaced-stepping.h"
|
||||
#include "gdbsupport/gdb-checked-static-cast.h"
|
||||
|
||||
struct floatformat;
|
||||
struct ui_file;
|
||||
@@ -58,7 +59,14 @@ struct inferior;
|
||||
|
||||
#include "regcache.h"
|
||||
|
||||
struct gdbarch_tdep {};
|
||||
/* The base class for every architecture's tdep sub-class. The virtual
|
||||
destructor ensures the class has RTTI information, which allows
|
||||
gdb::checked_static_cast to be used, the gdbarch_tdep the function. */
|
||||
|
||||
struct gdbarch_tdep
|
||||
{
|
||||
virtual ~gdbarch_tdep() = default;
|
||||
};
|
||||
|
||||
/* The architecture associated with the inferior through the
|
||||
connection to the target.
|
||||
@@ -142,8 +150,23 @@ using read_core_file_mappings_loop_ftype =
|
||||
|
||||
#include "gdbarch-gen.h"
|
||||
|
||||
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
|
||||
/* An internal function that should _only_ be called from gdbarch_tdep.
|
||||
Returns the gdbarch_tdep field held within GDBARCH. */
|
||||
|
||||
extern struct gdbarch_tdep *gdbarch_tdep_1 (struct gdbarch *gdbarch);
|
||||
|
||||
/* Return the gdbarch_tdep object held within GDBARCH cast to the type
|
||||
TDepType, which should be a sub-class of gdbarch_tdep. There is no
|
||||
checking done that the gdbarch_tdep within GDBARCH actually is of the
|
||||
type TDepType, we just assume the caller knows what they are doing. */
|
||||
|
||||
template<typename TDepType>
|
||||
static inline TDepType *
|
||||
gdbarch_tdep (struct gdbarch *gdbarch)
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep_1 (gdbarch);
|
||||
return gdb::checked_static_cast<TDepType *> (tdep);
|
||||
}
|
||||
|
||||
/* Mechanism for co-ordinating the selection of a specific
|
||||
architecture.
|
||||
|
||||
@@ -118,7 +118,7 @@ hppabsd_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
|
||||
void
|
||||
hppabsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
hppa_gdbarch_tdep *tdep = gdbarch_tdep<hppa_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* OpenBSD and NetBSD have a 64-bit 'long double'. */
|
||||
set_gdbarch_long_double_bit (gdbarch, 64);
|
||||
|
||||
@@ -476,7 +476,7 @@ hppa_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||
void *cb_data,
|
||||
const struct regcache *regcache)
|
||||
{
|
||||
hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
hppa_gdbarch_tdep *tdep = gdbarch_tdep<hppa_gdbarch_tdep> (gdbarch);
|
||||
|
||||
cb (".reg", 80 * tdep->bytes_per_address, 80 * tdep->bytes_per_address,
|
||||
&hppa_linux_regset, NULL, cb_data);
|
||||
@@ -486,7 +486,7 @@ hppa_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||
static void
|
||||
hppa_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
hppa_gdbarch_tdep *tdep = gdbarch_tdep<hppa_gdbarch_tdep> (gdbarch);
|
||||
|
||||
linux_init_abi (info, gdbarch, 0);
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@ internalize_unwinds (struct objfile *objfile, struct unwind_table_entry *table,
|
||||
if (size > 0)
|
||||
{
|
||||
struct gdbarch *gdbarch = objfile->arch ();
|
||||
hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
hppa_gdbarch_tdep *tdep = gdbarch_tdep<hppa_gdbarch_tdep> (gdbarch);
|
||||
unsigned long tmp;
|
||||
unsigned i;
|
||||
char *buf = (char *) alloca (size);
|
||||
@@ -718,7 +718,7 @@ hppa32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
/* Global pointer (r19) of the function we are trying to call. */
|
||||
CORE_ADDR gp;
|
||||
|
||||
hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
hppa_gdbarch_tdep *tdep = gdbarch_tdep<hppa_gdbarch_tdep> (gdbarch);
|
||||
|
||||
for (write_pass = 0; write_pass < 2; write_pass++)
|
||||
{
|
||||
@@ -955,7 +955,7 @@ hppa64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
hppa_gdbarch_tdep *tdep = gdbarch_tdep<hppa_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int i, offset = 0;
|
||||
CORE_ADDR gp;
|
||||
@@ -2241,7 +2241,7 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache)
|
||||
}
|
||||
|
||||
{
|
||||
hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
hppa_gdbarch_tdep *tdep = gdbarch_tdep<hppa_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->unwind_adjust_stub)
|
||||
tdep->unwind_adjust_stub (this_frame, cache->base, cache->saved_regs);
|
||||
@@ -2471,7 +2471,7 @@ hppa_stub_unwind_sniffer (const struct frame_unwind *self,
|
||||
{
|
||||
CORE_ADDR pc = get_frame_address_in_block (this_frame);
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
hppa_gdbarch_tdep *tdep = gdbarch_tdep<hppa_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (pc == 0
|
||||
|| (tdep->in_solib_call_trampoline != NULL
|
||||
@@ -3147,7 +3147,7 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
static void
|
||||
hppa_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
||||
{
|
||||
hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
hppa_gdbarch_tdep *tdep = gdbarch_tdep<hppa_gdbarch_tdep> (gdbarch);
|
||||
|
||||
gdb_printf (file, "bytes_per_address = %d\n",
|
||||
tdep->bytes_per_address);
|
||||
|
||||
@@ -74,7 +74,7 @@ int i386bsd_sc_reg_offset[] =
|
||||
void
|
||||
i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
tdep->jb_pc_offset = 0;
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ i386_darwin_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
gdb_byte buf[4];
|
||||
int i;
|
||||
@@ -248,7 +248,7 @@ i386_darwin_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
static void
|
||||
i386_darwin_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* We support the SSE registers. */
|
||||
tdep->num_xmm_regs = I386_NUM_XREGS - 1;
|
||||
|
||||
@@ -325,7 +325,7 @@ i386fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||
void *cb_data,
|
||||
const struct regcache *regcache)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
cb (".reg", I386_FBSD_SIZEOF_GREGSET, I386_FBSD_SIZEOF_GREGSET,
|
||||
&i386_fbsd_gregset, NULL, cb_data);
|
||||
@@ -365,7 +365,7 @@ i386fbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
|
||||
static void
|
||||
i386fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Generic FreeBSD support. */
|
||||
fbsd_init_abi (info, gdbarch);
|
||||
|
||||
@@ -173,7 +173,7 @@ static int i386gnu_gregset_reg_offset[] =
|
||||
static void
|
||||
i386gnu_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* GNU uses ELF. */
|
||||
i386_elf_init_abi (info, gdbarch);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
static void
|
||||
i386_go32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* DJGPP doesn't have any special frames for signal handlers. */
|
||||
tdep->sigtramp_p = NULL;
|
||||
|
||||
@@ -763,7 +763,7 @@ i386_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||
void *cb_data,
|
||||
const struct regcache *regcache)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
cb (".reg", 68, 68, &i386_gregset, NULL, cb_data);
|
||||
|
||||
@@ -825,7 +825,7 @@ i386_linux_displaced_step_copy_insn (struct gdbarch *gdbarch,
|
||||
static void
|
||||
i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
const struct target_desc *tdesc = info.target_desc;
|
||||
struct tdesc_arch_data *tdesc_data = info.tdesc_data;
|
||||
const struct tdesc_feature *feature;
|
||||
|
||||
@@ -372,7 +372,7 @@ i386nbsd_sigtramp_cache_init (const struct tramp_frame *self,
|
||||
static void
|
||||
i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Obviously NetBSD is BSD-based. */
|
||||
i386bsd_init_abi (info, gdbarch);
|
||||
@@ -407,7 +407,7 @@ i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
static void
|
||||
i386nbsdelf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* It's still NetBSD. */
|
||||
i386nbsd_init_abi (info, gdbarch);
|
||||
|
||||
@@ -77,7 +77,7 @@ static void
|
||||
i386nto_supply_gregset (struct regcache *regcache, char *gpregs)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
gdb_assert (tdep->gregset_reg_offset == i386nto_gregset_reg_offset);
|
||||
i386_gregset.supply_regset (&i386_gregset, regcache, -1,
|
||||
@@ -126,7 +126,7 @@ static int
|
||||
i386nto_register_area (struct gdbarch *gdbarch,
|
||||
int regno, int regset, unsigned *off)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
*off = 0;
|
||||
if (regset == NTO_REG_GENERAL)
|
||||
@@ -315,7 +315,7 @@ init_i386nto_ops (void)
|
||||
static void
|
||||
i386nto_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
static struct target_so_ops nto_svr4_so_ops;
|
||||
|
||||
/* Deal with our strange signals. */
|
||||
|
||||
@@ -407,7 +407,7 @@ static const struct frame_unwind i386obsd_trapframe_unwind = {
|
||||
static void
|
||||
i386obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Obviously OpenBSD is BSD-based. */
|
||||
i386bsd_init_abi (info, gdbarch);
|
||||
|
||||
@@ -65,7 +65,7 @@ i386_sol2_mcontext_addr (struct frame_info *this_frame)
|
||||
static void
|
||||
i386_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Solaris is SVR4-based. */
|
||||
i386_svr4_init_abi (info, gdbarch);
|
||||
|
||||
@@ -169,7 +169,7 @@ const int num_lower_zmm_regs = 16;
|
||||
static int
|
||||
i386_mmx_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int mm0_regnum = tdep->mm0_regnum;
|
||||
|
||||
if (mm0_regnum < 0)
|
||||
@@ -184,7 +184,7 @@ i386_mmx_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
int
|
||||
i386_byte_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
regnum -= tdep->al_regnum;
|
||||
return regnum >= 0 && regnum < tdep->num_byte_regs;
|
||||
@@ -195,7 +195,7 @@ i386_byte_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
int
|
||||
i386_word_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
regnum -= tdep->ax_regnum;
|
||||
return regnum >= 0 && regnum < tdep->num_word_regs;
|
||||
@@ -206,7 +206,7 @@ i386_word_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
int
|
||||
i386_dword_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int eax_regnum = tdep->eax_regnum;
|
||||
|
||||
if (eax_regnum < 0)
|
||||
@@ -221,7 +221,7 @@ i386_dword_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
int
|
||||
i386_zmmh_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int zmm0h_regnum = tdep->zmm0h_regnum;
|
||||
|
||||
if (zmm0h_regnum < 0)
|
||||
@@ -234,7 +234,7 @@ i386_zmmh_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
int
|
||||
i386_zmm_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int zmm0_regnum = tdep->zmm0_regnum;
|
||||
|
||||
if (zmm0_regnum < 0)
|
||||
@@ -247,7 +247,7 @@ i386_zmm_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
int
|
||||
i386_k_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int k0_regnum = tdep->k0_regnum;
|
||||
|
||||
if (k0_regnum < 0)
|
||||
@@ -260,7 +260,7 @@ i386_k_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
static int
|
||||
i386_ymmh_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int ymm0h_regnum = tdep->ymm0h_regnum;
|
||||
|
||||
if (ymm0h_regnum < 0)
|
||||
@@ -275,7 +275,7 @@ i386_ymmh_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
int
|
||||
i386_ymm_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int ymm0_regnum = tdep->ymm0_regnum;
|
||||
|
||||
if (ymm0_regnum < 0)
|
||||
@@ -288,7 +288,7 @@ i386_ymm_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
static int
|
||||
i386_ymmh_avx512_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int ymm16h_regnum = tdep->ymm16h_regnum;
|
||||
|
||||
if (ymm16h_regnum < 0)
|
||||
@@ -301,7 +301,7 @@ i386_ymmh_avx512_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
int
|
||||
i386_ymm_avx512_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int ymm16_regnum = tdep->ymm16_regnum;
|
||||
|
||||
if (ymm16_regnum < 0)
|
||||
@@ -316,7 +316,7 @@ i386_ymm_avx512_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
int
|
||||
i386_bnd_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int bnd0_regnum = tdep->bnd0_regnum;
|
||||
|
||||
if (bnd0_regnum < 0)
|
||||
@@ -331,7 +331,7 @@ i386_bnd_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
int
|
||||
i386_xmm_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int num_xmm_regs = I387_NUM_XMM_REGS (tdep);
|
||||
|
||||
if (num_xmm_regs == 0)
|
||||
@@ -346,7 +346,7 @@ i386_xmm_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
int
|
||||
i386_xmm_avx512_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int num_xmm_avx512_regs = I387_NUM_XMM_AVX512_REGS (tdep);
|
||||
|
||||
if (num_xmm_avx512_regs == 0)
|
||||
@@ -359,7 +359,7 @@ i386_xmm_avx512_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
static int
|
||||
i386_mxcsr_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (I387_NUM_XMM_REGS (tdep) == 0)
|
||||
return 0;
|
||||
@@ -372,7 +372,7 @@ i386_mxcsr_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
int
|
||||
i386_fp_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (I387_ST0_REGNUM (tdep) < 0)
|
||||
return 0;
|
||||
@@ -384,7 +384,7 @@ i386_fp_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
int
|
||||
i386_fpc_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (I387_ST0_REGNUM (tdep) < 0)
|
||||
return 0;
|
||||
@@ -398,7 +398,7 @@ i386_fpc_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
static int
|
||||
i386_bndr_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (I387_BND0R_REGNUM (tdep) < 0)
|
||||
return 0;
|
||||
@@ -412,7 +412,7 @@ i386_bndr_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
static int
|
||||
i386_mpx_ctrl_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (I387_BNDCFGU_REGNUM (tdep) < 0)
|
||||
return 0;
|
||||
@@ -426,7 +426,7 @@ i386_mpx_ctrl_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
bool
|
||||
i386_pkru_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int pkru_regnum = tdep->pkru_regnum;
|
||||
|
||||
if (pkru_regnum < 0)
|
||||
@@ -462,7 +462,7 @@ i386_register_name (struct gdbarch *gdbarch, int regnum)
|
||||
const char *
|
||||
i386_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
if (i386_bnd_regnum_p (gdbarch, regnum))
|
||||
return i386_bnd_names[regnum - tdep->bnd0_regnum];
|
||||
if (i386_mmx_regnum_p (gdbarch, regnum))
|
||||
@@ -485,7 +485,7 @@ i386_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
|
||||
static int
|
||||
i386_dbx_reg_to_regnum (struct gdbarch *gdbarch, int reg)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* This implements what GCC calls the "default" register map
|
||||
(dbx_register_map[]). */
|
||||
@@ -532,7 +532,7 @@ i386_dbx_reg_to_regnum (struct gdbarch *gdbarch, int reg)
|
||||
static int
|
||||
i386_svr4_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* This implements the GCC register map that tries to be compatible
|
||||
with the SVR4 C compiler for DWARF (svr4_dbx_register_map[]). */
|
||||
@@ -2434,7 +2434,7 @@ static struct i386_frame_cache *
|
||||
i386_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
struct i386_frame_cache *cache;
|
||||
CORE_ADDR addr;
|
||||
@@ -2524,7 +2524,7 @@ i386_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
void **this_prologue_cache)
|
||||
{
|
||||
gdbarch *arch = get_frame_arch (this_frame);
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
|
||||
|
||||
/* We shouldn't even bother if we don't have a sigcontext_addr
|
||||
handler. */
|
||||
@@ -2611,7 +2611,7 @@ i386_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
|
||||
CORE_ADDR sp, jb_addr;
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int jb_pc_offset = tdep->jb_pc_offset;
|
||||
|
||||
/* If JB_PC_OFFSET is -1, we have no way to find out where the
|
||||
@@ -2860,7 +2860,7 @@ static void
|
||||
i386_extract_return_value (struct gdbarch *gdbarch, struct type *type,
|
||||
struct regcache *regcache, gdb_byte *valbuf)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int len = TYPE_LENGTH (type);
|
||||
gdb_byte buf[I386_MAX_REGISTER_SIZE];
|
||||
|
||||
@@ -2918,7 +2918,7 @@ static void
|
||||
i386_store_return_value (struct gdbarch *gdbarch, struct type *type,
|
||||
struct regcache *regcache, const gdb_byte *valbuf)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int len = TYPE_LENGTH (type);
|
||||
|
||||
if (type->code () == TYPE_CODE_FLT)
|
||||
@@ -2997,7 +2997,7 @@ static const char *struct_convention = default_struct_convention;
|
||||
static int
|
||||
i386_reg_struct_return_p (struct gdbarch *gdbarch, struct type *type)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
enum type_code code = type->code ();
|
||||
int len = TYPE_LENGTH (type);
|
||||
|
||||
@@ -3099,7 +3099,7 @@ i386_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||
struct type *
|
||||
i387_ext_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (!tdep->i387_ext_type)
|
||||
{
|
||||
@@ -3117,7 +3117,7 @@ i387_ext_type (struct gdbarch *gdbarch)
|
||||
static struct type *
|
||||
i386_bnd_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
|
||||
if (!tdep->i386_bnd_type)
|
||||
@@ -3153,7 +3153,7 @@ i386_bnd_type (struct gdbarch *gdbarch)
|
||||
static struct type *
|
||||
i386_zmm_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (!tdep->i386_zmm_type)
|
||||
{
|
||||
@@ -3212,7 +3212,7 @@ i386_zmm_type (struct gdbarch *gdbarch)
|
||||
static struct type *
|
||||
i386_ymm_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (!tdep->i386_ymm_type)
|
||||
{
|
||||
@@ -3269,7 +3269,7 @@ i386_ymm_type (struct gdbarch *gdbarch)
|
||||
static struct type *
|
||||
i386_mmx_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (!tdep->i386_mmx_type)
|
||||
{
|
||||
@@ -3346,7 +3346,7 @@ static int
|
||||
i386_mmx_regnum_to_fp_regnum (readable_regcache *regcache, int regnum)
|
||||
{
|
||||
gdbarch *arch = regcache->arch ();
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
|
||||
int mmxreg, fpreg;
|
||||
ULONGEST fstat;
|
||||
int tos;
|
||||
@@ -3387,7 +3387,7 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch,
|
||||
}
|
||||
else
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
if (i386_bnd_regnum_p (gdbarch, regnum))
|
||||
{
|
||||
regnum -= tdep->bnd0_regnum;
|
||||
@@ -3577,7 +3577,7 @@ i386_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
}
|
||||
else
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (i386_bnd_regnum_p (gdbarch, regnum))
|
||||
{
|
||||
@@ -3685,7 +3685,7 @@ int
|
||||
i386_ax_pseudo_register_collect (struct gdbarch *gdbarch,
|
||||
struct agent_expr *ax, int regnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (i386_mmx_regnum_p (gdbarch, regnum))
|
||||
{
|
||||
@@ -3902,7 +3902,7 @@ i386_supply_gregset (const struct regset *regset, struct regcache *regcache,
|
||||
int regnum, const void *gregs, size_t len)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
const gdb_byte *regs = (const gdb_byte *) gregs;
|
||||
int i;
|
||||
|
||||
@@ -3927,7 +3927,7 @@ i386_collect_gregset (const struct regset *regset,
|
||||
int regnum, void *gregs, size_t len)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
gdb_byte *regs = (gdb_byte *) gregs;
|
||||
int i;
|
||||
|
||||
@@ -3950,7 +3950,7 @@ i386_supply_fpregset (const struct regset *regset, struct regcache *regcache,
|
||||
int regnum, const void *fpregs, size_t len)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (len == I387_SIZEOF_FXSAVE)
|
||||
{
|
||||
@@ -3973,7 +3973,7 @@ i386_collect_fpregset (const struct regset *regset,
|
||||
int regnum, void *fpregs, size_t len)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (len == I387_SIZEOF_FXSAVE)
|
||||
{
|
||||
@@ -4005,7 +4005,7 @@ i386_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||
void *cb_data,
|
||||
const struct regcache *regcache)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
cb (".reg", tdep->sizeof_gregset, tdep->sizeof_gregset, &i386_gregset, NULL,
|
||||
cb_data);
|
||||
@@ -4510,7 +4510,7 @@ i386_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
void
|
||||
i386_svr4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* System V Release 4 uses ELF. */
|
||||
i386_elf_init_abi (info, gdbarch);
|
||||
@@ -4552,7 +4552,7 @@ int
|
||||
i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
||||
const struct reggroup *group)
|
||||
{
|
||||
const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int fp_regnum_p, mmx_regnum_p, xmm_regnum_p, mxcsr_regnum_p,
|
||||
ymm_regnum_p, ymmh_regnum_p, ymm_avx512_regnum_p, ymmh_avx512_regnum_p,
|
||||
bndr_regnum_p, bnd_regnum_p, zmm_regnum_p, zmmh_regnum_p,
|
||||
@@ -4997,7 +4997,7 @@ static int i386_record_floats (struct gdbarch *gdbarch,
|
||||
struct i386_record_s *ir,
|
||||
uint32_t iregnum)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
int i;
|
||||
|
||||
/* Oza: Because of floating point insn push/pop of fpu stack is going to
|
||||
@@ -5068,7 +5068,7 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
ULONGEST addr;
|
||||
gdb_byte buf[I386_MAX_REGISTER_SIZE];
|
||||
struct i386_record_s ir;
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
uint8_t rex_w = -1;
|
||||
uint8_t rex_r = 0;
|
||||
|
||||
@@ -8839,7 +8839,7 @@ i386_mpx_bd_base (void)
|
||||
|
||||
rcache = get_current_regcache ();
|
||||
gdbarch *arch = rcache->arch ();
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
|
||||
|
||||
regstatus = regcache_raw_read_unsigned (rcache, tdep->bndcfgu_regnum, &ret);
|
||||
|
||||
@@ -8853,7 +8853,7 @@ int
|
||||
i386_mpx_enabled (void)
|
||||
{
|
||||
gdbarch *arch = get_current_arch ();
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
|
||||
const struct target_desc *tdesc = tdep->tdesc;
|
||||
|
||||
return (tdesc_find_feature (tdesc, "org.gnu.gdb.i386.mpx") != NULL);
|
||||
|
||||
@@ -136,7 +136,7 @@ i386_windows_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
static void
|
||||
i386_windows_init_abi_common (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
set_gdbarch_skip_trampoline_code (gdbarch, i386_windows_skip_trampoline_code);
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ void
|
||||
i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
|
||||
struct frame_info *frame, const char *args)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
ULONGEST fctrl;
|
||||
int fctrl_p;
|
||||
ULONGEST fstat;
|
||||
@@ -440,7 +440,7 @@ void
|
||||
i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
const gdb_byte *regs = (const gdb_byte *) fsave;
|
||||
int i;
|
||||
@@ -495,7 +495,7 @@ void
|
||||
i387_collect_fsave (const struct regcache *regcache, int regnum, void *fsave)
|
||||
{
|
||||
gdbarch *arch = regcache->arch ();
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
|
||||
gdb_byte *regs = (gdb_byte *) fsave;
|
||||
int i;
|
||||
|
||||
@@ -589,7 +589,7 @@ void
|
||||
i387_supply_fxsave (struct regcache *regcache, int regnum, const void *fxsave)
|
||||
{
|
||||
gdbarch *arch = regcache->arch ();
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
|
||||
const gdb_byte *regs = (const gdb_byte *) fxsave;
|
||||
int i;
|
||||
|
||||
@@ -673,7 +673,7 @@ void
|
||||
i387_collect_fxsave (const struct regcache *regcache, int regnum, void *fxsave)
|
||||
{
|
||||
gdbarch *arch = regcache->arch ();
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
|
||||
gdb_byte *regs = (gdb_byte *) fxsave;
|
||||
int i;
|
||||
|
||||
@@ -906,7 +906,7 @@ i387_xsave_get_clear_bv (struct gdbarch *gdbarch, const void *xsave)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
const gdb_byte *regs = (const gdb_byte *) xsave;
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Get `xstat_bv'. The supported bits in `xstat_bv' are 8 bytes. */
|
||||
ULONGEST xstate_bv = extract_unsigned_integer (XSAVE_XSTATE_BV_ADDR (regs),
|
||||
@@ -926,7 +926,7 @@ i387_supply_xsave (struct regcache *regcache, int regnum,
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
const gdb_byte *regs = (const gdb_byte *) xsave;
|
||||
int i;
|
||||
/* In 64-bit mode the split between "low" and "high" ZMM registers is at
|
||||
@@ -1349,7 +1349,7 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
gdb_byte *p, *regs = (gdb_byte *) xsave;
|
||||
gdb_byte raw[I386_MAX_REGISTER_SIZE];
|
||||
ULONGEST initial_xstate_bv, clear_bv, xstate_bv = 0;
|
||||
@@ -1934,7 +1934,7 @@ i387_tag (const gdb_byte *raw)
|
||||
void
|
||||
i387_return_value (struct gdbarch *gdbarch, struct regcache *regcache)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
ULONGEST fstat;
|
||||
|
||||
/* Set the top of the floating-point register stack to 7. The
|
||||
@@ -1957,7 +1957,7 @@ i387_return_value (struct gdbarch *gdbarch, struct regcache *regcache)
|
||||
void
|
||||
i387_reset_bnd_regs (struct gdbarch *gdbarch, struct regcache *regcache)
|
||||
{
|
||||
i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (I387_BND0R_REGNUM (tdep) > 0)
|
||||
{
|
||||
|
||||
@@ -216,7 +216,7 @@ ia64_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||
static void
|
||||
ia64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
ia64_gdbarch_tdep *tdep = (ia64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ia64_gdbarch_tdep *tdep = gdbarch_tdep<ia64_gdbarch_tdep> (gdbarch);
|
||||
static const char *const stap_register_prefixes[] = { "r", NULL };
|
||||
static const char *const stap_register_indirection_prefixes[] = { "[",
|
||||
NULL };
|
||||
|
||||
@@ -310,7 +310,7 @@ static const struct floatformat *floatformats_ia64_ext[2] =
|
||||
static struct type *
|
||||
ia64_ext_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
ia64_gdbarch_tdep *tdep = (ia64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ia64_gdbarch_tdep *tdep = gdbarch_tdep<ia64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (!tdep->ia64_ext_type)
|
||||
tdep->ia64_ext_type
|
||||
@@ -2177,7 +2177,7 @@ ia64_sigtramp_frame_init_saved_regs (struct frame_info *this_frame,
|
||||
struct ia64_frame_cache *cache)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
ia64_gdbarch_tdep *tdep = (ia64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ia64_gdbarch_tdep *tdep = gdbarch_tdep<ia64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->sigcontext_register_address)
|
||||
{
|
||||
@@ -2336,7 +2336,7 @@ ia64_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
void **this_cache)
|
||||
{
|
||||
gdbarch *arch = get_frame_arch (this_frame);
|
||||
ia64_gdbarch_tdep *tdep = (ia64_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
ia64_gdbarch_tdep *tdep = gdbarch_tdep<ia64_gdbarch_tdep> (arch);
|
||||
if (tdep->pc_in_sigtramp)
|
||||
{
|
||||
CORE_ADDR pc = get_frame_pc (this_frame);
|
||||
@@ -2485,7 +2485,7 @@ ia64_access_reg (unw_addr_space_t as, unw_regnum_t uw_regnum, unw_word_t *val,
|
||||
unw_word_t bsp, sof, cfm, psr, ip;
|
||||
struct frame_info *this_frame = (struct frame_info *) arg;
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
ia64_gdbarch_tdep *tdep = (ia64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ia64_gdbarch_tdep *tdep = gdbarch_tdep<ia64_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* We never call any libunwind routines that need to write registers. */
|
||||
gdb_assert (!write);
|
||||
@@ -3485,7 +3485,7 @@ ia64_find_global_pointer_from_dynamic_section (struct gdbarch *gdbarch,
|
||||
static CORE_ADDR
|
||||
ia64_find_global_pointer (struct gdbarch *gdbarch, CORE_ADDR faddr)
|
||||
{
|
||||
ia64_gdbarch_tdep *tdep = (ia64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ia64_gdbarch_tdep *tdep = gdbarch_tdep<ia64_gdbarch_tdep> (gdbarch);
|
||||
CORE_ADDR addr = 0;
|
||||
|
||||
if (tdep->find_global_pointer_from_solib)
|
||||
@@ -3680,7 +3680,7 @@ ia64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
ia64_gdbarch_tdep *tdep = (ia64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ia64_gdbarch_tdep *tdep = gdbarch_tdep<ia64_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int argno;
|
||||
struct value *arg;
|
||||
|
||||
@@ -255,7 +255,7 @@ loongarch_linux_syscall_next_pc (struct frame_info *frame)
|
||||
static void
|
||||
loongarch_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
loongarch_gdbarch_tdep *tdep = (loongarch_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
loongarch_gdbarch_tdep *tdep = gdbarch_tdep<loongarch_gdbarch_tdep> (gdbarch);
|
||||
|
||||
linux_init_abi (info, gdbarch, 0);
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ static CORE_ADDR
|
||||
loongarch_next_pc (struct regcache *regcache, CORE_ADDR cur_pc)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
loongarch_gdbarch_tdep *tdep = (loongarch_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
loongarch_gdbarch_tdep *tdep = gdbarch_tdep<loongarch_gdbarch_tdep> (gdbarch);
|
||||
insn_t insn = loongarch_fetch_instruction (cur_pc);
|
||||
size_t insn_len = loongarch_insn_length (insn);
|
||||
CORE_ADDR next_pc = cur_pc + insn_len;
|
||||
@@ -1237,7 +1237,7 @@ loongarch_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
we are looking for. If it doesn't then we can't reuse this
|
||||
gdbarch. */
|
||||
loongarch_gdbarch_tdep *candidate_tdep
|
||||
= (loongarch_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
||||
= gdbarch_tdep<loongarch_gdbarch_tdep> (arches->gdbarch);
|
||||
|
||||
if (candidate_tdep->abi_features != abi_features)
|
||||
continue;
|
||||
|
||||
@@ -142,7 +142,7 @@ struct m32c_gdbarch_tdep : gdbarch_tdep
|
||||
static void
|
||||
make_types (struct gdbarch *arch)
|
||||
{
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
unsigned long mach = gdbarch_bfd_arch_info (arch)->mach;
|
||||
int data_addr_reg_bits, code_addr_reg_bits;
|
||||
char type_name[50];
|
||||
@@ -215,7 +215,7 @@ make_types (struct gdbarch *arch)
|
||||
static const char *
|
||||
m32c_register_name (struct gdbarch *gdbarch, int num)
|
||||
{
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (gdbarch);
|
||||
return tdep->regs[num].name;
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ m32c_register_name (struct gdbarch *gdbarch, int num)
|
||||
static struct type *
|
||||
m32c_register_type (struct gdbarch *arch, int reg_nr)
|
||||
{
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
return tdep->regs[reg_nr].type;
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ m32c_register_type (struct gdbarch *arch, int reg_nr)
|
||||
static int
|
||||
m32c_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
|
||||
{
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (gdbarch);
|
||||
return tdep->regs[reg_nr].sim_num;
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ m32c_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
|
||||
static int
|
||||
m32c_debug_info_reg_to_regnum (struct gdbarch *gdbarch, int reg_nr)
|
||||
{
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (gdbarch);
|
||||
if (0 <= reg_nr && reg_nr <= M32C_MAX_DWARF_REGNUM
|
||||
&& tdep->dwarf_regs[reg_nr])
|
||||
return tdep->dwarf_regs[reg_nr]->num;
|
||||
@@ -254,7 +254,7 @@ static int
|
||||
m32c_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
||||
const struct reggroup *group)
|
||||
{
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (gdbarch);
|
||||
struct m32c_reg *reg = &tdep->regs[regnum];
|
||||
|
||||
/* The anonymous raw registers aren't in any groups. */
|
||||
@@ -330,7 +330,7 @@ static int
|
||||
m32c_read_flg (readable_regcache *cache)
|
||||
{
|
||||
gdbarch *arch = cache->arch ();
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
ULONGEST flg;
|
||||
|
||||
cache->raw_read (tdep->flg->num, &flg);
|
||||
@@ -530,7 +530,7 @@ static enum register_status
|
||||
m32c_r3r2r1r0_read (struct m32c_reg *reg, readable_regcache *cache, gdb_byte *buf)
|
||||
{
|
||||
gdbarch *arch = reg->arch;
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
int len = TYPE_LENGTH (tdep->r0->type);
|
||||
enum register_status status;
|
||||
|
||||
@@ -567,7 +567,7 @@ m32c_r3r2r1r0_write (struct m32c_reg *reg, struct regcache *cache,
|
||||
const gdb_byte *buf)
|
||||
{
|
||||
gdbarch *arch = reg->arch;
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
int len = TYPE_LENGTH (tdep->r0->type);
|
||||
|
||||
if (gdbarch_byte_order (reg->arch) == BFD_ENDIAN_BIG)
|
||||
@@ -595,7 +595,7 @@ m32c_pseudo_register_read (struct gdbarch *arch,
|
||||
int cookednum,
|
||||
gdb_byte *buf)
|
||||
{
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
struct m32c_reg *reg;
|
||||
|
||||
gdb_assert (0 <= cookednum && cookednum < tdep->num_regs);
|
||||
@@ -613,7 +613,7 @@ m32c_pseudo_register_write (struct gdbarch *arch,
|
||||
int cookednum,
|
||||
const gdb_byte *buf)
|
||||
{
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
struct m32c_reg *reg;
|
||||
|
||||
gdb_assert (0 <= cookednum && cookednum < tdep->num_regs);
|
||||
@@ -638,7 +638,7 @@ add_reg (struct gdbarch *arch,
|
||||
struct m32c_reg *ry,
|
||||
int n)
|
||||
{
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
struct m32c_reg *r = &tdep->regs[tdep->num_regs];
|
||||
|
||||
gdb_assert (tdep->num_regs < M32C_MAX_NUM_REGS);
|
||||
@@ -678,7 +678,7 @@ set_dwarf_regnum (struct m32c_reg *reg, int num)
|
||||
|
||||
/* Update the DWARF->reg mapping. */
|
||||
gdbarch *arch = reg->arch;
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
tdep->dwarf_regs[num] = reg;
|
||||
}
|
||||
|
||||
@@ -800,7 +800,7 @@ mark_save_restore (struct m32c_reg *reg)
|
||||
static void
|
||||
make_regs (struct gdbarch *arch)
|
||||
{
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
int mach = gdbarch_bfd_arch_info (arch)->mach;
|
||||
int num_raw_regs;
|
||||
int num_cooked_regs;
|
||||
@@ -1349,7 +1349,7 @@ m32c_pv_enter (struct m32c_pv_state *state, int size)
|
||||
return 1;
|
||||
|
||||
gdbarch *arch = state->arch;
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
if (m32c_pv_push (state, state->fb, tdep->push_addr_bytes))
|
||||
return 1;
|
||||
|
||||
@@ -1379,7 +1379,7 @@ static int
|
||||
m32c_pv_pushm (struct m32c_pv_state *state, int src)
|
||||
{
|
||||
gdbarch *arch = state->arch;
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
|
||||
/* The bits in SRC indicating which registers to save are:
|
||||
r0 r1 r2 r3 a0 a1 sb fb */
|
||||
@@ -1400,7 +1400,7 @@ static int
|
||||
m32c_is_1st_arg_reg (struct m32c_pv_state *state, pv_t value)
|
||||
{
|
||||
gdbarch *arch = state->arch;
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
|
||||
return (value.kind == pvk_register
|
||||
&& (gdbarch_bfd_arch_info (state->arch)->mach == bfd_mach_m16c
|
||||
@@ -1415,7 +1415,7 @@ static int
|
||||
m32c_is_arg_reg (struct m32c_pv_state *state, pv_t value)
|
||||
{
|
||||
gdbarch *arch = state->arch;
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
|
||||
return (value.kind == pvk_register
|
||||
&& (gdbarch_bfd_arch_info (state->arch)->mach == bfd_mach_m16c
|
||||
@@ -1440,7 +1440,7 @@ m32c_is_arg_spill (struct m32c_pv_state *st,
|
||||
pv_t value)
|
||||
{
|
||||
gdbarch *arch = st->arch;
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
|
||||
return (m32c_is_arg_reg (st, value)
|
||||
&& loc.kind == srcdest_mem
|
||||
@@ -1464,7 +1464,7 @@ m32c_is_struct_return (struct m32c_pv_state *st,
|
||||
pv_t value)
|
||||
{
|
||||
gdbarch *arch = st->arch;
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
|
||||
return (m32c_is_1st_arg_reg (st, value)
|
||||
&& !st->stack->find_reg (st->arch, value.reg, 0)
|
||||
@@ -1482,7 +1482,7 @@ static int
|
||||
m32c_pushm_is_reg_save (struct m32c_pv_state *st, int src)
|
||||
{
|
||||
gdbarch *arch = st->arch;
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
|
||||
/* The bits in SRC indicating which registers to save are:
|
||||
r0 r1 r2 r3 a0 a1 sb fb */
|
||||
@@ -1510,7 +1510,7 @@ check_for_saved (void *prologue_untyped, pv_t addr, CORE_ADDR size, pv_t value)
|
||||
{
|
||||
struct m32c_prologue *prologue = (struct m32c_prologue *) prologue_untyped;
|
||||
struct gdbarch *arch = prologue->arch;
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
|
||||
/* Is this the unchanged value of some register being saved on the
|
||||
stack? */
|
||||
@@ -1550,7 +1550,7 @@ m32c_analyze_prologue (struct gdbarch *arch,
|
||||
CORE_ADDR start, CORE_ADDR limit,
|
||||
struct m32c_prologue *prologue)
|
||||
{
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
unsigned long mach = gdbarch_bfd_arch_info (arch)->mach;
|
||||
CORE_ADDR after_last_frame_related_insn;
|
||||
struct m32c_pv_state st;
|
||||
@@ -1881,7 +1881,7 @@ m32c_frame_base (struct frame_info *this_frame,
|
||||
struct m32c_prologue *p
|
||||
= m32c_analyze_frame_prologue (this_frame, this_prologue_cache);
|
||||
gdbarch *arch = get_frame_arch (this_frame);
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
|
||||
/* In functions that use alloca, the distance between the stack
|
||||
pointer and the frame base varies dynamically, so we can't use
|
||||
@@ -1932,7 +1932,7 @@ m32c_prev_register (struct frame_info *this_frame,
|
||||
void **this_prologue_cache, int regnum)
|
||||
{
|
||||
gdbarch *arch = get_frame_arch (this_frame);
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
|
||||
struct m32c_prologue *p
|
||||
= m32c_analyze_frame_prologue (this_frame, this_prologue_cache);
|
||||
CORE_ADDR frame_base = m32c_frame_base (this_frame, this_prologue_cache);
|
||||
@@ -2015,7 +2015,7 @@ m32c_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
unsigned long mach = gdbarch_bfd_arch_info (gdbarch)->mach;
|
||||
CORE_ADDR cfa;
|
||||
@@ -2178,7 +2178,7 @@ m32c_return_value (struct gdbarch *gdbarch,
|
||||
gdb_byte *readbuf,
|
||||
const gdb_byte *writebuf)
|
||||
{
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
enum return_value_convention conv;
|
||||
ULONGEST valtype_len = TYPE_LENGTH (valtype);
|
||||
@@ -2309,7 +2309,7 @@ static CORE_ADDR
|
||||
m32c_skip_trampoline_code (struct frame_info *frame, CORE_ADDR stop_pc)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
|
||||
/* It would be nicer to simply look up the addresses of known
|
||||
@@ -2555,7 +2555,7 @@ m32c_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc,
|
||||
struct m32c_prologue p;
|
||||
|
||||
struct regcache *regcache = get_current_regcache ();
|
||||
m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (!find_pc_partial_function (pc, &name, &func_addr, &func_end))
|
||||
internal_error (__FILE__, __LINE__,
|
||||
|
||||
@@ -146,14 +146,14 @@ struct m68gc11_gdbarch_tdep : gdbarch_tdep
|
||||
static int
|
||||
stack_correction (gdbarch *arch)
|
||||
{
|
||||
m68gc11_gdbarch_tdep *tdep = (m68gc11_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m68gc11_gdbarch_tdep *tdep = gdbarch_tdep<m68gc11_gdbarch_tdep> (arch);
|
||||
return tdep->stack_correction;
|
||||
}
|
||||
|
||||
static int
|
||||
use_page_register (gdbarch *arch)
|
||||
{
|
||||
m68gc11_gdbarch_tdep *tdep = (m68gc11_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
m68gc11_gdbarch_tdep *tdep = gdbarch_tdep<m68gc11_gdbarch_tdep> (arch);
|
||||
return tdep->stack_correction;
|
||||
}
|
||||
|
||||
@@ -642,7 +642,7 @@ m68hc11_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc,
|
||||
return pc;
|
||||
}
|
||||
|
||||
m68gc11_gdbarch_tdep *tdep = (m68gc11_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68gc11_gdbarch_tdep *tdep = gdbarch_tdep<m68gc11_gdbarch_tdep> (gdbarch);
|
||||
seq_table = tdep->prologue;
|
||||
|
||||
/* The 68hc11 stack is as follows:
|
||||
@@ -1020,7 +1020,7 @@ m68hc11_print_register (struct gdbarch *gdbarch, struct ui_file *file,
|
||||
else
|
||||
{
|
||||
m68gc11_gdbarch_tdep *tdep
|
||||
= (m68gc11_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
= gdbarch_tdep<m68gc11_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (regno == HARD_PC_REGNUM && tdep->use_page_register)
|
||||
{
|
||||
@@ -1125,7 +1125,7 @@ m68hc11_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
|
||||
gdb_printf (file, " Y=");
|
||||
m68hc11_print_register (gdbarch, file, frame, HARD_Y_REGNUM);
|
||||
|
||||
m68gc11_gdbarch_tdep *tdep = (m68gc11_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68gc11_gdbarch_tdep *tdep = gdbarch_tdep<m68gc11_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->use_page_register)
|
||||
{
|
||||
@@ -1417,7 +1417,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
|
||||
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||
{
|
||||
m68gc11_gdbarch_tdep *tdep
|
||||
= (m68gc11_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
||||
= gdbarch_tdep<m68gc11_gdbarch_tdep> (arches->gdbarch);
|
||||
|
||||
if (tdep->elf_flags != elf_flags)
|
||||
continue;
|
||||
|
||||
@@ -133,7 +133,7 @@ m68kbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||
static void
|
||||
m68kbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
|
||||
tdep->jb_pc = 5;
|
||||
tdep->jb_elt_size = 4;
|
||||
|
||||
@@ -384,7 +384,7 @@ m68k_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||
static void
|
||||
m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
|
||||
linux_init_abi (info, gdbarch, 0);
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ typedef BP_MANIPULATION (m68k_break_insn) m68k_breakpoint;
|
||||
static struct type *
|
||||
m68k_ps_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (!tdep->m68k_ps_type)
|
||||
{
|
||||
@@ -99,7 +99,7 @@ m68k_ps_type (struct gdbarch *gdbarch)
|
||||
static struct type *
|
||||
m68881_ext_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (!tdep->m68881_ext_type)
|
||||
tdep->m68881_ext_type
|
||||
@@ -120,7 +120,7 @@ m68881_ext_type (struct gdbarch *gdbarch)
|
||||
static struct type *
|
||||
m68k_register_type (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->fpregs_present)
|
||||
{
|
||||
@@ -171,7 +171,7 @@ static const char * const m68k_register_names[] = {
|
||||
static const char *
|
||||
m68k_register_name (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (regnum < 0 || regnum >= ARRAY_SIZE (m68k_register_names))
|
||||
internal_error (__FILE__, __LINE__,
|
||||
@@ -191,7 +191,7 @@ static int
|
||||
m68k_convert_register_p (struct gdbarch *gdbarch,
|
||||
int regnum, struct type *type)
|
||||
{
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (!tdep->fpregs_present)
|
||||
return 0;
|
||||
@@ -300,7 +300,7 @@ m68k_extract_return_value (struct type *type, struct regcache *regcache,
|
||||
if (type->code () == TYPE_CODE_PTR && len == 4)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
regcache->raw_read (tdep->pointer_result_regnum, valbuf);
|
||||
}
|
||||
else if (len <= 4)
|
||||
@@ -325,7 +325,7 @@ m68k_svr4_extract_return_value (struct type *type, struct regcache *regcache,
|
||||
{
|
||||
gdb_byte buf[M68K_MAX_REGISTER_SIZE];
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->float_return && type->code () == TYPE_CODE_FLT)
|
||||
{
|
||||
@@ -348,7 +348,7 @@ m68k_store_return_value (struct type *type, struct regcache *regcache,
|
||||
if (type->code () == TYPE_CODE_PTR && len == 4)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
regcache->raw_write (tdep->pointer_result_regnum, valbuf);
|
||||
/* gdb historically also set D0 in the SVR4 case. */
|
||||
if (tdep->pointer_result_regnum != M68K_D0_REGNUM)
|
||||
@@ -371,7 +371,7 @@ m68k_svr4_store_return_value (struct type *type, struct regcache *regcache,
|
||||
const gdb_byte *valbuf)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->float_return && type->code () == TYPE_CODE_FLT)
|
||||
{
|
||||
@@ -391,7 +391,7 @@ m68k_svr4_store_return_value (struct type *type, struct regcache *regcache,
|
||||
static int
|
||||
m68k_reg_struct_return_p (struct gdbarch *gdbarch, struct type *type)
|
||||
{
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
enum type_code code = type->code ();
|
||||
int len = TYPE_LENGTH (type);
|
||||
|
||||
@@ -469,7 +469,7 @@ m68k_svr4_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
||||
{
|
||||
enum type_code code = type->code ();
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Aggregates with a single member are always returned like their
|
||||
sole element. */
|
||||
@@ -541,7 +541,7 @@ m68k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
gdb_byte buf[4];
|
||||
int i;
|
||||
@@ -596,7 +596,7 @@ m68k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
static int
|
||||
m68k_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int num)
|
||||
{
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (num < 8)
|
||||
/* d0..7 */
|
||||
@@ -766,7 +766,7 @@ m68k_analyze_register_saves (struct gdbarch *gdbarch, CORE_ADDR pc,
|
||||
struct m68k_frame_cache *cache)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (cache->locals >= 0)
|
||||
{
|
||||
@@ -1058,7 +1058,7 @@ m68k_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
|
||||
gdb_byte *buf;
|
||||
CORE_ADDR sp, jb_addr;
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
|
||||
if (tdep->jb_pc < 0)
|
||||
@@ -1104,7 +1104,7 @@ m68k_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
|
||||
void
|
||||
m68k_svr4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* SVR4 uses a different calling convention. */
|
||||
set_gdbarch_return_value (gdbarch, m68k_svr4_return_value);
|
||||
@@ -1122,7 +1122,7 @@ m68k_svr4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
static void
|
||||
m68k_embedded_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
|
||||
m68k_svr4_init_abi (info, gdbarch);
|
||||
tdep->pointer_result_regnum = M68K_D0_REGNUM;
|
||||
@@ -1237,7 +1237,7 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
best_arch = gdbarch_list_lookup_by_info (best_arch->next, &info))
|
||||
{
|
||||
m68k_gdbarch_tdep *tdep
|
||||
= (m68k_gdbarch_tdep *) gdbarch_tdep (best_arch->gdbarch);
|
||||
= gdbarch_tdep<m68k_gdbarch_tdep> (best_arch->gdbarch);
|
||||
|
||||
if (flavour != tdep->flavour)
|
||||
continue;
|
||||
@@ -1339,7 +1339,7 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
static void
|
||||
m68k_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
||||
{
|
||||
m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep == NULL)
|
||||
return;
|
||||
|
||||
@@ -260,7 +260,7 @@ me_module_register_set (CONFIG_ATTR me_module,
|
||||
specifically excluding the generic coprocessor register sets. */
|
||||
|
||||
mep_gdbarch_tdep *tdep
|
||||
= (mep_gdbarch_tdep *) gdbarch_tdep (target_gdbarch ());
|
||||
= gdbarch_tdep<mep_gdbarch_tdep> (target_gdbarch ());
|
||||
CGEN_CPU_DESC desc = tdep->cpu_desc;
|
||||
const CGEN_HW_ENTRY *hw;
|
||||
|
||||
@@ -856,7 +856,7 @@ current_me_module (void)
|
||||
else
|
||||
{
|
||||
mep_gdbarch_tdep *tdep
|
||||
= (mep_gdbarch_tdep *) gdbarch_tdep (target_gdbarch ());
|
||||
= gdbarch_tdep<mep_gdbarch_tdep> (target_gdbarch ());
|
||||
return tdep->me_module;
|
||||
}
|
||||
}
|
||||
@@ -2391,7 +2391,7 @@ mep_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||
{
|
||||
mep_gdbarch_tdep *tdep
|
||||
= (mep_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
||||
= gdbarch_tdep<mep_gdbarch_tdep> (arches->gdbarch);
|
||||
|
||||
if (tdep->me_module == me_module)
|
||||
return arches->gdbarch;
|
||||
|
||||
@@ -1317,7 +1317,7 @@ mips_linux_get_syscall_number (struct gdbarch *gdbarch,
|
||||
thread_info *thread)
|
||||
{
|
||||
struct regcache *regcache = get_thread_regcache (thread);
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int regsize = register_size (gdbarch, MIPS_V0_REGNUM);
|
||||
/* The content of a register */
|
||||
@@ -1527,7 +1527,7 @@ static void
|
||||
mips_linux_init_abi (struct gdbarch_info info,
|
||||
struct gdbarch *gdbarch)
|
||||
{
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
enum mips_abi abi = mips_abi (gdbarch);
|
||||
struct tdesc_arch_data *tdesc_data = info.tdesc_data;
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ static const char mips_disassembler_options_n64[] = "gpr-names=64";
|
||||
const struct mips_regnum *
|
||||
mips_regnum (struct gdbarch *gdbarch)
|
||||
{
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
return tdep->regnum;
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ mips_float_register_p (struct gdbarch *gdbarch, int regnum)
|
||||
static bool
|
||||
mips_eabi (gdbarch *arch)
|
||||
{
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (arch);
|
||||
return (tdep->mips_abi == MIPS_ABI_EABI32 \
|
||||
|| tdep->mips_abi == MIPS_ABI_EABI64);
|
||||
}
|
||||
@@ -260,21 +260,21 @@ mips_eabi (gdbarch *arch)
|
||||
static int
|
||||
mips_last_fp_arg_regnum (gdbarch *arch)
|
||||
{
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (arch);
|
||||
return tdep->mips_last_fp_arg_regnum;
|
||||
}
|
||||
|
||||
static int
|
||||
mips_last_arg_regnum (gdbarch *arch)
|
||||
{
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (arch);
|
||||
return tdep->mips_last_arg_regnum;
|
||||
}
|
||||
|
||||
static enum mips_fpu_type
|
||||
mips_get_fpu_type (gdbarch *arch)
|
||||
{
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (arch);
|
||||
return tdep->mips_fpu_type;
|
||||
}
|
||||
|
||||
@@ -282,14 +282,14 @@ mips_get_fpu_type (gdbarch *arch)
|
||||
enum mips_abi
|
||||
mips_abi (struct gdbarch *gdbarch)
|
||||
{
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
return tdep->mips_abi;
|
||||
}
|
||||
|
||||
int
|
||||
mips_isa_regsize (struct gdbarch *gdbarch)
|
||||
{
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* If we know how big the registers are, use that size. */
|
||||
if (tdep->register_size_valid_p)
|
||||
@@ -335,7 +335,7 @@ mips_abi_regsize (struct gdbarch *gdbarch)
|
||||
static int
|
||||
is_mips16_isa (struct gdbarch *gdbarch)
|
||||
{
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
return tdep->mips_isa == ISA_MIPS16;
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@ is_mips16_isa (struct gdbarch *gdbarch)
|
||||
static int
|
||||
is_micromips_isa (struct gdbarch *gdbarch)
|
||||
{
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
return tdep->mips_isa == ISA_MICROMIPS;
|
||||
}
|
||||
|
||||
@@ -636,7 +636,7 @@ static const char * const mips_linux_reg_names[NUM_MIPS_PROCESSOR_REGS] = {
|
||||
static const char *
|
||||
mips_register_name (struct gdbarch *gdbarch, int regno)
|
||||
{
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
/* GPR names for all ABIs other than n32/n64. */
|
||||
static const char *mips_gpr_names[] = {
|
||||
"zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
|
||||
@@ -777,7 +777,7 @@ mips_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache,
|
||||
else if (register_size (gdbarch, rawnum) >
|
||||
register_size (gdbarch, cookednum))
|
||||
{
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->mips64_transfers_32bit_regs_p)
|
||||
return regcache->raw_read_part (rawnum, 0, 4, buf);
|
||||
@@ -810,7 +810,7 @@ mips_pseudo_register_write (struct gdbarch *gdbarch,
|
||||
else if (register_size (gdbarch, rawnum) >
|
||||
register_size (gdbarch, cookednum))
|
||||
{
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->mips64_transfers_32bit_regs_p)
|
||||
regcache->raw_write_part (rawnum, 0, 4, buf);
|
||||
@@ -855,7 +855,7 @@ mips_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
|
||||
if (register_size (gdbarch, rawnum) > register_size (gdbarch, reg))
|
||||
{
|
||||
mips_gdbarch_tdep *tdep
|
||||
= (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
= gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (!tdep->mips64_transfers_32bit_regs_p
|
||||
|| gdbarch_byte_order (gdbarch) != BFD_ENDIAN_BIG)
|
||||
@@ -1059,7 +1059,7 @@ mips_register_type (struct gdbarch *gdbarch, int regnum)
|
||||
else
|
||||
{
|
||||
int rawnum = regnum - gdbarch_num_regs (gdbarch);
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* The cooked or ABI registers. These are sized according to
|
||||
the ABI (with a few complications). */
|
||||
@@ -1183,28 +1183,25 @@ static void
|
||||
show_mask_address (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
mips_gdbarch_tdep *tdep
|
||||
= (mips_gdbarch_tdep *) gdbarch_tdep (target_gdbarch ());
|
||||
|
||||
deprecated_show_value_hack (file, from_tty, c, value);
|
||||
switch (mask_address_var)
|
||||
const char *additional_text = "";
|
||||
if (mask_address_var == AUTO_BOOLEAN_AUTO)
|
||||
{
|
||||
case AUTO_BOOLEAN_TRUE:
|
||||
gdb_printf (file, "The 32 bit mips address mask is enabled\n");
|
||||
break;
|
||||
case AUTO_BOOLEAN_FALSE:
|
||||
gdb_printf (file, "The 32 bit mips address mask is disabled\n");
|
||||
break;
|
||||
case AUTO_BOOLEAN_AUTO:
|
||||
gdb_printf
|
||||
(file,
|
||||
"The 32 bit address mask is set automatically. Currently %s\n",
|
||||
mips_mask_address_p (tdep) ? "enabled" : "disabled");
|
||||
break;
|
||||
default:
|
||||
internal_error (__FILE__, __LINE__, _("show_mask_address: bad switch"));
|
||||
break;
|
||||
if (gdbarch_bfd_arch_info (target_gdbarch ())->arch != bfd_arch_mips)
|
||||
additional_text = _(" (current architecture is not MIPS)");
|
||||
else
|
||||
{
|
||||
mips_gdbarch_tdep *tdep
|
||||
= gdbarch_tdep<mips_gdbarch_tdep> (target_gdbarch ());
|
||||
|
||||
if (mips_mask_address_p (tdep))
|
||||
additional_text = _(" (currently \"on\")");
|
||||
else
|
||||
additional_text = _(" (currently \"off\")");
|
||||
}
|
||||
}
|
||||
|
||||
gdb_printf (file, _("Zeroing of upper 32 bits of 64-bit addresses is \"%s\"%s.\n"),
|
||||
value, additional_text);
|
||||
}
|
||||
|
||||
/* Tell if the program counter value in MEMADDR is in a standard ISA
|
||||
@@ -1730,7 +1727,7 @@ mips32_next_pc (struct regcache *regcache, CORE_ADDR pc)
|
||||
case 12: /* SYSCALL */
|
||||
{
|
||||
mips_gdbarch_tdep *tdep
|
||||
= (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
= gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->syscall_next_pc != NULL)
|
||||
pc = tdep->syscall_next_pc (get_current_frame ());
|
||||
@@ -1941,7 +1938,7 @@ micromips_next_pc (struct regcache *regcache, CORE_ADDR pc)
|
||||
case 0x22d: /* SYSCALL: 000000 1000101101 111100 */
|
||||
{
|
||||
mips_gdbarch_tdep *tdep
|
||||
= (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
= gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->syscall_next_pc != NULL)
|
||||
pc = tdep->syscall_next_pc (get_current_frame ());
|
||||
@@ -3904,7 +3901,7 @@ mips_stub_frame_base_sniffer (struct frame_info *this_frame)
|
||||
static CORE_ADDR
|
||||
mips_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
|
||||
{
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (mips_mask_address_p (tdep) && (((ULONGEST) addr) >> 32 == 0xffffffffUL))
|
||||
/* This hack is a work-around for existing boards using PMON, the
|
||||
@@ -4807,7 +4804,7 @@ mips_eabi_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||
struct type *type, struct regcache *regcache,
|
||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
||||
{
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
int fp_return_type = 0;
|
||||
int offset, regnum, xfer;
|
||||
|
||||
@@ -5198,7 +5195,7 @@ mips_n32n64_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||
struct type *type, struct regcache *regcache,
|
||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
||||
{
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* From MIPSpro N32 ABI Handbook, Document Number: 007-2816-004
|
||||
|
||||
@@ -5707,7 +5704,7 @@ mips_o32_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||
{
|
||||
CORE_ADDR func_addr = function ? find_function_addr (function, NULL) : 0;
|
||||
int mips16 = mips_pc_is_mips16 (gdbarch, func_addr);
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
enum mips_fval_reg fval_reg;
|
||||
|
||||
fval_reg = readbuf ? mips16 ? mips_fval_gpr : mips_fval_fpr : mips_fval_both;
|
||||
@@ -8104,7 +8101,7 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
else if (arches != NULL)
|
||||
{
|
||||
mips_gdbarch_tdep *tdep
|
||||
= (mips_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
||||
= gdbarch_tdep<mips_gdbarch_tdep> (arches->gdbarch);
|
||||
elf_flags = tdep->elf_flags;
|
||||
}
|
||||
else
|
||||
@@ -8145,7 +8142,7 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
if (found_abi == MIPS_ABI_UNKNOWN && info.abfd == NULL && arches != NULL)
|
||||
{
|
||||
mips_gdbarch_tdep *tdep
|
||||
= (mips_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
||||
= gdbarch_tdep<mips_gdbarch_tdep> (arches->gdbarch);
|
||||
found_abi = tdep->found_abi;
|
||||
}
|
||||
|
||||
@@ -8462,7 +8459,7 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||
{
|
||||
mips_gdbarch_tdep *tdep
|
||||
= (mips_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
||||
= gdbarch_tdep<mips_gdbarch_tdep> (arches->gdbarch);
|
||||
|
||||
/* MIPS needs to be pedantic about which ABI and the compressed
|
||||
ISA variation the object is using. */
|
||||
@@ -8920,7 +8917,7 @@ mips_fpu_type_str (enum mips_fpu_type fpu_type)
|
||||
static void
|
||||
mips_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
||||
{
|
||||
mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||
if (tdep != NULL)
|
||||
{
|
||||
int ef_mips_arch;
|
||||
|
||||
@@ -1412,7 +1412,7 @@ mn10300_gdbarch_init (struct gdbarch_info info,
|
||||
static void
|
||||
mn10300_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
||||
{
|
||||
mn10300_gdbarch_tdep *tdep = (mn10300_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
mn10300_gdbarch_tdep *tdep = gdbarch_tdep<mn10300_gdbarch_tdep> (gdbarch);
|
||||
gdb_printf (file, "mn10300_dump_tdep: am33_mode = %d\n",
|
||||
tdep->am33_mode);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ struct mn10300_gdbarch_tdep : gdbarch_tdep
|
||||
static inline int
|
||||
get_am33_mode (gdbarch *arch)
|
||||
{
|
||||
mn10300_gdbarch_tdep *tdep = (mn10300_gdbarch_tdep *) gdbarch_tdep (arch);
|
||||
mn10300_gdbarch_tdep *tdep = gdbarch_tdep<mn10300_gdbarch_tdep> (arch);
|
||||
return tdep->am33_mode;
|
||||
}
|
||||
|
||||
|
||||
@@ -341,7 +341,7 @@ msp430_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc,
|
||||
int rn;
|
||||
pv_t reg[MSP430_NUM_TOTAL_REGS];
|
||||
CORE_ADDR after_last_frame_setup_insn = start_pc;
|
||||
msp430_gdbarch_tdep *tdep = (msp430_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
msp430_gdbarch_tdep *tdep = gdbarch_tdep<msp430_gdbarch_tdep> (gdbarch);
|
||||
int code_model = tdep->code_model;
|
||||
int sz;
|
||||
|
||||
@@ -570,7 +570,7 @@ msp430_return_value (struct gdbarch *gdbarch,
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
LONGEST valtype_len = TYPE_LENGTH (valtype);
|
||||
msp430_gdbarch_tdep *tdep = (msp430_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
msp430_gdbarch_tdep *tdep = gdbarch_tdep<msp430_gdbarch_tdep> (gdbarch);
|
||||
int code_model = tdep->code_model;
|
||||
|
||||
if (TYPE_LENGTH (valtype) > 8
|
||||
@@ -651,7 +651,7 @@ msp430_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
int write_pass;
|
||||
int sp_off = 0;
|
||||
CORE_ADDR cfa;
|
||||
msp430_gdbarch_tdep *tdep = (msp430_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
msp430_gdbarch_tdep *tdep = gdbarch_tdep<msp430_gdbarch_tdep> (gdbarch);
|
||||
int code_model = tdep->code_model;
|
||||
|
||||
struct type *func_type = value_type (function);
|
||||
@@ -814,7 +814,7 @@ msp430_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
|
||||
|
||||
stub_name = bms.minsym->linkage_name ();
|
||||
|
||||
msp430_gdbarch_tdep *tdep = (msp430_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
msp430_gdbarch_tdep *tdep = gdbarch_tdep<msp430_gdbarch_tdep> (gdbarch);
|
||||
if (tdep->code_model == MSP_SMALL_CODE_MODEL
|
||||
&& msp430_in_return_stub (gdbarch, pc, stub_name))
|
||||
{
|
||||
@@ -877,7 +877,7 @@ msp430_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
if (ca && gdbarch_bfd_arch_info (ca)->arch == bfd_arch_msp430)
|
||||
{
|
||||
msp430_gdbarch_tdep *ca_tdep
|
||||
= (msp430_gdbarch_tdep *) gdbarch_tdep (ca);
|
||||
= gdbarch_tdep<msp430_gdbarch_tdep> (ca);
|
||||
|
||||
elf_flags = ca_tdep->elf_flags;
|
||||
isa = ca_tdep->isa;
|
||||
@@ -904,7 +904,7 @@ msp430_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||
{
|
||||
msp430_gdbarch_tdep *candidate_tdep
|
||||
= (msp430_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
||||
= gdbarch_tdep<msp430_gdbarch_tdep> (arches->gdbarch);
|
||||
|
||||
if (candidate_tdep->elf_flags != elf_flags
|
||||
|| candidate_tdep->isa != isa
|
||||
|
||||
@@ -289,7 +289,7 @@ typedef BP_MANIPULATION (nds32_break_insn) nds32_breakpoint;
|
||||
static int
|
||||
nds32_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int num)
|
||||
{
|
||||
nds32_gdbarch_tdep *tdep = (nds32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
nds32_gdbarch_tdep *tdep = gdbarch_tdep<nds32_gdbarch_tdep> (gdbarch);
|
||||
const int FSR = 38;
|
||||
const int FDR = FSR + 32;
|
||||
|
||||
@@ -432,7 +432,7 @@ nds32_pseudo_register_read (struct gdbarch *gdbarch,
|
||||
readable_regcache *regcache, int regnum,
|
||||
gdb_byte *buf)
|
||||
{
|
||||
nds32_gdbarch_tdep *tdep = (nds32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
nds32_gdbarch_tdep *tdep = gdbarch_tdep<nds32_gdbarch_tdep> (gdbarch);
|
||||
gdb_byte reg_buf[8];
|
||||
int offset, fdr_regnum;
|
||||
enum register_status status;
|
||||
@@ -471,7 +471,7 @@ nds32_pseudo_register_write (struct gdbarch *gdbarch,
|
||||
struct regcache *regcache, int regnum,
|
||||
const gdb_byte *buf)
|
||||
{
|
||||
nds32_gdbarch_tdep *tdep = (nds32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
nds32_gdbarch_tdep *tdep = gdbarch_tdep<nds32_gdbarch_tdep> (gdbarch);
|
||||
gdb_byte reg_buf[8];
|
||||
int offset, fdr_regnum;
|
||||
|
||||
@@ -608,7 +608,7 @@ static CORE_ADDR
|
||||
nds32_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc,
|
||||
CORE_ADDR limit_pc, struct nds32_frame_cache *cache)
|
||||
{
|
||||
nds32_gdbarch_tdep *tdep = (nds32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
nds32_gdbarch_tdep *tdep = gdbarch_tdep<nds32_gdbarch_tdep> (gdbarch);
|
||||
int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
|
||||
/* Current scanning status. */
|
||||
int in_prologue_bb = 0;
|
||||
@@ -1169,7 +1169,7 @@ static int
|
||||
nds32_analyze_epilogue (struct gdbarch *gdbarch, CORE_ADDR pc,
|
||||
struct nds32_frame_cache *cache)
|
||||
{
|
||||
nds32_gdbarch_tdep *tdep = (nds32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
nds32_gdbarch_tdep *tdep = gdbarch_tdep<nds32_gdbarch_tdep> (gdbarch);
|
||||
int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
|
||||
CORE_ADDR limit_pc;
|
||||
uint32_t insn, insn_len;
|
||||
@@ -1220,7 +1220,7 @@ nds32_analyze_epilogue (struct gdbarch *gdbarch, CORE_ADDR pc,
|
||||
static int
|
||||
nds32_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr)
|
||||
{
|
||||
nds32_gdbarch_tdep *tdep = (nds32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
nds32_gdbarch_tdep *tdep = gdbarch_tdep<nds32_gdbarch_tdep> (gdbarch);
|
||||
int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
|
||||
int insn_type = INSN_NORMAL;
|
||||
int ret_found = 0;
|
||||
@@ -1424,7 +1424,7 @@ nds32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
int i;
|
||||
ULONGEST regval;
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
nds32_gdbarch_tdep *tdep = (nds32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
nds32_gdbarch_tdep *tdep = gdbarch_tdep<nds32_gdbarch_tdep> (gdbarch);
|
||||
struct type *func_type = value_type (function);
|
||||
int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
|
||||
int abi_split = nds32_abi_split (tdep->elf_abi);
|
||||
@@ -1652,7 +1652,7 @@ nds32_extract_return_value (struct gdbarch *gdbarch, struct type *type,
|
||||
struct regcache *regcache, gdb_byte *valbuf)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
nds32_gdbarch_tdep *tdep = (nds32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
nds32_gdbarch_tdep *tdep = gdbarch_tdep<nds32_gdbarch_tdep> (gdbarch);
|
||||
int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
|
||||
int calling_use_fpr;
|
||||
int len;
|
||||
@@ -1742,7 +1742,7 @@ nds32_store_return_value (struct gdbarch *gdbarch, struct type *type,
|
||||
struct regcache *regcache, const gdb_byte *valbuf)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
nds32_gdbarch_tdep *tdep = (nds32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
nds32_gdbarch_tdep *tdep = gdbarch_tdep<nds32_gdbarch_tdep> (gdbarch);
|
||||
int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
|
||||
int calling_use_fpr;
|
||||
int len;
|
||||
@@ -1965,7 +1965,7 @@ nds32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
best_arch = gdbarch_list_lookup_by_info (best_arch->next, &info))
|
||||
{
|
||||
nds32_gdbarch_tdep *idep
|
||||
= (nds32_gdbarch_tdep *) gdbarch_tdep (best_arch->gdbarch);
|
||||
= gdbarch_tdep<nds32_gdbarch_tdep> (best_arch->gdbarch);
|
||||
|
||||
if (idep->elf_abi != elf_abi)
|
||||
continue;
|
||||
|
||||
@@ -217,7 +217,7 @@ nios2_linux_is_kernel_helper (CORE_ADDR pc)
|
||||
static void
|
||||
nios2_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
nios2_gdbarch_tdep *tdep = (nios2_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
nios2_gdbarch_tdep *tdep = gdbarch_tdep<nios2_gdbarch_tdep> (gdbarch);
|
||||
|
||||
linux_init_abi (info, gdbarch, 0);
|
||||
|
||||
|
||||
@@ -2098,7 +2098,7 @@ static CORE_ADDR
|
||||
nios2_get_next_pc (struct regcache *regcache, CORE_ADDR pc)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
nios2_gdbarch_tdep *tdep = (nios2_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
nios2_gdbarch_tdep *tdep = gdbarch_tdep<nios2_gdbarch_tdep> (gdbarch);
|
||||
unsigned long mach = gdbarch_bfd_arch_info (gdbarch)->mach;
|
||||
unsigned int insn;
|
||||
const struct nios2_opcode *op = nios2_fetch_insn (gdbarch, pc, &insn);
|
||||
@@ -2221,7 +2221,7 @@ static int
|
||||
nios2_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
nios2_gdbarch_tdep *tdep = (nios2_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
nios2_gdbarch_tdep *tdep = gdbarch_tdep<nios2_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
CORE_ADDR jb_addr = get_frame_register_unsigned (frame, NIOS2_R4_REGNUM);
|
||||
gdb_byte buf[4];
|
||||
|
||||
@@ -248,7 +248,7 @@ or1k_return_value (struct gdbarch *gdbarch, struct value *functype,
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
enum type_code rv_type = valtype->code ();
|
||||
unsigned int rv_size = TYPE_LENGTH (valtype);
|
||||
or1k_gdbarch_tdep *tdep = (or1k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
or1k_gdbarch_tdep *tdep = gdbarch_tdep<or1k_gdbarch_tdep> (gdbarch);
|
||||
int bpw = tdep->bytes_per_word;
|
||||
|
||||
/* Deal with struct/union as addresses. If an array won't fit in a
|
||||
@@ -353,7 +353,7 @@ or1k_delay_slot_p (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
{
|
||||
const CGEN_INSN *insn;
|
||||
CGEN_FIELDS tmp_fields;
|
||||
or1k_gdbarch_tdep *tdep = (or1k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
or1k_gdbarch_tdep *tdep = gdbarch_tdep<or1k_gdbarch_tdep> (gdbarch);
|
||||
|
||||
insn = cgen_lookup_insn (tdep->gdb_cgen_cpu_desc,
|
||||
NULL,
|
||||
@@ -635,7 +635,7 @@ or1k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
int heap_offset = 0;
|
||||
CORE_ADDR heap_sp = sp - 128;
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
or1k_gdbarch_tdep *tdep = (or1k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
or1k_gdbarch_tdep *tdep = gdbarch_tdep<or1k_gdbarch_tdep> (gdbarch);
|
||||
int bpa = tdep->bytes_per_address;
|
||||
int bpw = tdep->bytes_per_word;
|
||||
struct type *func_type = value_type (function);
|
||||
@@ -1273,7 +1273,7 @@ or1k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
static void
|
||||
or1k_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
||||
{
|
||||
or1k_gdbarch_tdep *tdep = (or1k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
or1k_gdbarch_tdep *tdep = gdbarch_tdep<or1k_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (NULL == tdep)
|
||||
return; /* Nothing to report */
|
||||
|
||||
@@ -100,7 +100,7 @@ fill_fpregset (const struct regcache *regcache,
|
||||
static int
|
||||
getfpregs_supplies (struct gdbarch *gdbarch, int regno)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
|
||||
point registers. Traditionally, GDB's register set has still
|
||||
@@ -185,7 +185,7 @@ static int
|
||||
ppcfbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
int i, regnum;
|
||||
|
||||
/* The stack pointer shouldn't be zero. */
|
||||
|
||||
@@ -126,7 +126,7 @@ ppcfbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||
void *cb_data,
|
||||
const struct regcache *regcache)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->wordsize == 4)
|
||||
cb (".reg", 148, 148, &ppc32_fbsd_gregset, NULL, cb_data);
|
||||
@@ -200,7 +200,7 @@ static struct trad_frame_cache *
|
||||
ppcfbsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
struct trad_frame_cache *cache;
|
||||
CORE_ADDR addr, base, func;
|
||||
gdb_byte buf[PPC_INSN_SIZE];
|
||||
@@ -287,7 +287,7 @@ static CORE_ADDR
|
||||
ppcfbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
|
||||
CORE_ADDR lm_addr, CORE_ADDR offset)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
struct regcache *regcache;
|
||||
int tp_offset, tp_regnum;
|
||||
|
||||
@@ -319,7 +319,7 @@ ppcfbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
|
||||
static void
|
||||
ppcfbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Generic FreeBSD support. */
|
||||
fbsd_init_abi (info, gdbarch);
|
||||
|
||||
@@ -649,7 +649,7 @@ static int
|
||||
ppc_register_u_addr (struct gdbarch *gdbarch, int regno)
|
||||
{
|
||||
int u_addr = -1;
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
/* NOTE: cagney/2003-11-25: This is the word size used by the ptrace
|
||||
interface, and not the wordsize of the program's ABI. */
|
||||
int wordsize = sizeof (long);
|
||||
@@ -802,7 +802,7 @@ static void
|
||||
fetch_spe_register (struct regcache *regcache, int tid, int regno)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
struct gdb_evrregset_t evrregs;
|
||||
|
||||
gdb_assert (sizeof (evrregs.evr[0])
|
||||
@@ -911,7 +911,7 @@ static void
|
||||
fetch_register (struct regcache *regcache, int tid, int regno)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
/* This isn't really an address. But ptrace thinks of it as one. */
|
||||
CORE_ADDR regaddr = ppc_register_u_addr (gdbarch, regno);
|
||||
int bytes_transferred;
|
||||
@@ -1156,7 +1156,7 @@ static void
|
||||
fetch_gp_regs (struct regcache *regcache, int tid)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
int i;
|
||||
|
||||
if (have_ptrace_getsetregs)
|
||||
@@ -1208,7 +1208,7 @@ static void
|
||||
fetch_fp_regs (struct regcache *regcache, int tid)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
int i;
|
||||
|
||||
if (have_ptrace_getsetfpregs)
|
||||
@@ -1226,7 +1226,7 @@ static void
|
||||
fetch_ppc_registers (struct regcache *regcache, int tid)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
fetch_gp_regs (regcache, tid);
|
||||
if (tdep->ppc_fp0_regnum >= 0)
|
||||
@@ -1425,7 +1425,7 @@ static void
|
||||
store_spe_register (const struct regcache *regcache, int tid, int regno)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
struct gdb_evrregset_t evrregs;
|
||||
|
||||
gdb_assert (sizeof (evrregs.evr[0])
|
||||
@@ -1477,7 +1477,7 @@ static void
|
||||
store_register (const struct regcache *regcache, int tid, int regno)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
/* This isn't really an address. But ptrace thinks of it as one. */
|
||||
CORE_ADDR regaddr = ppc_register_u_addr (gdbarch, regno);
|
||||
int i;
|
||||
@@ -1718,7 +1718,7 @@ static void
|
||||
store_gp_regs (const struct regcache *regcache, int tid, int regno)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
int i;
|
||||
|
||||
if (have_ptrace_getsetregs)
|
||||
@@ -1780,7 +1780,7 @@ static void
|
||||
store_fp_regs (const struct regcache *regcache, int tid, int regno)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
int i;
|
||||
|
||||
if (have_ptrace_getsetfpregs)
|
||||
@@ -1798,7 +1798,7 @@ static void
|
||||
store_ppc_registers (const struct regcache *regcache, int tid)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
store_gp_regs (regcache, tid, -1);
|
||||
if (tdep->ppc_fp0_regnum >= 0)
|
||||
|
||||
@@ -332,7 +332,7 @@ ppc_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
|
||||
{
|
||||
unsigned int insnbuf[POWERPC32_PLT_CHECK_LEN];
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
CORE_ADDR target = 0;
|
||||
int scan_limit, i;
|
||||
@@ -898,7 +898,7 @@ ppc_linux_vsxregset (void)
|
||||
const struct regset *
|
||||
ppc_linux_cgprregset (struct gdbarch *gdbarch)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->wordsize == 4)
|
||||
{
|
||||
@@ -938,7 +938,7 @@ ppc_linux_collect_core_cpgrregset (const struct regset *regset,
|
||||
int regnum, void *buf, size_t len)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
const struct regset *cgprregset = ppc_linux_cgprregset (gdbarch);
|
||||
|
||||
@@ -985,7 +985,7 @@ ppc_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||
void *cb_data,
|
||||
const struct regcache *regcache)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
int have_altivec = tdep->ppc_vr0_regnum != -1;
|
||||
int have_vsx = tdep->ppc_vsr0_upper_regnum != -1;
|
||||
int have_ppr = tdep->ppc_ppr_regnum != -1;
|
||||
@@ -1170,7 +1170,7 @@ ppc_linux_sigtramp_cache (struct frame_info *this_frame,
|
||||
CORE_ADDR fpregs;
|
||||
int i;
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
|
||||
base = get_frame_register_unsigned (this_frame,
|
||||
@@ -1341,7 +1341,7 @@ ppc_linux_get_syscall_number (struct gdbarch *gdbarch,
|
||||
thread_info *thread)
|
||||
{
|
||||
struct regcache *regcache = get_thread_regcache (thread);
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
|
||||
/* Make sure we're in a 32- or 64-bit machine */
|
||||
@@ -1419,7 +1419,7 @@ static int
|
||||
ppc_linux_syscall_record (struct regcache *regcache)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
ULONGEST scnum;
|
||||
enum gdb_syscall syscall_gdb;
|
||||
int ret;
|
||||
@@ -1509,7 +1509,7 @@ ppc_linux_record_signal (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
const int SIGNAL_FRAMESIZE = 128;
|
||||
const int sizeof_rt_sigframe = 1440 * 2 + 8 * 2 + 4 * 6 + 8 + 8 + 128 + 512;
|
||||
ULONGEST sp;
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
int i;
|
||||
|
||||
for (i = 3; i <= 12; i++)
|
||||
@@ -2044,7 +2044,7 @@ static void
|
||||
ppc_linux_init_abi (struct gdbarch_info info,
|
||||
struct gdbarch *gdbarch)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
struct tdesc_arch_data *tdesc_data = info.tdesc_data;
|
||||
static const char *const stap_integer_prefixes[] = { "i", NULL };
|
||||
static const char *const stap_register_indirection_prefixes[] = { "(",
|
||||
|
||||
@@ -52,7 +52,7 @@ static ppc_nbsd_nat_target the_ppc_nbsd_nat_target;
|
||||
static int
|
||||
getregs_supplies (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
return ((regnum >= tdep->ppc_gp0_regnum
|
||||
&& regnum < tdep->ppc_gp0_regnum + ppc_num_gprs)
|
||||
@@ -68,7 +68,7 @@ getregs_supplies (struct gdbarch *gdbarch, int regnum)
|
||||
static int
|
||||
getfpregs_supplies (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
|
||||
point registers. Traditionally, GDB's register set has still
|
||||
@@ -159,7 +159,7 @@ ppcnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
|
||||
struct switchframe sf;
|
||||
struct callframe cf;
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
int i;
|
||||
|
||||
/* The stack pointer shouldn't be zero. */
|
||||
|
||||
@@ -102,7 +102,7 @@ ppcnbsd_sigtramp_cache_init (const struct tramp_frame *self,
|
||||
CORE_ADDR func)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
CORE_ADDR addr, base;
|
||||
int i;
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ static ppc_obsd_nat_target the_ppc_obsd_nat_target;
|
||||
static int
|
||||
getfpregs_supplies (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
|
||||
point registers. Traditionally, GDB's register set has still
|
||||
@@ -154,7 +154,7 @@ static int
|
||||
ppcobsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
struct switchframe sf;
|
||||
struct callframe cf;
|
||||
int i, regnum;
|
||||
|
||||
@@ -161,7 +161,7 @@ static struct trad_frame_cache *
|
||||
ppcobsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
struct trad_frame_cache *cache;
|
||||
CORE_ADDR addr, base, func;
|
||||
|
||||
@@ -65,7 +65,7 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function));
|
||||
ULONGEST saved_sp;
|
||||
@@ -602,7 +602,7 @@ get_decimal_float_return_value (struct gdbarch *gdbarch, struct type *valtype,
|
||||
struct regcache *regcache, gdb_byte *readbuf,
|
||||
const gdb_byte *writebuf)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
gdb_assert (valtype->code () == TYPE_CODE_DECFLOAT);
|
||||
|
||||
@@ -680,7 +680,7 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
|
||||
gdb_byte *readbuf, const gdb_byte *writebuf,
|
||||
int broken_gcc)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int opencl_abi = func_type? ppc_sysv_use_opencl_abi (func_type) : 0;
|
||||
|
||||
@@ -1267,7 +1267,7 @@ ppc64_sysv_abi_push_val (struct gdbarch *gdbarch,
|
||||
const bfd_byte *val, int len, int align,
|
||||
struct ppc64_sysv_argpos *argpos)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
int offset = 0;
|
||||
|
||||
/* Enforce alignment of stack location, if requested. */
|
||||
@@ -1317,7 +1317,7 @@ static void
|
||||
ppc64_sysv_abi_push_integer (struct gdbarch *gdbarch, ULONGEST val,
|
||||
struct ppc64_sysv_argpos *argpos)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
gdb_byte buf[PPC_MAX_REGISTER_SIZE];
|
||||
|
||||
@@ -1335,7 +1335,7 @@ ppc64_sysv_abi_push_freg (struct gdbarch *gdbarch,
|
||||
struct type *type, const bfd_byte *val,
|
||||
struct ppc64_sysv_argpos *argpos)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
if (tdep->soft_float)
|
||||
return;
|
||||
|
||||
@@ -1420,7 +1420,7 @@ static void
|
||||
ppc64_sysv_abi_push_vreg (struct gdbarch *gdbarch, const bfd_byte *val,
|
||||
struct ppc64_sysv_argpos *argpos)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (argpos->regcache && argpos->vreg <= 13)
|
||||
argpos->regcache->cooked_write (tdep->ppc_vr0_regnum + argpos->vreg, val);
|
||||
@@ -1436,7 +1436,7 @@ ppc64_sysv_abi_push_param (struct gdbarch *gdbarch,
|
||||
struct type *type, const bfd_byte *val,
|
||||
struct ppc64_sysv_argpos *argpos)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (type->code () == TYPE_CODE_FLT
|
||||
&& TYPE_LENGTH (type) == 16
|
||||
@@ -1589,7 +1589,7 @@ ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
CORE_ADDR func_addr = find_function_addr (function, NULL);
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function));
|
||||
ULONGEST back_chain;
|
||||
@@ -1783,7 +1783,7 @@ ppc64_sysv_abi_return_value_base (struct gdbarch *gdbarch, struct type *valtype,
|
||||
struct regcache *regcache, gdb_byte *readbuf,
|
||||
const gdb_byte *writebuf, int index)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Integers live in GPRs starting at r3. */
|
||||
if ((valtype->code () == TYPE_CODE_INT
|
||||
@@ -1972,7 +1972,7 @@ ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||
struct type *valtype, struct regcache *regcache,
|
||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
struct type *func_type = function ? value_type (function) : NULL;
|
||||
int opencl_abi = func_type? ppc_sysv_use_opencl_abi (func_type) : 0;
|
||||
struct type *eltype;
|
||||
|
||||
@@ -89,7 +89,7 @@ ppc64_plt_entry_point (struct frame_info *frame, CORE_ADDR plt_off)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
CORE_ADDR tocp;
|
||||
|
||||
if (execution_direction == EXEC_REVERSE)
|
||||
|
||||
@@ -179,7 +179,7 @@ riscv_linux_syscall_next_pc (struct frame_info *frame)
|
||||
static void
|
||||
riscv_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
|
||||
|
||||
linux_init_abi (info, gdbarch, 0);
|
||||
|
||||
|
||||
@@ -733,7 +733,7 @@ show_riscv_debug_variable (struct ui_file *file, int from_tty,
|
||||
int
|
||||
riscv_isa_xlen (struct gdbarch *gdbarch)
|
||||
{
|
||||
riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
|
||||
return tdep->isa_features.xlen;
|
||||
}
|
||||
|
||||
@@ -742,7 +742,7 @@ riscv_isa_xlen (struct gdbarch *gdbarch)
|
||||
int
|
||||
riscv_abi_xlen (struct gdbarch *gdbarch)
|
||||
{
|
||||
riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
|
||||
return tdep->abi_features.xlen;
|
||||
}
|
||||
|
||||
@@ -751,7 +751,7 @@ riscv_abi_xlen (struct gdbarch *gdbarch)
|
||||
int
|
||||
riscv_isa_flen (struct gdbarch *gdbarch)
|
||||
{
|
||||
riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
|
||||
return tdep->isa_features.flen;
|
||||
}
|
||||
|
||||
@@ -760,7 +760,7 @@ riscv_isa_flen (struct gdbarch *gdbarch)
|
||||
int
|
||||
riscv_abi_flen (struct gdbarch *gdbarch)
|
||||
{
|
||||
riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
|
||||
return tdep->abi_features.flen;
|
||||
}
|
||||
|
||||
@@ -769,7 +769,7 @@ riscv_abi_flen (struct gdbarch *gdbarch)
|
||||
bool
|
||||
riscv_abi_embedded (struct gdbarch *gdbarch)
|
||||
{
|
||||
riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
|
||||
return tdep->abi_features.embedded;
|
||||
}
|
||||
|
||||
@@ -786,7 +786,7 @@ riscv_has_fp_regs (struct gdbarch *gdbarch)
|
||||
static bool
|
||||
riscv_has_fp_abi (struct gdbarch *gdbarch)
|
||||
{
|
||||
riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
|
||||
return tdep->abi_features.flen > 0;
|
||||
}
|
||||
|
||||
@@ -910,7 +910,7 @@ riscv_register_name (struct gdbarch *gdbarch, int regnum)
|
||||
will show up in 'info register all'. Unless, we identify the
|
||||
duplicate copies of these registers (in riscv_tdesc_unknown_reg) and
|
||||
then hide the registers here by giving them no name. */
|
||||
riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
|
||||
if (tdep->duplicate_fflags_regnum == regnum)
|
||||
return NULL;
|
||||
if (tdep->duplicate_frm_regnum == regnum)
|
||||
@@ -938,7 +938,7 @@ riscv_register_name (struct gdbarch *gdbarch, int regnum)
|
||||
static struct type *
|
||||
riscv_fpreg_d_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->riscv_fpreg_d_type == nullptr)
|
||||
{
|
||||
@@ -1260,7 +1260,7 @@ riscv_is_regnum_a_named_csr (int regnum)
|
||||
static bool
|
||||
riscv_is_unknown_csr (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
|
||||
return (regnum >= tdep->unknown_csrs_first_regnum
|
||||
&& regnum < (tdep->unknown_csrs_first_regnum
|
||||
+ tdep->unknown_csrs_count));
|
||||
@@ -3600,7 +3600,7 @@ riscv_tdesc_unknown_reg (struct gdbarch *gdbarch, tdesc_feature *feature,
|
||||
record their register numbers here. */
|
||||
if (strcmp (tdesc_feature_name (feature), riscv_freg_feature.name ()) == 0)
|
||||
{
|
||||
riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
|
||||
int *regnum_ptr = nullptr;
|
||||
|
||||
if (strcmp (reg_name, "fflags") == 0)
|
||||
@@ -3631,7 +3631,7 @@ riscv_tdesc_unknown_reg (struct gdbarch *gdbarch, tdesc_feature *feature,
|
||||
about register groups in riscv_register_reggroup_p. */
|
||||
if (strcmp (tdesc_feature_name (feature), riscv_csr_feature.name ()) == 0)
|
||||
{
|
||||
riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
|
||||
if (tdep->unknown_csrs_first_regnum == -1)
|
||||
tdep->unknown_csrs_first_regnum = possible_regnum;
|
||||
gdb_assert (tdep->unknown_csrs_first_regnum
|
||||
@@ -3733,7 +3733,7 @@ riscv_gdbarch_init (struct gdbarch_info info,
|
||||
we are looking for. If it doesn't then we can't reuse this
|
||||
gdbarch. */
|
||||
riscv_gdbarch_tdep *other_tdep
|
||||
= (riscv_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
||||
= gdbarch_tdep<riscv_gdbarch_tdep> (arches->gdbarch);
|
||||
|
||||
if (other_tdep->isa_features != features
|
||||
|| other_tdep->abi_features != abi_features)
|
||||
@@ -3858,7 +3858,7 @@ riscv_next_pc (struct regcache *regcache, CORE_ADDR pc)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
const riscv_gdbarch_tdep *tdep
|
||||
= (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
= gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
|
||||
struct riscv_insn insn;
|
||||
CORE_ADDR next_pc;
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ struct rl78_prologue
|
||||
static struct type *
|
||||
rl78_psw_type (struct gdbarch *gdbarch)
|
||||
{
|
||||
rl78_gdbarch_tdep *tdep = (rl78_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
rl78_gdbarch_tdep *tdep = gdbarch_tdep<rl78_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (tdep->rl78_psw_type == NULL)
|
||||
{
|
||||
@@ -291,7 +291,7 @@ rl78_psw_type (struct gdbarch *gdbarch)
|
||||
static struct type *
|
||||
rl78_register_type (struct gdbarch *gdbarch, int reg_nr)
|
||||
{
|
||||
rl78_gdbarch_tdep *tdep = (rl78_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
rl78_gdbarch_tdep *tdep = gdbarch_tdep<rl78_gdbarch_tdep> (gdbarch);
|
||||
|
||||
if (reg_nr == RL78_PC_REGNUM)
|
||||
return tdep->rl78_code_pointer;
|
||||
@@ -1248,7 +1248,7 @@ rl78_return_value (struct gdbarch *gdbarch,
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
ULONGEST valtype_len = TYPE_LENGTH (valtype);
|
||||
rl78_gdbarch_tdep *tdep = (rl78_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
rl78_gdbarch_tdep *tdep = gdbarch_tdep<rl78_gdbarch_tdep> (gdbarch);
|
||||
int is_g10 = tdep->elf_flags & E_FLAG_RL78_G10;
|
||||
|
||||
if (valtype_len > 8)
|
||||
@@ -1394,7 +1394,7 @@ rl78_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||
{
|
||||
rl78_gdbarch_tdep *tdep
|
||||
= (rl78_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
||||
= gdbarch_tdep<rl78_gdbarch_tdep> (arches->gdbarch);
|
||||
|
||||
if (tdep->elf_flags != elf_flags)
|
||||
continue;
|
||||
|
||||
@@ -115,7 +115,7 @@ static rs6000_nat_target the_rs6000_nat_target;
|
||||
static int
|
||||
regmap (struct gdbarch *gdbarch, int regno, int *isfloat)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
*isfloat = 0;
|
||||
if (tdep->ppc_gp0_regnum <= regno
|
||||
@@ -317,7 +317,7 @@ rs6000_nat_target::fetch_registers (struct regcache *regcache, int regno)
|
||||
|
||||
else
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Read 32 general purpose registers. */
|
||||
for (regno = tdep->ppc_gp0_regnum;
|
||||
@@ -359,7 +359,7 @@ rs6000_nat_target::store_registers (struct regcache *regcache, int regno)
|
||||
|
||||
else
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* Write general purpose registers first. */
|
||||
for (regno = tdep->ppc_gp0_regnum;
|
||||
|
||||
@@ -75,7 +75,7 @@ aix_sighandle_frame_cache (struct frame_info *this_frame,
|
||||
LONGEST backchain;
|
||||
CORE_ADDR base, base_orig, func;
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
struct trad_frame_cache *this_trad_cache;
|
||||
|
||||
@@ -261,7 +261,7 @@ rs6000_aix_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||
void *cb_data,
|
||||
const struct regcache *regcache)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
if (tdep->wordsize == 4)
|
||||
cb (".reg", 592, 592, &rs6000_aix32_regset, NULL, cb_data);
|
||||
else
|
||||
@@ -292,7 +292,7 @@ rs6000_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int ii;
|
||||
int len = 0;
|
||||
@@ -522,7 +522,7 @@ rs6000_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||
struct type *valtype, struct regcache *regcache,
|
||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
|
||||
/* The calling convention this function implements assumes the
|
||||
@@ -660,7 +660,7 @@ rs6000_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
|
||||
CORE_ADDR addr,
|
||||
struct target_ops *targ)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
struct obj_section *s;
|
||||
|
||||
@@ -704,7 +704,7 @@ branch_dest (struct regcache *regcache, int opcode, int instr,
|
||||
CORE_ADDR pc, CORE_ADDR safety)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
CORE_ADDR dest;
|
||||
int immediate;
|
||||
@@ -972,7 +972,7 @@ static struct ld_info
|
||||
rs6000_aix_extract_ld_info (struct gdbarch *gdbarch,
|
||||
const gdb_byte *ldi_buf)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
struct type *ptr_type = builtin_type (gdbarch)->builtin_data_ptr;
|
||||
const struct ld_info_desc desc
|
||||
@@ -1131,7 +1131,7 @@ rs6000_aix_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
|
||||
static void
|
||||
rs6000_aix_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
{
|
||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
||||
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||
|
||||
/* RS6000/AIX does not support PT_STEP. Has to be simulated. */
|
||||
set_gdbarch_software_single_step (gdbarch, rs6000_software_single_step);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user