gdb: move the type cast into gdbarch_tdep
I built GDB for all targets on a x86-64/GNU-Linux system, and then (accidentally) passed GDB a RISC-V binary, and asked GDB to "run" the binary on the native target. I got this error: (gdb) show architecture The target architecture is set to "auto" (currently "i386"). (gdb) file /tmp/hello.rv32.exe Reading symbols from /tmp/hello.rv32.exe... (gdb) show architecture The target architecture is set to "auto" (currently "riscv:rv32"). (gdb) run Starting program: /tmp/hello.rv32.exe ../../src/gdb/i387-tdep.c:596: internal-error: i387_supply_fxsave: Assertion `tdep->st0_regnum >= I386_ST0_REGNUM' failed. What's going on here is this; initially the architecture is i386, this is based on the default architecture, which is set based on the native target. After loading the RISC-V executable the architecture of the current inferior is updated based on the architecture of the executable. When we "run", GDB does a fork & exec, with the inferior being controlled through ptrace. GDB sees an initial stop from the inferior as soon as the inferior comes to life. In response to this stop GDB ends up calling save_stop_reason (linux-nat.c), which ends up trying to read register from the inferior, to do this we end up calling target_ops::fetch_registers, which, for the x86-64 native target, calls amd64_linux_nat_target::fetch_registers. After this I eventually end up in i387_supply_fxsave, different x86 based targets will end in different functions to fetch registers, but it doesn't really matter which function we end up in, the problem is this line, which is repeated in many places: i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch); The problem here is that the ARCH in this line comes from the current inferior, which, as we discussed above, will be a RISC-V gdbarch, the tdep field will actually be of type riscv_gdbarch_tdep, not i386_gdbarch_tdep. After this cast we are relying on undefined behaviour, in my case I happen to trigger an assert, but this might not always be the case. The thing I tried that exposed this problem was of course, trying to start an executable of the wrong architecture on a native target. I don't think that the correct solution for this problem is to detect, at the point of cast, that the gdbarch_tdep object is of the wrong type, but, I did wonder, is there a way that we could protect ourselves from incorrectly casting the gdbarch_tdep object? I think that there is something we can do here, and this commit is the first step in that direction, though no actual check is added by this commit. This commit can be split into two parts: (1) In gdbarch.h and arch-utils.c. In these files I have modified gdbarch_tdep (the function) so that it now takes a template argument, like this: template<typename TDepType> static inline TDepType * gdbarch_tdep (struct gdbarch *gdbarch) { struct gdbarch_tdep *tdep = gdbarch_tdep_1 (gdbarch); return static_cast<TDepType *> (tdep); } After this change we are no better protected, but the cast is now done within the gdbarch_tdep function rather than at the call sites, this leads to the second, much larger change in this commit, (2) Everywhere gdbarch_tdep is called, we make changes like this: - i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch); + i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch); There should be no functional change after this commit. In the next commit I will build on this change to add an assertion in gdbarch_tdep that checks we are casting to the correct type.
This commit is contained in:
parent
602707187f
commit
08106042d9
118 changed files with 678 additions and 661 deletions
|
@ -90,7 +90,7 @@ aarch64_fbsd_nat_target::fetch_registers (struct regcache *regcache,
|
||||||
&aarch64_fbsd_fpregset);
|
&aarch64_fbsd_fpregset);
|
||||||
|
|
||||||
gdbarch *gdbarch = regcache->arch ();
|
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 ())
|
if (tdep->has_tls ())
|
||||||
{
|
{
|
||||||
const struct regcache_map_entry aarch64_fbsd_tls_regmap[] =
|
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);
|
PT_SETFPREGS, &aarch64_fbsd_fpregset);
|
||||||
|
|
||||||
gdbarch *gdbarch = regcache->arch ();
|
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 ())
|
if (tdep->has_tls ())
|
||||||
{
|
{
|
||||||
const struct regcache_map_entry aarch64_fbsd_tls_regmap[] =
|
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,
|
void *cb_data,
|
||||||
const struct regcache *regcache)
|
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,
|
cb (".reg", AARCH64_FBSD_SIZEOF_GREGSET, AARCH64_FBSD_SIZEOF_GREGSET,
|
||||||
&aarch64_fbsd_gregset, NULL, cb_data);
|
&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,
|
aarch64_fbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
|
||||||
CORE_ADDR lm_addr, CORE_ADDR offset)
|
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;
|
struct regcache *regcache;
|
||||||
|
|
||||||
regcache = get_thread_arch_regcache (current_inferior ()->process_target (),
|
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
|
static void
|
||||||
aarch64_fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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. */
|
/* Generic FreeBSD support. */
|
||||||
fbsd_init_abi (info, gdbarch);
|
fbsd_init_abi (info, gdbarch);
|
||||||
|
|
|
@ -359,7 +359,7 @@ static void
|
||||||
fetch_pauth_masks_from_thread (struct regcache *regcache)
|
fetch_pauth_masks_from_thread (struct regcache *regcache)
|
||||||
{
|
{
|
||||||
aarch64_gdbarch_tdep *tdep
|
aarch64_gdbarch_tdep *tdep
|
||||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
= gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
|
||||||
int ret;
|
int ret;
|
||||||
struct iovec iovec;
|
struct iovec iovec;
|
||||||
uint64_t pauth_regset[2] = {0, 0};
|
uint64_t pauth_regset[2] = {0, 0};
|
||||||
|
@ -385,7 +385,7 @@ static void
|
||||||
fetch_mteregs_from_thread (struct regcache *regcache)
|
fetch_mteregs_from_thread (struct regcache *regcache)
|
||||||
{
|
{
|
||||||
aarch64_gdbarch_tdep *tdep
|
aarch64_gdbarch_tdep *tdep
|
||||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
= gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
|
||||||
int regno = tdep->mte_reg_base;
|
int regno = tdep->mte_reg_base;
|
||||||
|
|
||||||
gdb_assert (regno != -1);
|
gdb_assert (regno != -1);
|
||||||
|
@ -410,7 +410,7 @@ static void
|
||||||
store_mteregs_to_thread (struct regcache *regcache)
|
store_mteregs_to_thread (struct regcache *regcache)
|
||||||
{
|
{
|
||||||
aarch64_gdbarch_tdep *tdep
|
aarch64_gdbarch_tdep *tdep
|
||||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
= gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
|
||||||
int regno = tdep->mte_reg_base;
|
int regno = tdep->mte_reg_base;
|
||||||
|
|
||||||
gdb_assert (regno != -1);
|
gdb_assert (regno != -1);
|
||||||
|
@ -439,7 +439,7 @@ static void
|
||||||
fetch_tlsregs_from_thread (struct regcache *regcache)
|
fetch_tlsregs_from_thread (struct regcache *regcache)
|
||||||
{
|
{
|
||||||
aarch64_gdbarch_tdep *tdep
|
aarch64_gdbarch_tdep *tdep
|
||||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
= gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
|
||||||
int regno = tdep->tls_regnum;
|
int regno = tdep->tls_regnum;
|
||||||
|
|
||||||
gdb_assert (regno != -1);
|
gdb_assert (regno != -1);
|
||||||
|
@ -464,7 +464,7 @@ static void
|
||||||
store_tlsregs_to_thread (struct regcache *regcache)
|
store_tlsregs_to_thread (struct regcache *regcache)
|
||||||
{
|
{
|
||||||
aarch64_gdbarch_tdep *tdep
|
aarch64_gdbarch_tdep *tdep
|
||||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
= gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
|
||||||
int regno = tdep->tls_regnum;
|
int regno = tdep->tls_regnum;
|
||||||
|
|
||||||
gdb_assert (regno != -1);
|
gdb_assert (regno != -1);
|
||||||
|
@ -493,7 +493,7 @@ static void
|
||||||
aarch64_fetch_registers (struct regcache *regcache, int regno)
|
aarch64_fetch_registers (struct regcache *regcache, int regno)
|
||||||
{
|
{
|
||||||
aarch64_gdbarch_tdep *tdep
|
aarch64_gdbarch_tdep *tdep
|
||||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
= gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
|
||||||
|
|
||||||
if (regno == -1)
|
if (regno == -1)
|
||||||
{
|
{
|
||||||
|
@ -543,7 +543,7 @@ static void
|
||||||
aarch32_fetch_registers (struct regcache *regcache, int regno)
|
aarch32_fetch_registers (struct regcache *regcache, int regno)
|
||||||
{
|
{
|
||||||
arm_gdbarch_tdep *tdep
|
arm_gdbarch_tdep *tdep
|
||||||
= (arm_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
= gdbarch_tdep<arm_gdbarch_tdep> (regcache->arch ());
|
||||||
|
|
||||||
if (regno == -1)
|
if (regno == -1)
|
||||||
{
|
{
|
||||||
|
@ -579,7 +579,7 @@ static void
|
||||||
aarch64_store_registers (struct regcache *regcache, int regno)
|
aarch64_store_registers (struct regcache *regcache, int regno)
|
||||||
{
|
{
|
||||||
aarch64_gdbarch_tdep *tdep
|
aarch64_gdbarch_tdep *tdep
|
||||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
= gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
|
||||||
|
|
||||||
if (regno == -1)
|
if (regno == -1)
|
||||||
{
|
{
|
||||||
|
@ -619,7 +619,7 @@ static void
|
||||||
aarch32_store_registers (struct regcache *regcache, int regno)
|
aarch32_store_registers (struct regcache *regcache, int regno)
|
||||||
{
|
{
|
||||||
arm_gdbarch_tdep *tdep
|
arm_gdbarch_tdep *tdep
|
||||||
= (arm_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
= gdbarch_tdep<arm_gdbarch_tdep> (regcache->arch ());
|
||||||
|
|
||||||
if (regno == -1)
|
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. */
|
/* Only return it if the current vector length matches the one in the tdep. */
|
||||||
aarch64_gdbarch_tdep *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 ());
|
uint64_t vq = aarch64_sve_get_vq (ptid.lwp ());
|
||||||
if (vq == tdep->vq)
|
if (vq == tdep->vq)
|
||||||
return inf->gdbarch;
|
return inf->gdbarch;
|
||||||
|
|
|
@ -289,7 +289,7 @@ aarch64_linux_sigframe_init (const struct tramp_frame *self,
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
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 sp = get_frame_register_unsigned (this_frame, AARCH64_SP_REGNUM);
|
||||||
CORE_ADDR sigcontext_addr = (sp + AARCH64_RT_SIGFRAME_UCONTEXT_OFFSET
|
CORE_ADDR sigcontext_addr = (sp + AARCH64_RT_SIGFRAME_UCONTEXT_OFFSET
|
||||||
+ AARCH64_UCONTEXT_SIGCONTEXT_OFFSET );
|
+ AARCH64_UCONTEXT_SIGCONTEXT_OFFSET );
|
||||||
|
@ -643,7 +643,7 @@ aarch64_linux_collect_sve_regset (const struct regset *regset,
|
||||||
gdb_byte *header = (gdb_byte *) buf;
|
gdb_byte *header = (gdb_byte *) buf;
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
struct gdbarch *gdbarch = regcache->arch ();
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
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;
|
uint64_t vq = tdep->vq;
|
||||||
|
|
||||||
gdb_assert (buf != NULL);
|
gdb_assert (buf != NULL);
|
||||||
|
@ -679,7 +679,7 @@ aarch64_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
void *cb_data,
|
void *cb_data,
|
||||||
const struct regcache *regcache)
|
const struct regcache *regcache)
|
||||||
{
|
{
|
||||||
aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
cb (".reg", AARCH64_LINUX_SIZEOF_GREGSET, AARCH64_LINUX_SIZEOF_GREGSET,
|
cb (".reg", AARCH64_LINUX_SIZEOF_GREGSET, AARCH64_LINUX_SIZEOF_GREGSET,
|
||||||
&aarch64_linux_gregset, NULL, cb_data);
|
&aarch64_linux_gregset, NULL, cb_data);
|
||||||
|
@ -1748,7 +1748,7 @@ aarch64_linux_report_signal_info (struct gdbarch *gdbarch,
|
||||||
struct ui_out *uiout,
|
struct ui_out *uiout,
|
||||||
enum gdb_signal siggnal)
|
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)
|
if (!tdep->has_mte () || siggnal != GDB_SIGNAL_SEGV)
|
||||||
return;
|
return;
|
||||||
|
@ -1970,7 +1970,7 @@ aarch64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||||
NULL };
|
NULL };
|
||||||
static const char *const stap_register_indirection_suffixes[] = { "]",
|
static const char *const stap_register_indirection_suffixes[] = { "]",
|
||||||
NULL };
|
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;
|
tdep->lowest_pc = 0x8000;
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
static void
|
static void
|
||||||
aarch64_newlib_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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.
|
/* Jump buffer - support for longjmp.
|
||||||
Offset of original PC in jump buffer (in registers). */
|
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)
|
else if (inst.opcode->iclass == ic_system)
|
||||||
{
|
{
|
||||||
aarch64_gdbarch_tdep *tdep
|
aarch64_gdbarch_tdep *tdep
|
||||||
= (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
= gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
|
||||||
int ra_state_val = 0;
|
int ra_state_val = 0;
|
||||||
|
|
||||||
if (insn == 0xd503233f /* paciasp. */
|
if (insn == 0xd503233f /* paciasp. */
|
||||||
|
@ -640,7 +640,7 @@ aarch64_analyze_prologue_test (void)
|
||||||
struct aarch64_prologue_cache cache;
|
struct aarch64_prologue_cache cache;
|
||||||
cache.saved_regs = trad_frame_alloc_saved_regs (gdbarch);
|
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. */
|
/* 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". */
|
/* Halt the backtrace at "_start". */
|
||||||
gdbarch *arch = get_frame_arch (this_frame);
|
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)
|
if (cache->prev_pc <= tdep->lowest_pc)
|
||||||
return UNWIND_OUTERMOST;
|
return UNWIND_OUTERMOST;
|
||||||
|
|
||||||
|
@ -1120,7 +1120,7 @@ aarch64_prologue_prev_register (struct frame_info *this_frame,
|
||||||
CORE_ADDR lr;
|
CORE_ADDR lr;
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||||
aarch64_gdbarch_tdep *tdep
|
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);
|
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)
|
void **this_cache, int regnum)
|
||||||
{
|
{
|
||||||
gdbarch *arch = get_frame_arch (this_frame);
|
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;
|
CORE_ADDR lr;
|
||||||
|
|
||||||
switch (regnum)
|
switch (regnum)
|
||||||
|
@ -1315,7 +1315,7 @@ aarch64_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
|
||||||
struct dwarf2_frame_state_reg *reg,
|
struct dwarf2_frame_state_reg *reg,
|
||||||
struct frame_info *this_frame)
|
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)
|
switch (regnum)
|
||||||
{
|
{
|
||||||
|
@ -1355,7 +1355,7 @@ static bool
|
||||||
aarch64_execute_dwarf_cfa_vendor_op (struct gdbarch *gdbarch, gdb_byte op,
|
aarch64_execute_dwarf_cfa_vendor_op (struct gdbarch *gdbarch, gdb_byte op,
|
||||||
struct dwarf2_frame_state *fs)
|
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;
|
struct dwarf2_frame_state_reg *ra_state;
|
||||||
|
|
||||||
if (op == DW_CFA_AARCH64_negate_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 *
|
static struct type *
|
||||||
aarch64_vnq_type (struct gdbarch *gdbarch)
|
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)
|
if (tdep->vnq_type == NULL)
|
||||||
{
|
{
|
||||||
|
@ -2023,7 +2023,7 @@ aarch64_vnq_type (struct gdbarch *gdbarch)
|
||||||
static struct type *
|
static struct type *
|
||||||
aarch64_vnd_type (struct gdbarch *gdbarch)
|
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)
|
if (tdep->vnd_type == NULL)
|
||||||
{
|
{
|
||||||
|
@ -2053,7 +2053,7 @@ aarch64_vnd_type (struct gdbarch *gdbarch)
|
||||||
static struct type *
|
static struct type *
|
||||||
aarch64_vns_type (struct gdbarch *gdbarch)
|
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)
|
if (tdep->vns_type == NULL)
|
||||||
{
|
{
|
||||||
|
@ -2083,7 +2083,7 @@ aarch64_vns_type (struct gdbarch *gdbarch)
|
||||||
static struct type *
|
static struct type *
|
||||||
aarch64_vnh_type (struct gdbarch *gdbarch)
|
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)
|
if (tdep->vnh_type == NULL)
|
||||||
{
|
{
|
||||||
|
@ -2116,7 +2116,7 @@ aarch64_vnh_type (struct gdbarch *gdbarch)
|
||||||
static struct type *
|
static struct type *
|
||||||
aarch64_vnb_type (struct gdbarch *gdbarch)
|
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)
|
if (tdep->vnb_type == NULL)
|
||||||
{
|
{
|
||||||
|
@ -2143,7 +2143,7 @@ aarch64_vnb_type (struct gdbarch *gdbarch)
|
||||||
static struct type *
|
static struct type *
|
||||||
aarch64_vnv_type (struct gdbarch *gdbarch)
|
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)
|
if (tdep->vnv_type == NULL)
|
||||||
{
|
{
|
||||||
|
@ -2214,7 +2214,7 @@ aarch64_vnv_type (struct gdbarch *gdbarch)
|
||||||
static int
|
static int
|
||||||
aarch64_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
|
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)
|
if (reg >= AARCH64_DWARF_X0 && reg <= AARCH64_DWARF_X0 + 30)
|
||||||
return AARCH64_X0_REGNUM + reg - AARCH64_DWARF_X0;
|
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;
|
CORE_ADDR jb_addr;
|
||||||
gdb_byte buf[X_REGISTER_SIZE];
|
gdb_byte buf[X_REGISTER_SIZE];
|
||||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
|
|
||||||
jb_addr = get_frame_register_unsigned (frame, AARCH64_X0_REGNUM);
|
jb_addr = get_frame_register_unsigned (frame, AARCH64_X0_REGNUM);
|
||||||
|
@ -2549,7 +2549,7 @@ aarch64_gen_return_address (struct gdbarch *gdbarch,
|
||||||
static const char *
|
static const char *
|
||||||
aarch64_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
|
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[] =
|
static const char *const q_name[] =
|
||||||
{
|
{
|
||||||
|
@ -2663,7 +2663,7 @@ aarch64_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
|
||||||
static struct type *
|
static struct type *
|
||||||
aarch64_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
|
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);
|
int p_regnum = regnum - gdbarch_num_regs (gdbarch);
|
||||||
|
|
||||||
|
@ -2700,7 +2700,7 @@ static int
|
||||||
aarch64_pseudo_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
aarch64_pseudo_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
||||||
const struct reggroup *group)
|
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);
|
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,
|
aarch64_pseudo_read_value (struct gdbarch *gdbarch, readable_regcache *regcache,
|
||||||
int regnum)
|
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));
|
struct value *result_value = allocate_value (register_type (gdbarch, regnum));
|
||||||
|
|
||||||
VALUE_LVAL (result_value) = lval_register;
|
VALUE_LVAL (result_value) = lval_register;
|
||||||
|
@ -2824,7 +2824,7 @@ static void
|
||||||
aarch64_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
aarch64_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
int regnum, const gdb_byte *buf)
|
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);
|
regnum -= gdbarch_num_regs (gdbarch);
|
||||||
|
|
||||||
if (regnum >= AARCH64_Q0_REGNUM && regnum < AARCH64_Q0_REGNUM + 32)
|
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
|
static int
|
||||||
aarch64_cannot_store_register (struct gdbarch *gdbarch, int regnum)
|
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 ())
|
if (!tdep->has_pauth ())
|
||||||
return 0;
|
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))
|
best_arch = gdbarch_list_lookup_by_info (best_arch->next, &info))
|
||||||
{
|
{
|
||||||
aarch64_gdbarch_tdep *tdep
|
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)
|
if (tdep && tdep->vq == vq)
|
||||||
return best_arch->gdbarch;
|
return best_arch->gdbarch;
|
||||||
}
|
}
|
||||||
|
@ -3693,7 +3693,7 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||||
static void
|
static void
|
||||||
aarch64_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
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)
|
if (tdep == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -3915,7 +3915,7 @@ aarch64_record_branch_except_sys (aarch64_insn_decode_record *aarch64_insn_r)
|
||||||
{
|
{
|
||||||
|
|
||||||
aarch64_gdbarch_tdep *tdep
|
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;
|
uint8_t insn_bits24_27, insn_bits28_31, insn_bits22_23;
|
||||||
uint32_t record_buf[4];
|
uint32_t record_buf[4];
|
||||||
|
|
||||||
|
|
|
@ -1111,7 +1111,7 @@ static void
|
||||||
supply_gprs64 (struct regcache *regcache, uint64_t *vals)
|
supply_gprs64 (struct regcache *regcache, uint64_t *vals)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep
|
ppc_gdbarch_tdep *tdep
|
||||||
= (ppc_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
= gdbarch_tdep<ppc_gdbarch_tdep> (regcache->arch ());
|
||||||
int regno;
|
int regno;
|
||||||
|
|
||||||
for (regno = 0; regno < ppc_num_gprs; regno++)
|
for (regno = 0; regno < ppc_num_gprs; regno++)
|
||||||
|
@ -1133,7 +1133,7 @@ static void
|
||||||
supply_fprs (struct regcache *regcache, double *vals)
|
supply_fprs (struct regcache *regcache, double *vals)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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;
|
int regno;
|
||||||
|
|
||||||
/* This function should never be called on architectures without
|
/* This function should never be called on architectures without
|
||||||
|
@ -1151,7 +1151,7 @@ supply_fprs (struct regcache *regcache, double *vals)
|
||||||
static int
|
static int
|
||||||
special_register_p (struct gdbarch *gdbarch, int regno)
|
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)
|
return regno == gdbarch_pc_regnum (gdbarch)
|
||||||
|| regno == tdep->ppc_ps_regnum
|
|| regno == tdep->ppc_ps_regnum
|
||||||
|
@ -1174,7 +1174,7 @@ supply_sprs64 (struct regcache *regcache,
|
||||||
uint32_t fpscr)
|
uint32_t fpscr)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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 (gdbarch_pc_regnum (gdbarch), (char *) &iar);
|
||||||
regcache->raw_supply (tdep->ppc_ps_regnum, (char *) &msr);
|
regcache->raw_supply (tdep->ppc_ps_regnum, (char *) &msr);
|
||||||
|
@ -1196,7 +1196,7 @@ supply_sprs32 (struct regcache *regcache,
|
||||||
uint32_t fpscr)
|
uint32_t fpscr)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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 (gdbarch_pc_regnum (gdbarch), (char *) &iar);
|
||||||
regcache->raw_supply (tdep->ppc_ps_regnum, (char *) &msr);
|
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)
|
fetch_regs_user_thread (struct regcache *regcache, pthdb_pthread_t pdtid)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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;
|
int status, i;
|
||||||
pthdb_context_t ctx;
|
pthdb_context_t ctx;
|
||||||
|
|
||||||
|
@ -1274,7 +1274,7 @@ fetch_regs_kernel_thread (struct regcache *regcache, int regno,
|
||||||
pthdb_tid_t tid)
|
pthdb_tid_t tid)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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];
|
uint64_t gprs64[ppc_num_gprs];
|
||||||
uint32_t gprs32[ppc_num_gprs];
|
uint32_t gprs32[ppc_num_gprs];
|
||||||
double fprs[ppc_num_fprs];
|
double fprs[ppc_num_fprs];
|
||||||
|
@ -1377,7 +1377,7 @@ static void
|
||||||
fill_gprs64 (const struct regcache *regcache, uint64_t *vals)
|
fill_gprs64 (const struct regcache *regcache, uint64_t *vals)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep
|
ppc_gdbarch_tdep *tdep
|
||||||
= (ppc_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
= gdbarch_tdep<ppc_gdbarch_tdep> (regcache->arch ());
|
||||||
int regno;
|
int regno;
|
||||||
|
|
||||||
for (regno = 0; regno < ppc_num_gprs; regno++)
|
for (regno = 0; regno < ppc_num_gprs; regno++)
|
||||||
|
@ -1390,7 +1390,7 @@ static void
|
||||||
fill_gprs32 (const struct regcache *regcache, uint32_t *vals)
|
fill_gprs32 (const struct regcache *regcache, uint32_t *vals)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep
|
ppc_gdbarch_tdep *tdep
|
||||||
= (ppc_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
|
= gdbarch_tdep<ppc_gdbarch_tdep> (regcache->arch ());
|
||||||
int regno;
|
int regno;
|
||||||
|
|
||||||
for (regno = 0; regno < ppc_num_gprs; regno++)
|
for (regno = 0; regno < ppc_num_gprs; regno++)
|
||||||
|
@ -1404,7 +1404,7 @@ static void
|
||||||
fill_fprs (const struct regcache *regcache, double *vals)
|
fill_fprs (const struct regcache *regcache, double *vals)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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;
|
int regno;
|
||||||
|
|
||||||
/* This function should never be called on architectures without
|
/* This function should never be called on architectures without
|
||||||
|
@ -1428,7 +1428,7 @@ fill_sprs64 (const struct regcache *regcache,
|
||||||
uint32_t *fpscr)
|
uint32_t *fpscr)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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
|
/* 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
|
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)
|
uint32_t *fpscr)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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
|
/* 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
|
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)
|
store_regs_user_thread (const struct regcache *regcache, pthdb_pthread_t pdtid)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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;
|
int status, i;
|
||||||
pthdb_context_t ctx;
|
pthdb_context_t ctx;
|
||||||
uint32_t int32;
|
uint32_t int32;
|
||||||
|
@ -1589,7 +1589,7 @@ store_regs_kernel_thread (const struct regcache *regcache, int regno,
|
||||||
pthdb_tid_t tid)
|
pthdb_tid_t tid)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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];
|
uint64_t gprs64[ppc_num_gprs];
|
||||||
uint32_t gprs32[ppc_num_gprs];
|
uint32_t gprs32[ppc_num_gprs];
|
||||||
double fprs[ppc_num_fprs];
|
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. */
|
/* Hook into the MDEBUG frame unwinder. */
|
||||||
alpha_mdebug_init_abi (info, gdbarch);
|
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->dynamic_sigtramp_offset = alpha_linux_sigtramp_offset;
|
||||||
tdep->sigcontext_addr = alpha_linux_sigcontext_addr;
|
tdep->sigcontext_addr = alpha_linux_sigcontext_addr;
|
||||||
tdep->pc_in_sigtramp = alpha_linux_pc_in_sigtramp;
|
tdep->pc_in_sigtramp = alpha_linux_pc_in_sigtramp;
|
||||||
|
|
|
@ -250,7 +250,7 @@ static void
|
||||||
alphanbsd_init_abi (struct gdbarch_info info,
|
alphanbsd_init_abi (struct gdbarch_info info,
|
||||||
struct gdbarch *gdbarch)
|
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. */
|
/* Hook into the DWARF CFI frame unwinder. */
|
||||||
alpha_dwarf2_init_abi (info, gdbarch);
|
alpha_dwarf2_init_abi (info, gdbarch);
|
||||||
|
|
|
@ -97,7 +97,7 @@ alphaobsd_sigcontext_addr (struct frame_info *this_frame)
|
||||||
static void
|
static void
|
||||||
alphaobsd_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
|
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. */
|
/* Hook into the DWARF CFI frame unwinder. */
|
||||||
alpha_dwarf2_init_abi (info, gdbarch);
|
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)
|
gdb_byte *readbuf, const gdb_byte *writebuf)
|
||||||
{
|
{
|
||||||
enum type_code code = type->code ();
|
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
|
if ((code == TYPE_CODE_STRUCT
|
||||||
|| code == TYPE_CODE_UNION
|
|| code == TYPE_CODE_UNION
|
||||||
|
@ -851,7 +851,7 @@ static int
|
||||||
alpha_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
|
alpha_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
CORE_ADDR jb_addr;
|
CORE_ADDR jb_addr;
|
||||||
gdb_byte raw_buffer[ALPHA_REGISTER_SIZE];
|
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;
|
*this_prologue_cache = info;
|
||||||
|
|
||||||
gdbarch *arch = get_frame_arch (this_frame);
|
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);
|
info->sigcontext_addr = tdep->sigcontext_addr (this_frame);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
|
@ -904,7 +904,7 @@ static CORE_ADDR
|
||||||
alpha_sigtramp_register_address (struct gdbarch *gdbarch,
|
alpha_sigtramp_register_address (struct gdbarch *gdbarch,
|
||||||
CORE_ADDR sigcontext_addr, int regnum)
|
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)
|
if (regnum >= 0 && regnum < 32)
|
||||||
return sigcontext_addr + tdep->sc_regs_offset + regnum * 8;
|
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 frame_id *this_id)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
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
|
struct alpha_sigtramp_unwind_cache *info
|
||||||
= alpha_sigtramp_frame_unwind_cache (this_frame, this_prologue_cache);
|
= alpha_sigtramp_frame_unwind_cache (this_frame, this_prologue_cache);
|
||||||
CORE_ADDR stack_addr, code_addr;
|
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
|
/* We shouldn't even bother to try if the OSABI didn't register a
|
||||||
sigcontext_addr handler or pc_in_sigtramp handler. */
|
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)
|
if (tdep->sigcontext_addr == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -1041,7 +1041,7 @@ static int heuristic_fence_post = 0;
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
alpha_heuristic_proc_start (struct gdbarch *gdbarch, CORE_ADDR pc)
|
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 last_non_nop = pc;
|
||||||
CORE_ADDR fence = pc - heuristic_fence_post;
|
CORE_ADDR fence = pc - heuristic_fence_post;
|
||||||
CORE_ADDR orig_pc = pc;
|
CORE_ADDR orig_pc = pc;
|
||||||
|
|
|
@ -97,7 +97,7 @@ amd64_darwin_sigcontext_addr (struct frame_info *this_frame)
|
||||||
static void
|
static void
|
||||||
x86_darwin_init_abi_64 (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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_init_abi (info, gdbarch,
|
||||||
amd64_target_description (X86_XSTATE_SSE_MASK, true));
|
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 ();
|
struct gdbarch *gdbarch = regcache->arch ();
|
||||||
#if defined(PT_GETFSBASE) || defined(PT_GETGSBASE)
|
#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
|
#endif
|
||||||
pid_t pid = get_ptrace_pid (regcache->ptid ());
|
pid_t pid = get_ptrace_pid (regcache->ptid ());
|
||||||
const struct regset *gregset = find_gregset (gdbarch);
|
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 ();
|
struct gdbarch *gdbarch = regcache->arch ();
|
||||||
#if defined(PT_GETFSBASE) || defined(PT_GETGSBASE)
|
#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
|
#endif
|
||||||
pid_t pid = get_ptrace_pid (regcache->ptid ());
|
pid_t pid = get_ptrace_pid (regcache->ptid ());
|
||||||
const struct regset *gregset = find_gregset (gdbarch);
|
const struct regset *gregset = find_gregset (gdbarch);
|
||||||
|
|
|
@ -262,7 +262,7 @@ amd64fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
void *cb_data,
|
void *cb_data,
|
||||||
const struct regcache *regcache)
|
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,
|
cb (".reg", AMD64_FBSD_SIZEOF_GREGSET, AMD64_FBSD_SIZEOF_GREGSET,
|
||||||
&amd64_fbsd_gregset, NULL, cb_data);
|
&amd64_fbsd_gregset, NULL, cb_data);
|
||||||
|
@ -299,7 +299,7 @@ amd64fbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
|
||||||
static void
|
static void
|
||||||
amd64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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. */
|
/* Generic FreeBSD support. */
|
||||||
fbsd_init_abi (info, gdbarch);
|
fbsd_init_abi (info, gdbarch);
|
||||||
|
|
|
@ -1659,7 +1659,7 @@ amd64_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
void *cb_data,
|
void *cb_data,
|
||||||
const struct regcache *regcache)
|
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 (".reg", 27 * 8, 27 * 8, &i386_gregset, NULL, cb_data);
|
||||||
cb (".reg2", 512, 512, &amd64_fpregset, 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,
|
amd64_linux_init_abi_common(struct gdbarch_info info, struct gdbarch *gdbarch,
|
||||||
int num_disp_step_buffers)
|
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);
|
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
|
static void
|
||||||
amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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;
|
struct tdesc_arch_data *tdesc_data = info.tdesc_data;
|
||||||
const struct tdesc_feature *feature;
|
const struct tdesc_feature *feature;
|
||||||
int valid_p;
|
int valid_p;
|
||||||
|
@ -2063,7 +2063,7 @@ amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||||
static void
|
static void
|
||||||
amd64_x32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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;
|
struct tdesc_arch_data *tdesc_data = info.tdesc_data;
|
||||||
const struct tdesc_feature *feature;
|
const struct tdesc_feature *feature;
|
||||||
int valid_p;
|
int valid_p;
|
||||||
|
|
|
@ -97,7 +97,7 @@ int amd64nbsd_r_reg_offset[] =
|
||||||
static void
|
static void
|
||||||
amd64nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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. */
|
/* Initialize general-purpose register set details first. */
|
||||||
tdep->gregset_reg_offset = amd64nbsd_r_reg_offset;
|
tdep->gregset_reg_offset = amd64nbsd_r_reg_offset;
|
||||||
|
|
|
@ -420,7 +420,7 @@ static const struct frame_unwind amd64obsd_trapframe_unwind =
|
||||||
static void
|
static void
|
||||||
amd64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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_init_abi (info, gdbarch,
|
||||||
amd64_target_description (X86_XSTATE_SSE_MASK, true));
|
amd64_target_description (X86_XSTATE_SSE_MASK, true));
|
||||||
|
|
|
@ -80,7 +80,7 @@ amd64_sol2_mcontext_addr (struct frame_info *this_frame)
|
||||||
static void
|
static void
|
||||||
amd64_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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_reg_offset = amd64_sol2_gregset_reg_offset;
|
||||||
tdep->gregset_num_regs = ARRAY_SIZE (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
|
static int
|
||||||
amd64_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
|
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 ymm0_regnum = tdep->ymm0_regnum;
|
||||||
int regnum = -1;
|
int regnum = -1;
|
||||||
|
|
||||||
|
@ -331,7 +331,7 @@ static const char * const amd64_dword_names[] =
|
||||||
static const char *
|
static const char *
|
||||||
amd64_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
|
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))
|
if (i386_byte_regnum_p (gdbarch, regnum))
|
||||||
return amd64_byte_names[regnum - tdep->al_regnum];
|
return amd64_byte_names[regnum - tdep->al_regnum];
|
||||||
else if (i386_zmm_regnum_p (gdbarch, regnum))
|
else if (i386_zmm_regnum_p (gdbarch, regnum))
|
||||||
|
@ -353,7 +353,7 @@ amd64_pseudo_register_read_value (struct gdbarch *gdbarch,
|
||||||
readable_regcache *regcache,
|
readable_regcache *regcache,
|
||||||
int regnum)
|
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 *result_value = allocate_value (register_type (gdbarch, regnum));
|
||||||
VALUE_LVAL (result_value) = lval_register;
|
VALUE_LVAL (result_value) = lval_register;
|
||||||
|
@ -413,7 +413,7 @@ amd64_pseudo_register_write (struct gdbarch *gdbarch,
|
||||||
struct regcache *regcache,
|
struct regcache *regcache,
|
||||||
int regnum, const gdb_byte *buf)
|
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))
|
if (i386_byte_regnum_p (gdbarch, regnum))
|
||||||
{
|
{
|
||||||
|
@ -465,7 +465,7 @@ static int
|
||||||
amd64_ax_pseudo_register_collect (struct gdbarch *gdbarch,
|
amd64_ax_pseudo_register_collect (struct gdbarch *gdbarch,
|
||||||
struct agent_expr *ax, int regnum)
|
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))
|
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)
|
amd64_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
struct amd64_frame_cache *cache;
|
struct amd64_frame_cache *cache;
|
||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
|
@ -2832,7 +2832,7 @@ amd64_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||||
void **this_cache)
|
void **this_cache)
|
||||||
{
|
{
|
||||||
gdbarch *arch = get_frame_arch (this_frame);
|
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
|
/* We shouldn't even bother if we don't have a sigcontext_addr
|
||||||
handler. */
|
handler. */
|
||||||
|
@ -3032,7 +3032,7 @@ amd64_supply_fpregset (const struct regset *regset, struct regcache *regcache,
|
||||||
int regnum, const void *fpregs, size_t len)
|
int regnum, const void *fpregs, size_t len)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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);
|
gdb_assert (len >= tdep->sizeof_fpregset);
|
||||||
amd64_supply_fxsave (regcache, regnum, fpregs);
|
amd64_supply_fxsave (regcache, regnum, fpregs);
|
||||||
|
@ -3049,7 +3049,7 @@ amd64_collect_fpregset (const struct regset *regset,
|
||||||
int regnum, void *fpregs, size_t len)
|
int regnum, void *fpregs, size_t len)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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);
|
gdb_assert (len >= tdep->sizeof_fpregset);
|
||||||
amd64_collect_fxsave (regcache, regnum, fpregs);
|
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];
|
gdb_byte buf[8];
|
||||||
CORE_ADDR jb_addr;
|
CORE_ADDR jb_addr;
|
||||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
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 jb_pc_offset = tdep->jb_pc_offset;
|
||||||
int len = TYPE_LENGTH (builtin_type (gdbarch)->builtin_func_ptr);
|
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,
|
amd64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch,
|
||||||
const target_desc *default_tdesc)
|
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;
|
const struct target_desc *tdesc = info.target_desc;
|
||||||
static const char *const stap_integer_prefixes[] = { "$", NULL };
|
static const char *const stap_integer_prefixes[] = { "$", NULL };
|
||||||
static const char *const stap_register_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 *
|
static struct type *
|
||||||
amd64_x32_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
|
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)
|
switch (regnum - tdep->eax_regnum)
|
||||||
{
|
{
|
||||||
|
@ -3314,7 +3314,7 @@ void
|
||||||
amd64_x32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch,
|
amd64_x32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch,
|
||||||
const target_desc *default_tdesc)
|
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);
|
amd64_init_abi (info, gdbarch, default_tdesc);
|
||||||
|
|
||||||
|
@ -3384,7 +3384,7 @@ amd64_supply_fxsave (struct regcache *regcache, int regnum,
|
||||||
const void *fxsave)
|
const void *fxsave)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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);
|
i387_supply_fxsave (regcache, regnum, fxsave);
|
||||||
|
|
||||||
|
@ -3407,7 +3407,7 @@ amd64_supply_xsave (struct regcache *regcache, int regnum,
|
||||||
const void *xsave)
|
const void *xsave)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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);
|
i387_supply_xsave (regcache, regnum, xsave);
|
||||||
|
|
||||||
|
@ -3442,7 +3442,7 @@ amd64_collect_fxsave (const struct regcache *regcache, int regnum,
|
||||||
void *fxsave)
|
void *fxsave)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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;
|
gdb_byte *regs = (gdb_byte *) fxsave;
|
||||||
|
|
||||||
i387_collect_fxsave (regcache, regnum, fxsave);
|
i387_collect_fxsave (regcache, regnum, fxsave);
|
||||||
|
@ -3463,7 +3463,7 @@ amd64_collect_xsave (const struct regcache *regcache, int regnum,
|
||||||
void *xsave, int gcore)
|
void *xsave, int gcore)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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;
|
gdb_byte *regs = (gdb_byte *) xsave;
|
||||||
|
|
||||||
i387_collect_xsave (regcache, regnum, xsave, gcore);
|
i387_collect_xsave (regcache, regnum, xsave, gcore);
|
||||||
|
|
|
@ -1277,7 +1277,7 @@ amd64_windows_auto_wide_charset (void)
|
||||||
static void
|
static void
|
||||||
amd64_windows_init_abi_common (gdbarch_info info, struct gdbarch *gdbarch)
|
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
|
/* The dwarf2 unwinder (appended very early by i386_gdbarch_init) is
|
||||||
preferred over the SEH one. The reasons are:
|
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)
|
arc_linux_software_single_step (struct regcache *regcache)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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);
|
struct gdb_non_printing_memory_disassembler dis (gdbarch);
|
||||||
|
|
||||||
/* Read current instruction. */
|
/* Read current instruction. */
|
||||||
|
@ -694,7 +694,7 @@ arc_linux_core_read_description (struct gdbarch *gdbarch,
|
||||||
static void
|
static void
|
||||||
arc_linux_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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.");
|
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_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 of original PC in longjmp jump buffer (in registers). Value of PC
|
||||||
offset can be found in newlib/libc/machine/arc/setjmp.S. */
|
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");
|
arc_debug_printf ("called");
|
||||||
|
|
||||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
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;
|
int pc_offset = tdep->jb_pc * ARC_REGISTER_SIZE;
|
||||||
gdb_byte buf[ARC_REGISTER_SIZE];
|
gdb_byte buf[ARC_REGISTER_SIZE];
|
||||||
CORE_ADDR jb_addr = get_frame_register_unsigned (frame, ARC_FIRST_ARG_REGNUM);
|
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");
|
arc_debug_printf ("called");
|
||||||
|
|
||||||
gdbarch *arch = get_frame_arch (this_frame);
|
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. */
|
/* Allocate new frame cache instance and space for saved register info. */
|
||||||
struct arc_frame_cache *cache = FRAME_OBSTACK_ZALLOC (struct arc_frame_cache);
|
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");
|
arc_debug_printf ("called");
|
||||||
|
|
||||||
gdbarch *arch = get_frame_arch (this_frame);
|
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
|
/* If we have a sigcontext_addr handler, then just return 1 (same as the
|
||||||
"default_frame_sniffer ()"). */
|
"default_frame_sniffer ()"). */
|
||||||
|
@ -2414,7 +2414,7 @@ arc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||||
static void
|
static void
|
||||||
arc_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
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);
|
gdb_printf (file, "arc_dump_tdep: jb_pc = %i\n", tdep->jb_pc);
|
||||||
|
|
||||||
|
|
|
@ -1198,11 +1198,13 @@ gdbarch_free (struct gdbarch *arch)
|
||||||
xfree (obstack);
|
xfree (obstack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* See gdbarch.h. */
|
||||||
|
|
||||||
struct gdbarch_tdep *
|
struct gdbarch_tdep *
|
||||||
gdbarch_tdep (struct gdbarch *gdbarch)
|
gdbarch_tdep_1 (struct gdbarch *gdbarch)
|
||||||
{
|
{
|
||||||
if (gdbarch_debug >= 2)
|
if (gdbarch_debug >= 2)
|
||||||
gdb_printf (gdb_stdlog, "gdbarch_tdep called\n");
|
gdb_printf (gdb_stdlog, "gdbarch_tdep_1 called\n");
|
||||||
return gdbarch->tdep;
|
return gdbarch->tdep;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ arm_fbsd_nat_target::fetch_registers (struct regcache *regcache, int regnum)
|
||||||
#endif
|
#endif
|
||||||
#ifdef PT_GETREGSET
|
#ifdef PT_GETREGSET
|
||||||
gdbarch *gdbarch = regcache->arch ();
|
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)
|
if (tdep->tls_regnum > 0)
|
||||||
{
|
{
|
||||||
|
@ -90,7 +90,7 @@ arm_fbsd_nat_target::store_registers (struct regcache *regcache, int regnum)
|
||||||
#endif
|
#endif
|
||||||
#ifdef PT_GETREGSET
|
#ifdef PT_GETREGSET
|
||||||
gdbarch *gdbarch = regcache->arch ();
|
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)
|
if (tdep->tls_regnum > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -159,7 +159,7 @@ arm_fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
void *cb_data,
|
void *cb_data,
|
||||||
const struct regcache *regcache)
|
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,
|
cb (".reg", ARM_FBSD_SIZEOF_GREGSET, ARM_FBSD_SIZEOF_GREGSET,
|
||||||
&arm_fbsd_gregset, NULL, cb_data);
|
&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,
|
arm_fbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
|
||||||
CORE_ADDR lm_addr, CORE_ADDR offset)
|
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;
|
struct regcache *regcache;
|
||||||
|
|
||||||
regcache = get_thread_arch_regcache (current_inferior ()->process_target (),
|
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
|
static void
|
||||||
arm_fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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. */
|
/* Generic FreeBSD support. */
|
||||||
fbsd_init_abi (info, gdbarch);
|
fbsd_init_abi (info, gdbarch);
|
||||||
|
|
|
@ -339,7 +339,7 @@ fetch_vfp_regs (struct regcache *regcache)
|
||||||
gdb_byte regbuf[ARM_VFP3_REGS_SIZE];
|
gdb_byte regbuf[ARM_VFP3_REGS_SIZE];
|
||||||
int ret, tid;
|
int ret, tid;
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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. */
|
/* Get the thread id for the ptrace call. */
|
||||||
tid = regcache->ptid ().lwp ();
|
tid = regcache->ptid ().lwp ();
|
||||||
|
@ -368,7 +368,7 @@ store_vfp_regs (const struct regcache *regcache)
|
||||||
gdb_byte regbuf[ARM_VFP3_REGS_SIZE];
|
gdb_byte regbuf[ARM_VFP3_REGS_SIZE];
|
||||||
int ret, tid;
|
int ret, tid;
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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. */
|
/* Get the thread id for the ptrace call. */
|
||||||
tid = regcache->ptid ().lwp ();
|
tid = regcache->ptid ().lwp ();
|
||||||
|
@ -413,7 +413,7 @@ void
|
||||||
arm_linux_nat_target::fetch_registers (struct regcache *regcache, int regno)
|
arm_linux_nat_target::fetch_registers (struct regcache *regcache, int regno)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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)
|
if (-1 == regno)
|
||||||
{
|
{
|
||||||
|
@ -450,7 +450,7 @@ void
|
||||||
arm_linux_nat_target::store_registers (struct regcache *regcache, int regno)
|
arm_linux_nat_target::store_registers (struct regcache *regcache, int regno)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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)
|
if (-1 == regno)
|
||||||
{
|
{
|
||||||
|
|
|
@ -712,7 +712,7 @@ arm_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
void *cb_data,
|
void *cb_data,
|
||||||
const struct regcache *regcache)
|
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,
|
cb (".reg", ARM_LINUX_SIZEOF_GREGSET, ARM_LINUX_SIZEOF_GREGSET,
|
||||||
&arm_linux_gregset, NULL, cb_data);
|
&arm_linux_gregset, NULL, cb_data);
|
||||||
|
@ -1716,7 +1716,7 @@ arm_linux_init_abi (struct gdbarch_info info,
|
||||||
NULL };
|
NULL };
|
||||||
static const char *const stap_register_indirection_suffixes[] = { "]",
|
static const char *const stap_register_indirection_suffixes[] = { "]",
|
||||||
NULL };
|
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);
|
linux_init_abi (info, gdbarch, 1);
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ static arm_netbsd_nat_target the_arm_netbsd_nat_target;
|
||||||
static void
|
static void
|
||||||
arm_supply_vfpregset (struct regcache *regcache, struct fpreg *fpregset)
|
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)
|
if (tdep->vfp_register_count == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ fetch_fp_register (struct regcache *regcache, int regno)
|
||||||
return;
|
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)
|
if (regno == ARM_FPSCR_REGNUM && tdep->vfp_register_count != 0)
|
||||||
regcache->raw_supply (ARM_FPSCR_REGNUM, (char *) &vfp.vfp_fpscr);
|
regcache->raw_supply (ARM_FPSCR_REGNUM, (char *) &vfp.vfp_fpscr);
|
||||||
else if (regno >= ARM_D0_REGNUM
|
else if (regno >= ARM_D0_REGNUM
|
||||||
|
@ -279,7 +279,7 @@ store_fp_register (const struct regcache *regcache, int regno)
|
||||||
return;
|
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)
|
if (regno == ARM_FPSCR_REGNUM && tdep->vfp_register_count != 0)
|
||||||
regcache->raw_collect (ARM_FPSCR_REGNUM, (char *) &vfp.vfp_fpscr);
|
regcache->raw_collect (ARM_FPSCR_REGNUM, (char *) &vfp.vfp_fpscr);
|
||||||
else if (regno >= ARM_D0_REGNUM
|
else if (regno >= ARM_D0_REGNUM
|
||||||
|
@ -301,7 +301,7 @@ store_fp_register (const struct regcache *regcache, int regno)
|
||||||
static void
|
static void
|
||||||
store_fp_regs (const struct regcache *regcache)
|
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 ();
|
int lwp = regcache->ptid ().lwp ();
|
||||||
if (tdep->vfp_register_count == 0)
|
if (tdep->vfp_register_count == 0)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -111,7 +111,7 @@ static void
|
||||||
arm_netbsd_init_abi_common (struct gdbarch_info info,
|
arm_netbsd_init_abi_common (struct gdbarch_info info,
|
||||||
struct gdbarch *gdbarch)
|
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;
|
tdep->lowest_pc = 0x8000;
|
||||||
switch (info.byte_order)
|
switch (info.byte_order)
|
||||||
|
@ -148,7 +148,7 @@ static void
|
||||||
arm_netbsd_elf_init_abi (struct gdbarch_info info,
|
arm_netbsd_elf_init_abi (struct gdbarch_info info,
|
||||||
struct gdbarch *gdbarch)
|
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);
|
arm_netbsd_init_abi_common (info, gdbarch);
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,7 @@ arm_none_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
void *cb_data,
|
void *cb_data,
|
||||||
const struct regcache *regcache)
|
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,
|
cb (".reg", ARM_NONE_SIZEOF_GREGSET, ARM_NONE_SIZEOF_GREGSET,
|
||||||
&arm_none_gregset, nullptr, cb_data);
|
&arm_none_gregset, nullptr, cb_data);
|
||||||
|
|
|
@ -76,7 +76,7 @@ static void
|
||||||
armobsd_init_abi (struct gdbarch_info info,
|
armobsd_init_abi (struct gdbarch_info info,
|
||||||
struct gdbarch *gdbarch)
|
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)
|
if (tdep->fp_model == ARM_FLOAT_AUTO)
|
||||||
tdep->fp_model = ARM_FLOAT_SOFT_VFP;
|
tdep->fp_model = ARM_FLOAT_SOFT_VFP;
|
||||||
|
|
110
gdb/arm-tdep.c
110
gdb/arm-tdep.c
|
@ -355,7 +355,7 @@ static void
|
||||||
arm_cache_init (struct arm_prologue_cache *cache, struct frame_info *frame)
|
arm_cache_init (struct arm_prologue_cache *cache, struct frame_info *frame)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (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);
|
arm_cache_init (cache, gdbarch);
|
||||||
cache->sp = get_frame_register_unsigned (frame, ARM_SP_REGNUM);
|
cache->sp = get_frame_register_unsigned (frame, ARM_SP_REGNUM);
|
||||||
|
@ -553,7 +553,7 @@ bool arm_unwind_secure_frames = true;
|
||||||
int
|
int
|
||||||
arm_psr_thumb_bit (struct gdbarch *gdbarch)
|
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)
|
if (tdep->is_m)
|
||||||
return XPSR_T;
|
return XPSR_T;
|
||||||
|
@ -665,7 +665,7 @@ arm_pc_is_thumb (struct gdbarch *gdbarch, CORE_ADDR memaddr)
|
||||||
struct bound_minimal_symbol sym;
|
struct bound_minimal_symbol sym;
|
||||||
char type;
|
char type;
|
||||||
arm_displaced_step_copy_insn_closure *dsc = nullptr;
|
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))
|
if (gdbarch_displaced_step_copy_insn_closure_by_addr_p (gdbarch))
|
||||||
dsc = ((arm_displaced_step_copy_insn_closure * )
|
dsc = ((arm_displaced_step_copy_insn_closure * )
|
||||||
|
@ -769,7 +769,7 @@ arm_pc_is_thumb (struct gdbarch *gdbarch, CORE_ADDR memaddr)
|
||||||
static int
|
static int
|
||||||
arm_m_addr_is_magic (struct gdbarch *gdbarch, CORE_ADDR addr)
|
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)
|
if (tdep->have_sec_ext)
|
||||||
{
|
{
|
||||||
switch ((addr & 0xff000000))
|
switch ((addr & 0xff000000))
|
||||||
|
@ -811,7 +811,7 @@ arm_m_addr_is_magic (struct gdbarch *gdbarch, CORE_ADDR addr)
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
arm_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR val)
|
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
|
/* On M-profile devices, do not strip the low bit from EXC_RETURN
|
||||||
(the magic exception return address). */
|
(the magic exception return address). */
|
||||||
|
@ -939,7 +939,7 @@ thumb_analyze_prologue (struct gdbarch *gdbarch,
|
||||||
CORE_ADDR start, CORE_ADDR limit,
|
CORE_ADDR start, CORE_ADDR limit,
|
||||||
struct arm_prologue_cache *cache)
|
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 = gdbarch_byte_order (gdbarch);
|
||||||
enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
|
enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
|
||||||
int i;
|
int i;
|
||||||
|
@ -1879,7 +1879,7 @@ arm_analyze_prologue (struct gdbarch *gdbarch,
|
||||||
CORE_ADDR offset, current_pc;
|
CORE_ADDR offset, current_pc;
|
||||||
pv_t regs[ARM_FPS_REGNUM];
|
pv_t regs[ARM_FPS_REGNUM];
|
||||||
CORE_ADDR unrecognized_pc = 0;
|
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
|
/* Search the prologue looking for instructions that set up the
|
||||||
frame pointer, adjust the stack pointer, and save registers.
|
frame pointer, adjust the stack pointer, and save registers.
|
||||||
|
@ -2127,7 +2127,7 @@ arm_scan_prologue (struct frame_info *this_frame,
|
||||||
CORE_ADDR prologue_start, prologue_end;
|
CORE_ADDR prologue_start, prologue_end;
|
||||||
CORE_ADDR prev_pc = get_frame_pc (this_frame);
|
CORE_ADDR prev_pc = get_frame_pc (this_frame);
|
||||||
CORE_ADDR block_addr = get_frame_address_in_block (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. */
|
/* Assume there is no frame until proven otherwise. */
|
||||||
cache->framereg = ARM_SP_REGNUM;
|
cache->framereg = ARM_SP_REGNUM;
|
||||||
|
@ -2232,7 +2232,7 @@ arm_make_prologue_cache (struct frame_info *this_frame)
|
||||||
return cache;
|
return cache;
|
||||||
|
|
||||||
arm_gdbarch_tdep *tdep =
|
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;
|
prev_sp = unwound_fp + cache->framesize;
|
||||||
arm_cache_set_active_sp_value (cache, tdep, prev_sp);
|
arm_cache_set_active_sp_value (cache, tdep, prev_sp);
|
||||||
|
@ -2263,7 +2263,7 @@ arm_prologue_unwind_stop_reason (struct frame_info *this_frame,
|
||||||
/* This is meant to halt the backtrace at "_start". */
|
/* This is meant to halt the backtrace at "_start". */
|
||||||
pc = get_frame_pc (this_frame);
|
pc = get_frame_pc (this_frame);
|
||||||
gdbarch *arch = get_frame_arch (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)
|
if (pc <= tdep->lowest_pc)
|
||||||
return UNWIND_OUTERMOST;
|
return UNWIND_OUTERMOST;
|
||||||
|
|
||||||
|
@ -2291,7 +2291,7 @@ arm_prologue_this_id (struct frame_info *this_frame,
|
||||||
cache = (struct arm_prologue_cache *) *this_cache;
|
cache = (struct arm_prologue_cache *) *this_cache;
|
||||||
|
|
||||||
arm_gdbarch_tdep *tdep
|
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
|
/* Use function start address as part of the frame ID. If we cannot
|
||||||
identify the start address (due to missing symbol information),
|
identify the start address (due to missing symbol information),
|
||||||
|
@ -2318,7 +2318,7 @@ arm_prologue_prev_register (struct frame_info *this_frame,
|
||||||
*this_cache = arm_make_prologue_cache (this_frame);
|
*this_cache = arm_make_prologue_cache (this_frame);
|
||||||
cache = (struct arm_prologue_cache *) *this_cache;
|
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 this frame has signed the return address, mark it as so. */
|
||||||
if (tdep->have_pacbti && cache->ra_signed_state.has_value ()
|
if (tdep->have_pacbti && cache->ra_signed_state.has_value ()
|
||||||
|
@ -2986,7 +2986,7 @@ arm_exidx_fill_cache (struct frame_info *this_frame, gdb_byte *entry)
|
||||||
|
|
||||||
/* We already got the previous SP. */
|
/* We already got the previous SP. */
|
||||||
arm_gdbarch_tdep *tdep
|
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);
|
arm_cache_set_active_sp_value (cache, tdep, vsp);
|
||||||
|
|
||||||
return cache;
|
return cache;
|
||||||
|
@ -3111,7 +3111,7 @@ arm_make_epilogue_frame_cache (struct frame_info *this_frame)
|
||||||
|
|
||||||
/* Since we are in epilogue, the SP has been restored. */
|
/* Since we are in epilogue, the SP has been restored. */
|
||||||
arm_gdbarch_tdep *tdep
|
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,
|
arm_cache_set_active_sp_value (cache, tdep,
|
||||||
get_frame_register_unsigned (this_frame,
|
get_frame_register_unsigned (this_frame,
|
||||||
ARM_SP_REGNUM));
|
ARM_SP_REGNUM));
|
||||||
|
@ -3150,7 +3150,7 @@ arm_epilogue_frame_this_id (struct frame_info *this_frame,
|
||||||
func = pc;
|
func = pc;
|
||||||
|
|
||||||
arm_gdbarch_tdep *tdep
|
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);
|
*this_id = frame_id_build (arm_cache_get_prev_sp_value (cache, tdep), pc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3274,7 +3274,7 @@ arm_make_stub_cache (struct frame_info *this_frame)
|
||||||
arm_cache_init (cache, this_frame);
|
arm_cache_init (cache, this_frame);
|
||||||
|
|
||||||
arm_gdbarch_tdep *tdep
|
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,
|
arm_cache_set_active_sp_value (cache, tdep,
|
||||||
get_frame_register_unsigned (this_frame,
|
get_frame_register_unsigned (this_frame,
|
||||||
ARM_SP_REGNUM));
|
ARM_SP_REGNUM));
|
||||||
|
@ -3296,7 +3296,7 @@ arm_stub_this_id (struct frame_info *this_frame,
|
||||||
cache = (struct arm_prologue_cache *) *this_cache;
|
cache = (struct arm_prologue_cache *) *this_cache;
|
||||||
|
|
||||||
arm_gdbarch_tdep *tdep
|
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),
|
*this_id = frame_id_build (arm_cache_get_prev_sp_value (cache, tdep),
|
||||||
get_frame_pc (this_frame));
|
get_frame_pc (this_frame));
|
||||||
}
|
}
|
||||||
|
@ -3344,7 +3344,7 @@ static struct arm_prologue_cache *
|
||||||
arm_m_exception_cache (struct frame_info *this_frame)
|
arm_m_exception_cache (struct frame_info *this_frame)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
struct arm_prologue_cache *cache;
|
struct arm_prologue_cache *cache;
|
||||||
CORE_ADDR lr;
|
CORE_ADDR lr;
|
||||||
|
@ -3655,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. */
|
/* Our frame ID for a stub frame is the current SP and LR. */
|
||||||
arm_gdbarch_tdep *tdep
|
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),
|
*this_id = frame_id_build (arm_cache_get_prev_sp_value (cache, tdep),
|
||||||
get_frame_pc (this_frame));
|
get_frame_pc (this_frame));
|
||||||
}
|
}
|
||||||
|
@ -3677,7 +3677,7 @@ arm_m_exception_prev_register (struct frame_info *this_frame,
|
||||||
|
|
||||||
/* The value was already reconstructed into PREV_SP. */
|
/* The value was already reconstructed into PREV_SP. */
|
||||||
arm_gdbarch_tdep *tdep
|
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)
|
if (prev_regnum == ARM_SP_REGNUM)
|
||||||
return frame_unwind_got_constant (this_frame, prev_regnum,
|
return frame_unwind_got_constant (this_frame, prev_regnum,
|
||||||
arm_cache_get_prev_sp_value (cache, tdep));
|
arm_cache_get_prev_sp_value (cache, tdep));
|
||||||
|
@ -3765,7 +3765,7 @@ arm_normal_frame_base (struct frame_info *this_frame, void **this_cache)
|
||||||
cache = (struct arm_prologue_cache *) *this_cache;
|
cache = (struct arm_prologue_cache *) *this_cache;
|
||||||
|
|
||||||
arm_gdbarch_tdep *tdep
|
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;
|
return arm_cache_get_prev_sp_value (cache, tdep) - cache->framesize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3781,7 +3781,7 @@ arm_dwarf2_prev_register (struct frame_info *this_frame, void **this_cache,
|
||||||
int regnum)
|
int regnum)
|
||||||
{
|
{
|
||||||
struct gdbarch * gdbarch = get_frame_arch (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);
|
||||||
CORE_ADDR lr;
|
CORE_ADDR lr;
|
||||||
ULONGEST cpsr;
|
ULONGEST cpsr;
|
||||||
|
|
||||||
|
@ -4305,7 +4305,7 @@ arm_vfp_call_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type,
|
||||||
static int
|
static int
|
||||||
arm_vfp_abi_for_function (struct gdbarch *gdbarch, struct type *func_type)
|
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
|
/* Variadic functions always use the base ABI. Assume that functions
|
||||||
without debug info are not variadic. */
|
without debug info are not variadic. */
|
||||||
|
@ -4339,7 +4339,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||||
int use_vfp_abi;
|
int use_vfp_abi;
|
||||||
struct type *ftype;
|
struct type *ftype;
|
||||||
unsigned vfp_regs_free = (1 << 16) - 1;
|
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
|
/* Determine the type of this function and whether the VFP ABI
|
||||||
applies. */
|
applies. */
|
||||||
|
@ -4611,7 +4611,7 @@ arm_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
|
||||||
static struct type *
|
static struct type *
|
||||||
arm_ext_type (struct gdbarch *gdbarch)
|
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)
|
if (!tdep->arm_ext_type)
|
||||||
tdep->arm_ext_type
|
tdep->arm_ext_type
|
||||||
|
@ -4624,7 +4624,7 @@ arm_ext_type (struct gdbarch *gdbarch)
|
||||||
static struct type *
|
static struct type *
|
||||||
arm_neon_double_type (struct gdbarch *gdbarch)
|
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)
|
if (tdep->neon_double_type == NULL)
|
||||||
{
|
{
|
||||||
|
@ -4663,7 +4663,7 @@ arm_neon_double_type (struct gdbarch *gdbarch)
|
||||||
static struct type *
|
static struct type *
|
||||||
arm_neon_quad_type (struct gdbarch *gdbarch)
|
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)
|
if (tdep->neon_quad_type == NULL)
|
||||||
{
|
{
|
||||||
|
@ -4701,7 +4701,7 @@ arm_neon_quad_type (struct gdbarch *gdbarch)
|
||||||
static bool
|
static bool
|
||||||
is_q_pseudo (struct gdbarch *gdbarch, int regnum)
|
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
|
/* Q pseudo registers are available for both NEON (Q0~Q15) and
|
||||||
MVE (Q0~Q7) features. */
|
MVE (Q0~Q7) features. */
|
||||||
|
@ -4722,7 +4722,7 @@ is_q_pseudo (struct gdbarch *gdbarch, int regnum)
|
||||||
static bool
|
static bool
|
||||||
is_s_pseudo (struct gdbarch *gdbarch, int regnum)
|
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
|
if (tdep->have_s_pseudos
|
||||||
&& regnum >= tdep->s_pseudo_base
|
&& regnum >= tdep->s_pseudo_base
|
||||||
|
@ -4741,7 +4741,7 @@ is_s_pseudo (struct gdbarch *gdbarch, int regnum)
|
||||||
static bool
|
static bool
|
||||||
is_mve_pseudo (struct gdbarch *gdbarch, int regnum)
|
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
|
if (tdep->have_mve
|
||||||
&& regnum >= tdep->mve_pseudo_base
|
&& regnum >= tdep->mve_pseudo_base
|
||||||
|
@ -4760,7 +4760,7 @@ is_mve_pseudo (struct gdbarch *gdbarch, int regnum)
|
||||||
static bool
|
static bool
|
||||||
is_pacbti_pseudo (struct gdbarch *gdbarch, int regnum)
|
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
|
if (tdep->have_pacbti
|
||||||
&& regnum >= tdep->pacbti_pseudo_base
|
&& regnum >= tdep->pacbti_pseudo_base
|
||||||
|
@ -4776,7 +4776,7 @@ is_pacbti_pseudo (struct gdbarch *gdbarch, int regnum)
|
||||||
static struct type *
|
static struct type *
|
||||||
arm_register_type (struct gdbarch *gdbarch, int regnum)
|
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))
|
if (is_s_pseudo (gdbarch, regnum))
|
||||||
return builtin_type (gdbarch)->builtin_float;
|
return builtin_type (gdbarch)->builtin_float;
|
||||||
|
@ -4855,7 +4855,7 @@ arm_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
|
||||||
/* PACBTI register containing the Pointer Authentication Code. */
|
/* PACBTI register containing the Pointer Authentication Code. */
|
||||||
if (reg == ARM_DWARF_RA_AUTH_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)
|
if (tdep->have_pacbti)
|
||||||
return tdep->pacbti_pseudo_base;
|
return tdep->pacbti_pseudo_base;
|
||||||
|
@ -5001,7 +5001,7 @@ arm_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
|
||||||
int buf_len;
|
int buf_len;
|
||||||
enum bfd_endian order = gdbarch_byte_order_for_code (gdbarch);
|
enum bfd_endian order = gdbarch_byte_order_for_code (gdbarch);
|
||||||
int i, any, last_it, last_it_count;
|
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 we are using BKPT breakpoints, none of this is necessary. */
|
||||||
if (tdep->thumb2_breakpoint == NULL)
|
if (tdep->thumb2_breakpoint == NULL)
|
||||||
|
@ -8309,7 +8309,7 @@ arm_displaced_init_closure (struct gdbarch *gdbarch, CORE_ADDR from,
|
||||||
CORE_ADDR to,
|
CORE_ADDR to,
|
||||||
arm_displaced_step_copy_insn_closure *dsc)
|
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;
|
unsigned int i, len, offset;
|
||||||
enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
|
enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
|
||||||
int size = dsc->is_thumb? 2 : 4;
|
int size = dsc->is_thumb? 2 : 4;
|
||||||
|
@ -8472,7 +8472,7 @@ static const gdb_byte arm_default_thumb_be_breakpoint[] = THUMB_BE_BREAKPOINT;
|
||||||
static int
|
static int
|
||||||
arm_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
|
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);
|
enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
|
||||||
|
|
||||||
if (arm_pc_is_thumb (gdbarch, *pcptr))
|
if (arm_pc_is_thumb (gdbarch, *pcptr))
|
||||||
|
@ -8507,7 +8507,7 @@ arm_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
|
||||||
static const gdb_byte *
|
static const gdb_byte *
|
||||||
arm_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
|
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)
|
switch (kind)
|
||||||
{
|
{
|
||||||
|
@ -8579,7 +8579,7 @@ arm_extract_return_value (struct type *type, struct regcache *regs,
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regs->arch ();
|
struct gdbarch *gdbarch = regs->arch ();
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
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 ())
|
if (TYPE_CODE_FLT == type->code ())
|
||||||
{
|
{
|
||||||
|
@ -8690,7 +8690,7 @@ arm_return_in_memory (struct gdbarch *gdbarch, struct type *type)
|
||||||
return (TYPE_LENGTH (type) > 16);
|
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)
|
if (tdep->arm_abi != ARM_ABI_APCS)
|
||||||
{
|
{
|
||||||
/* The AAPCS says all aggregates not larger than a word are returned
|
/* The AAPCS says all aggregates not larger than a word are returned
|
||||||
|
@ -8796,7 +8796,7 @@ arm_store_return_value (struct type *type, struct regcache *regs,
|
||||||
if (type->code () == TYPE_CODE_FLT)
|
if (type->code () == TYPE_CODE_FLT)
|
||||||
{
|
{
|
||||||
gdb_byte buf[ARM_FP_REGISTER_SIZE];
|
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)
|
switch (tdep->fp_model)
|
||||||
{
|
{
|
||||||
|
@ -8885,7 +8885,7 @@ arm_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||||
struct type *valtype, struct regcache *regcache,
|
struct type *valtype, struct regcache *regcache,
|
||||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
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;
|
struct type *func_type = function ? value_type (function) : NULL;
|
||||||
enum arm_vfp_cprc_base_type vfp_base_type;
|
enum arm_vfp_cprc_base_type vfp_base_type;
|
||||||
int vfp_base_count;
|
int vfp_base_count;
|
||||||
|
@ -8977,7 +8977,7 @@ static int
|
||||||
arm_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
|
arm_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (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);
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
CORE_ADDR jb_addr;
|
CORE_ADDR jb_addr;
|
||||||
gdb_byte buf[ARM_INT_REGISTER_SIZE];
|
gdb_byte buf[ARM_INT_REGISTER_SIZE];
|
||||||
|
@ -9170,7 +9170,7 @@ show_fp_model (struct ui_file *file, int from_tty,
|
||||||
&& gdbarch_bfd_arch_info (target_gdbarch ())->arch == bfd_arch_arm)
|
&& gdbarch_bfd_arch_info (target_gdbarch ())->arch == bfd_arch_arm)
|
||||||
{
|
{
|
||||||
arm_gdbarch_tdep *tdep
|
arm_gdbarch_tdep *tdep
|
||||||
= (arm_gdbarch_tdep *) gdbarch_tdep (target_gdbarch ());
|
= gdbarch_tdep<arm_gdbarch_tdep> (target_gdbarch ());
|
||||||
|
|
||||||
gdb_printf (file, _("\
|
gdb_printf (file, _("\
|
||||||
The current ARM floating point model is \"auto\" (currently \"%s\").\n"),
|
The current ARM floating point model is \"auto\" (currently \"%s\").\n"),
|
||||||
|
@ -9210,7 +9210,7 @@ arm_show_abi (struct ui_file *file, int from_tty,
|
||||||
&& gdbarch_bfd_arch_info (target_gdbarch ())->arch == bfd_arch_arm)
|
&& gdbarch_bfd_arch_info (target_gdbarch ())->arch == bfd_arch_arm)
|
||||||
{
|
{
|
||||||
arm_gdbarch_tdep *tdep
|
arm_gdbarch_tdep *tdep
|
||||||
= (arm_gdbarch_tdep *) gdbarch_tdep (target_gdbarch ());
|
= gdbarch_tdep<arm_gdbarch_tdep> (target_gdbarch ());
|
||||||
|
|
||||||
gdb_printf (file, _("\
|
gdb_printf (file, _("\
|
||||||
The current ARM ABI is \"auto\" (currently \"%s\").\n"),
|
The current ARM ABI is \"auto\" (currently \"%s\").\n"),
|
||||||
|
@ -9289,7 +9289,7 @@ show_disassembly_style_sfunc (struct ui_file *file, int from_tty,
|
||||||
static const char *
|
static const char *
|
||||||
arm_register_name (struct gdbarch *gdbarch, int i)
|
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))
|
if (is_s_pseudo (gdbarch, i))
|
||||||
{
|
{
|
||||||
|
@ -9460,7 +9460,7 @@ static enum register_status
|
||||||
arm_mve_pseudo_read (struct gdbarch *gdbarch, readable_regcache *regcache,
|
arm_mve_pseudo_read (struct gdbarch *gdbarch, readable_regcache *regcache,
|
||||||
int regnum, gdb_byte *buf)
|
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. */
|
/* P0 is the first 16 bits of VPR. */
|
||||||
return regcache->raw_read_part (tdep->mve_vpr_regnum, 0, 2, buf);
|
return regcache->raw_read_part (tdep->mve_vpr_regnum, 0, 2, buf);
|
||||||
|
@ -9474,7 +9474,7 @@ arm_pseudo_read (struct gdbarch *gdbarch, readable_regcache *regcache,
|
||||||
char name_buf[4];
|
char name_buf[4];
|
||||||
gdb_byte reg_buf[8];
|
gdb_byte reg_buf[8];
|
||||||
int offset, double_regnum;
|
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);
|
gdb_assert (regnum >= num_regs);
|
||||||
|
|
||||||
|
@ -9546,7 +9546,7 @@ static void
|
||||||
arm_mve_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
arm_mve_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
int regnum, const gdb_byte *buf)
|
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. */
|
/* P0 is the first 16 bits of VPR. */
|
||||||
regcache->raw_write_part (tdep->mve_vpr_regnum, 0, 2, buf);
|
regcache->raw_write_part (tdep->mve_vpr_regnum, 0, 2, buf);
|
||||||
|
@ -9560,7 +9560,7 @@ arm_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
char name_buf[4];
|
char name_buf[4];
|
||||||
gdb_byte reg_buf[8];
|
gdb_byte reg_buf[8];
|
||||||
int offset, double_regnum;
|
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);
|
gdb_assert (regnum >= num_regs);
|
||||||
|
|
||||||
|
@ -9648,7 +9648,7 @@ arm_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
||||||
static void
|
static void
|
||||||
arm_register_g_packet_guesses (struct gdbarch *gdbarch)
|
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)
|
if (tdep->is_m)
|
||||||
{
|
{
|
||||||
|
@ -9691,7 +9691,7 @@ arm_register_g_packet_guesses (struct gdbarch *gdbarch)
|
||||||
static int
|
static int
|
||||||
arm_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *frame)
|
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)
|
if (tdep->is_m && get_frame_type (frame) == SIGTRAMP_FRAME)
|
||||||
{
|
{
|
||||||
|
@ -10250,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))
|
best_arch = gdbarch_list_lookup_by_info (best_arch->next, &info))
|
||||||
{
|
{
|
||||||
arm_gdbarch_tdep *tdep
|
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)
|
if (arm_abi != ARM_ABI_AUTO && arm_abi != tdep->arm_abi)
|
||||||
continue;
|
continue;
|
||||||
|
@ -10570,7 +10570,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||||
static void
|
static void
|
||||||
arm_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
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)
|
if (tdep == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -12779,7 +12779,7 @@ arm_record_coproc_data_proc (arm_insn_decode_record *arm_insn_r)
|
||||||
{
|
{
|
||||||
uint32_t op, op1_ebit, coproc, bits_24_25;
|
uint32_t op, op1_ebit, coproc, bits_24_25;
|
||||||
arm_gdbarch_tdep *tdep
|
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;
|
struct regcache *reg_cache = arm_insn_r->regcache;
|
||||||
|
|
||||||
arm_insn_r->opcode = bits (arm_insn_r->arm_insn, 24, 27);
|
arm_insn_r->opcode = bits (arm_insn_r->arm_insn, 24, 27);
|
||||||
|
@ -13267,7 +13267,7 @@ static int
|
||||||
thumb_record_ldm_stm_swi (arm_insn_decode_record *thumb_insn_r)
|
thumb_record_ldm_stm_swi (arm_insn_decode_record *thumb_insn_r)
|
||||||
{
|
{
|
||||||
arm_gdbarch_tdep *tdep
|
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;
|
struct regcache *reg_cache = thumb_insn_r->regcache;
|
||||||
|
|
||||||
uint32_t ret = 0; /* function return value: -1:record failure ; 0:success */
|
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
|
static void
|
||||||
arm_wince_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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);
|
windows_init_abi (info, gdbarch);
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,7 @@ avr_register_type (struct gdbarch *gdbarch, int reg_nr)
|
||||||
if (reg_nr == AVR_PC_REGNUM)
|
if (reg_nr == AVR_PC_REGNUM)
|
||||||
return builtin_type (gdbarch)->builtin_uint32;
|
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)
|
if (reg_nr == AVR_PSEUDO_PC_REGNUM)
|
||||||
return tdep->pc_type;
|
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);
|
gdb_assert (vpc < AVR_MAX_PROLOGUE_SIZE);
|
||||||
|
|
||||||
/* Handle static small stack allocation using rcall or push. */
|
/* 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)
|
while (scan_stage == 1 && vpc < len)
|
||||||
{
|
{
|
||||||
insn = extract_unsigned_integer (&prologue[vpc], 2, byte_order);
|
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
|
/* The previous frame's SP needed to be computed. Save the computed
|
||||||
value. */
|
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
|
info->saved_regs[AVR_SP_REGNUM].set_value (info->prev_sp
|
||||||
- 1 + tdep->call_length);
|
- 1 + tdep->call_length);
|
||||||
|
|
||||||
|
@ -1135,7 +1135,7 @@ avr_frame_prev_register (struct frame_info *this_frame,
|
||||||
int i;
|
int i;
|
||||||
gdb_byte buf[3];
|
gdb_byte buf[3];
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
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 (),
|
read_memory (info->saved_regs[AVR_PC_REGNUM].addr (),
|
||||||
buf, tdep->call_length);
|
buf, tdep->call_length);
|
||||||
|
@ -1277,7 +1277,7 @@ avr_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
gdb_byte buf[3];
|
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;
|
int call_length = tdep->call_length;
|
||||||
CORE_ADDR return_pc = avr_convert_iaddr_to_raw (bp_addr);
|
CORE_ADDR return_pc = avr_convert_iaddr_to_raw (bp_addr);
|
||||||
int regnum = AVR_ARGN_REGNUM;
|
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))
|
best_arch = gdbarch_list_lookup_by_info (best_arch->next, &info))
|
||||||
{
|
{
|
||||||
avr_gdbarch_tdep *tdep
|
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)
|
if (tdep->call_length == call_length)
|
||||||
return best_arch->gdbarch;
|
return best_arch->gdbarch;
|
||||||
|
|
|
@ -766,7 +766,7 @@ bfin_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
|
||||||
enum bfin_abi
|
enum bfin_abi
|
||||||
bfin_abi (struct gdbarch *gdbarch)
|
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;
|
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))
|
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||||
{
|
{
|
||||||
bfin_gdbarch_tdep *tdep
|
bfin_gdbarch_tdep *tdep
|
||||||
= (bfin_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
= gdbarch_tdep<bfin_gdbarch_tdep> (arches->gdbarch);
|
||||||
|
|
||||||
if (tdep->bfin_abi != abi)
|
if (tdep->bfin_abi != abi)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
static void
|
static void
|
||||||
cris_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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);
|
linux_init_abi (info, gdbarch, 0);
|
||||||
|
|
||||||
|
|
|
@ -313,7 +313,7 @@ cris_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
|
||||||
void **this_cache)
|
void **this_cache)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
struct cris_unwind_cache *info;
|
struct cris_unwind_cache *info;
|
||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
|
@ -450,7 +450,7 @@ static int
|
||||||
crisv32_single_step_through_delay (struct gdbarch *gdbarch,
|
crisv32_single_step_through_delay (struct gdbarch *gdbarch,
|
||||||
struct frame_info *this_frame)
|
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;
|
ULONGEST erp;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
@ -696,7 +696,7 @@ cris_frame_unwind_cache (struct frame_info *this_frame,
|
||||||
void **this_prologue_cache)
|
void **this_prologue_cache)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
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;
|
struct cris_unwind_cache *info;
|
||||||
|
|
||||||
if ((*this_prologue_cache))
|
if ((*this_prologue_cache))
|
||||||
|
@ -1334,7 +1334,7 @@ crisv32_scan_prologue (CORE_ADDR pc, struct frame_info *this_frame,
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
cris_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
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;
|
CORE_ADDR func_addr, func_end;
|
||||||
struct symtab_and_line sal;
|
struct symtab_and_line sal;
|
||||||
CORE_ADDR pc_after_prologue;
|
CORE_ADDR pc_after_prologue;
|
||||||
|
@ -1369,7 +1369,7 @@ cris_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
|
||||||
static const gdb_byte *
|
static const gdb_byte *
|
||||||
cris_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
|
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 break8_insn[] = {0x38, 0xe9};
|
||||||
static unsigned char break15_insn[] = {0x3f, 0xe9};
|
static unsigned char break15_insn[] = {0x3f, 0xe9};
|
||||||
|
|
||||||
|
@ -1388,7 +1388,7 @@ static int
|
||||||
cris_spec_reg_applicable (struct gdbarch *gdbarch,
|
cris_spec_reg_applicable (struct gdbarch *gdbarch,
|
||||||
struct cris_spec_reg spec_reg)
|
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;
|
unsigned int version = tdep->cris_version;
|
||||||
|
|
||||||
switch (spec_reg.applicable_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)
|
int regnum, const void *gregs, size_t len)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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;
|
int i;
|
||||||
const cris_elf_greg_t *regp = static_cast<const cris_elf_greg_t *>(gregs);
|
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
|
static void
|
||||||
cris_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
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)
|
if (tdep != NULL)
|
||||||
{
|
{
|
||||||
gdb_printf (file, "cris_dump_tdep: tdep->cris_version = %i\n",
|
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))
|
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||||
{
|
{
|
||||||
cris_gdbarch_tdep *tdep
|
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
|
if (tdep->cris_version == usr_cmd_cris_version
|
||||||
&& tdep->cris_mode == usr_cmd_cris_mode
|
&& tdep->cris_mode == usr_cmd_cris_mode
|
||||||
|
|
|
@ -2674,7 +2674,7 @@ csky_pseudo_register_name (struct gdbarch *gdbarch, int regno)
|
||||||
{
|
{
|
||||||
int num_regs = gdbarch_num_regs (gdbarch);
|
int num_regs = gdbarch_num_regs (gdbarch);
|
||||||
csky_gdbarch_tdep *tdep
|
csky_gdbarch_tdep *tdep
|
||||||
= (csky_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
= gdbarch_tdep<csky_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
regno -= num_regs;
|
regno -= num_regs;
|
||||||
|
|
||||||
|
@ -2722,7 +2722,7 @@ csky_pseudo_register_read (struct gdbarch *gdbarch,
|
||||||
{
|
{
|
||||||
int num_regs = gdbarch_num_regs (gdbarch);
|
int num_regs = gdbarch_num_regs (gdbarch);
|
||||||
csky_gdbarch_tdep *tdep
|
csky_gdbarch_tdep *tdep
|
||||||
= (csky_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
= gdbarch_tdep<csky_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
regnum -= num_regs;
|
regnum -= num_regs;
|
||||||
|
|
||||||
|
@ -2774,7 +2774,7 @@ csky_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
{
|
{
|
||||||
int num_regs = gdbarch_num_regs (gdbarch);
|
int num_regs = gdbarch_num_regs (gdbarch);
|
||||||
csky_gdbarch_tdep *tdep
|
csky_gdbarch_tdep *tdep
|
||||||
= (csky_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
= gdbarch_tdep<csky_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
regnum -= num_regs;
|
regnum -= num_regs;
|
||||||
|
|
||||||
|
@ -2902,7 +2902,7 @@ csky_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||||
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||||
{
|
{
|
||||||
csky_gdbarch_tdep *tdep
|
csky_gdbarch_tdep *tdep
|
||||||
= (csky_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
= gdbarch_tdep<csky_gdbarch_tdep> (arches->gdbarch);
|
||||||
if (fpu_abi != tdep->fpu_abi)
|
if (fpu_abi != tdep->fpu_abi)
|
||||||
continue;
|
continue;
|
||||||
if (vdsp_version != tdep->vdsp_version)
|
if (vdsp_version != tdep->vdsp_version)
|
||||||
|
|
|
@ -93,7 +93,7 @@ struct frv_gdbarch_tdep : gdbarch_tdep
|
||||||
enum frv_abi
|
enum frv_abi
|
||||||
frv_abi (struct gdbarch *gdbarch)
|
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;
|
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)
|
if (reg >= frv_num_regs + frv_num_pseudo_regs)
|
||||||
return "?toolarge?";
|
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];
|
return tdep->register_names[reg];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ ft32_register_type (struct gdbarch *gdbarch, int reg_nr)
|
||||||
{
|
{
|
||||||
if (reg_nr == FT32_PC_REGNUM)
|
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;
|
return tdep->pc_type;
|
||||||
}
|
}
|
||||||
else if (reg_nr == FT32_SP_REGNUM || reg_nr == FT32_FP_REGNUM)
|
else if (reg_nr == FT32_SP_REGNUM || reg_nr == FT32_FP_REGNUM)
|
||||||
|
|
|
@ -142,8 +142,23 @@ using read_core_file_mappings_loop_ftype =
|
||||||
|
|
||||||
#include "gdbarch-gen.h"
|
#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 static_cast<TDepType *> (tdep);
|
||||||
|
}
|
||||||
|
|
||||||
/* Mechanism for co-ordinating the selection of a specific
|
/* Mechanism for co-ordinating the selection of a specific
|
||||||
architecture.
|
architecture.
|
||||||
|
|
|
@ -118,7 +118,7 @@ hppabsd_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
|
||||||
void
|
void
|
||||||
hppabsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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'. */
|
/* OpenBSD and NetBSD have a 64-bit 'long double'. */
|
||||||
set_gdbarch_long_double_bit (gdbarch, 64);
|
set_gdbarch_long_double_bit (gdbarch, 64);
|
||||||
|
|
|
@ -476,7 +476,7 @@ hppa_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
void *cb_data,
|
void *cb_data,
|
||||||
const struct regcache *regcache)
|
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,
|
cb (".reg", 80 * tdep->bytes_per_address, 80 * tdep->bytes_per_address,
|
||||||
&hppa_linux_regset, NULL, cb_data);
|
&hppa_linux_regset, NULL, cb_data);
|
||||||
|
@ -486,7 +486,7 @@ hppa_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
static void
|
static void
|
||||||
hppa_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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);
|
linux_init_abi (info, gdbarch, 0);
|
||||||
|
|
||||||
|
|
|
@ -247,7 +247,7 @@ internalize_unwinds (struct objfile *objfile, struct unwind_table_entry *table,
|
||||||
if (size > 0)
|
if (size > 0)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = objfile->arch ();
|
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 long tmp;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
char *buf = (char *) alloca (size);
|
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. */
|
/* Global pointer (r19) of the function we are trying to call. */
|
||||||
CORE_ADDR gp;
|
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++)
|
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,
|
function_call_return_method return_method,
|
||||||
CORE_ADDR struct_addr)
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
int i, offset = 0;
|
int i, offset = 0;
|
||||||
CORE_ADDR gp;
|
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)
|
if (tdep->unwind_adjust_stub)
|
||||||
tdep->unwind_adjust_stub (this_frame, cache->base, cache->saved_regs);
|
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);
|
CORE_ADDR pc = get_frame_address_in_block (this_frame);
|
||||||
struct gdbarch *gdbarch = get_frame_arch (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
|
if (pc == 0
|
||||||
|| (tdep->in_solib_call_trampoline != NULL
|
|| (tdep->in_solib_call_trampoline != NULL
|
||||||
|
@ -3147,7 +3147,7 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||||
static void
|
static void
|
||||||
hppa_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
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",
|
gdb_printf (file, "bytes_per_address = %d\n",
|
||||||
tdep->bytes_per_address);
|
tdep->bytes_per_address);
|
||||||
|
|
|
@ -74,7 +74,7 @@ int i386bsd_sc_reg_offset[] =
|
||||||
void
|
void
|
||||||
i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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;
|
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,
|
function_call_return_method return_method,
|
||||||
CORE_ADDR struct_addr)
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
gdb_byte buf[4];
|
gdb_byte buf[4];
|
||||||
int i;
|
int i;
|
||||||
|
@ -248,7 +248,7 @@ i386_darwin_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||||
static void
|
static void
|
||||||
i386_darwin_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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. */
|
/* We support the SSE registers. */
|
||||||
tdep->num_xmm_regs = I386_NUM_XREGS - 1;
|
tdep->num_xmm_regs = I386_NUM_XREGS - 1;
|
||||||
|
|
|
@ -325,7 +325,7 @@ i386fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
void *cb_data,
|
void *cb_data,
|
||||||
const struct regcache *regcache)
|
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,
|
cb (".reg", I386_FBSD_SIZEOF_GREGSET, I386_FBSD_SIZEOF_GREGSET,
|
||||||
&i386_fbsd_gregset, NULL, cb_data);
|
&i386_fbsd_gregset, NULL, cb_data);
|
||||||
|
@ -365,7 +365,7 @@ i386fbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
|
||||||
static void
|
static void
|
||||||
i386fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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. */
|
/* Generic FreeBSD support. */
|
||||||
fbsd_init_abi (info, gdbarch);
|
fbsd_init_abi (info, gdbarch);
|
||||||
|
|
|
@ -173,7 +173,7 @@ static int i386gnu_gregset_reg_offset[] =
|
||||||
static void
|
static void
|
||||||
i386gnu_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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. */
|
/* GNU uses ELF. */
|
||||||
i386_elf_init_abi (info, gdbarch);
|
i386_elf_init_abi (info, gdbarch);
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
static void
|
static void
|
||||||
i386_go32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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. */
|
/* DJGPP doesn't have any special frames for signal handlers. */
|
||||||
tdep->sigtramp_p = NULL;
|
tdep->sigtramp_p = NULL;
|
||||||
|
|
|
@ -763,7 +763,7 @@ i386_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
void *cb_data,
|
void *cb_data,
|
||||||
const struct regcache *regcache)
|
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);
|
cb (".reg", 68, 68, &i386_gregset, NULL, cb_data);
|
||||||
|
|
||||||
|
@ -825,7 +825,7 @@ i386_linux_displaced_step_copy_insn (struct gdbarch *gdbarch,
|
||||||
static void
|
static void
|
||||||
i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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;
|
const struct target_desc *tdesc = info.target_desc;
|
||||||
struct tdesc_arch_data *tdesc_data = info.tdesc_data;
|
struct tdesc_arch_data *tdesc_data = info.tdesc_data;
|
||||||
const struct tdesc_feature *feature;
|
const struct tdesc_feature *feature;
|
||||||
|
|
|
@ -372,7 +372,7 @@ i386nbsd_sigtramp_cache_init (const struct tramp_frame *self,
|
||||||
static void
|
static void
|
||||||
i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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. */
|
/* Obviously NetBSD is BSD-based. */
|
||||||
i386bsd_init_abi (info, gdbarch);
|
i386bsd_init_abi (info, gdbarch);
|
||||||
|
@ -407,7 +407,7 @@ i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||||
static void
|
static void
|
||||||
i386nbsdelf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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. */
|
/* It's still NetBSD. */
|
||||||
i386nbsd_init_abi (info, gdbarch);
|
i386nbsd_init_abi (info, gdbarch);
|
||||||
|
|
|
@ -77,7 +77,7 @@ static void
|
||||||
i386nto_supply_gregset (struct regcache *regcache, char *gpregs)
|
i386nto_supply_gregset (struct regcache *regcache, char *gpregs)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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);
|
gdb_assert (tdep->gregset_reg_offset == i386nto_gregset_reg_offset);
|
||||||
i386_gregset.supply_regset (&i386_gregset, regcache, -1,
|
i386_gregset.supply_regset (&i386_gregset, regcache, -1,
|
||||||
|
@ -126,7 +126,7 @@ static int
|
||||||
i386nto_register_area (struct gdbarch *gdbarch,
|
i386nto_register_area (struct gdbarch *gdbarch,
|
||||||
int regno, int regset, unsigned *off)
|
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;
|
*off = 0;
|
||||||
if (regset == NTO_REG_GENERAL)
|
if (regset == NTO_REG_GENERAL)
|
||||||
|
@ -315,7 +315,7 @@ init_i386nto_ops (void)
|
||||||
static void
|
static void
|
||||||
i386nto_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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;
|
static struct target_so_ops nto_svr4_so_ops;
|
||||||
|
|
||||||
/* Deal with our strange signals. */
|
/* Deal with our strange signals. */
|
||||||
|
|
|
@ -407,7 +407,7 @@ static const struct frame_unwind i386obsd_trapframe_unwind = {
|
||||||
static void
|
static void
|
||||||
i386obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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. */
|
/* Obviously OpenBSD is BSD-based. */
|
||||||
i386bsd_init_abi (info, gdbarch);
|
i386bsd_init_abi (info, gdbarch);
|
||||||
|
|
|
@ -65,7 +65,7 @@ i386_sol2_mcontext_addr (struct frame_info *this_frame)
|
||||||
static void
|
static void
|
||||||
i386_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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. */
|
/* Solaris is SVR4-based. */
|
||||||
i386_svr4_init_abi (info, gdbarch);
|
i386_svr4_init_abi (info, gdbarch);
|
||||||
|
|
|
@ -169,7 +169,7 @@ const int num_lower_zmm_regs = 16;
|
||||||
static int
|
static int
|
||||||
i386_mmx_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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;
|
int mm0_regnum = tdep->mm0_regnum;
|
||||||
|
|
||||||
if (mm0_regnum < 0)
|
if (mm0_regnum < 0)
|
||||||
|
@ -184,7 +184,7 @@ i386_mmx_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
int
|
int
|
||||||
i386_byte_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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;
|
regnum -= tdep->al_regnum;
|
||||||
return regnum >= 0 && regnum < tdep->num_byte_regs;
|
return regnum >= 0 && regnum < tdep->num_byte_regs;
|
||||||
|
@ -195,7 +195,7 @@ i386_byte_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
int
|
int
|
||||||
i386_word_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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;
|
regnum -= tdep->ax_regnum;
|
||||||
return regnum >= 0 && regnum < tdep->num_word_regs;
|
return regnum >= 0 && regnum < tdep->num_word_regs;
|
||||||
|
@ -206,7 +206,7 @@ i386_word_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
int
|
int
|
||||||
i386_dword_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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;
|
int eax_regnum = tdep->eax_regnum;
|
||||||
|
|
||||||
if (eax_regnum < 0)
|
if (eax_regnum < 0)
|
||||||
|
@ -221,7 +221,7 @@ i386_dword_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
int
|
int
|
||||||
i386_zmmh_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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;
|
int zmm0h_regnum = tdep->zmm0h_regnum;
|
||||||
|
|
||||||
if (zmm0h_regnum < 0)
|
if (zmm0h_regnum < 0)
|
||||||
|
@ -234,7 +234,7 @@ i386_zmmh_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
int
|
int
|
||||||
i386_zmm_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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;
|
int zmm0_regnum = tdep->zmm0_regnum;
|
||||||
|
|
||||||
if (zmm0_regnum < 0)
|
if (zmm0_regnum < 0)
|
||||||
|
@ -247,7 +247,7 @@ i386_zmm_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
int
|
int
|
||||||
i386_k_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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;
|
int k0_regnum = tdep->k0_regnum;
|
||||||
|
|
||||||
if (k0_regnum < 0)
|
if (k0_regnum < 0)
|
||||||
|
@ -260,7 +260,7 @@ i386_k_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
static int
|
static int
|
||||||
i386_ymmh_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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;
|
int ymm0h_regnum = tdep->ymm0h_regnum;
|
||||||
|
|
||||||
if (ymm0h_regnum < 0)
|
if (ymm0h_regnum < 0)
|
||||||
|
@ -275,7 +275,7 @@ i386_ymmh_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
int
|
int
|
||||||
i386_ymm_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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;
|
int ymm0_regnum = tdep->ymm0_regnum;
|
||||||
|
|
||||||
if (ymm0_regnum < 0)
|
if (ymm0_regnum < 0)
|
||||||
|
@ -288,7 +288,7 @@ i386_ymm_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
static int
|
static int
|
||||||
i386_ymmh_avx512_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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;
|
int ymm16h_regnum = tdep->ymm16h_regnum;
|
||||||
|
|
||||||
if (ymm16h_regnum < 0)
|
if (ymm16h_regnum < 0)
|
||||||
|
@ -301,7 +301,7 @@ i386_ymmh_avx512_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
int
|
int
|
||||||
i386_ymm_avx512_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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;
|
int ymm16_regnum = tdep->ymm16_regnum;
|
||||||
|
|
||||||
if (ymm16_regnum < 0)
|
if (ymm16_regnum < 0)
|
||||||
|
@ -316,7 +316,7 @@ i386_ymm_avx512_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
int
|
int
|
||||||
i386_bnd_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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;
|
int bnd0_regnum = tdep->bnd0_regnum;
|
||||||
|
|
||||||
if (bnd0_regnum < 0)
|
if (bnd0_regnum < 0)
|
||||||
|
@ -331,7 +331,7 @@ i386_bnd_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
int
|
int
|
||||||
i386_xmm_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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);
|
int num_xmm_regs = I387_NUM_XMM_REGS (tdep);
|
||||||
|
|
||||||
if (num_xmm_regs == 0)
|
if (num_xmm_regs == 0)
|
||||||
|
@ -346,7 +346,7 @@ i386_xmm_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
int
|
int
|
||||||
i386_xmm_avx512_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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);
|
int num_xmm_avx512_regs = I387_NUM_XMM_AVX512_REGS (tdep);
|
||||||
|
|
||||||
if (num_xmm_avx512_regs == 0)
|
if (num_xmm_avx512_regs == 0)
|
||||||
|
@ -359,7 +359,7 @@ i386_xmm_avx512_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
static int
|
static int
|
||||||
i386_mxcsr_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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)
|
if (I387_NUM_XMM_REGS (tdep) == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -372,7 +372,7 @@ i386_mxcsr_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
int
|
int
|
||||||
i386_fp_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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)
|
if (I387_ST0_REGNUM (tdep) < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -384,7 +384,7 @@ i386_fp_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
int
|
int
|
||||||
i386_fpc_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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)
|
if (I387_ST0_REGNUM (tdep) < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -398,7 +398,7 @@ i386_fpc_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
static int
|
static int
|
||||||
i386_bndr_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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)
|
if (I387_BND0R_REGNUM (tdep) < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -412,7 +412,7 @@ i386_bndr_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
static int
|
static int
|
||||||
i386_mpx_ctrl_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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)
|
if (I387_BNDCFGU_REGNUM (tdep) < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -426,7 +426,7 @@ i386_mpx_ctrl_regnum_p (struct gdbarch *gdbarch, int regnum)
|
||||||
bool
|
bool
|
||||||
i386_pkru_regnum_p (struct gdbarch *gdbarch, int regnum)
|
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;
|
int pkru_regnum = tdep->pkru_regnum;
|
||||||
|
|
||||||
if (pkru_regnum < 0)
|
if (pkru_regnum < 0)
|
||||||
|
@ -462,7 +462,7 @@ i386_register_name (struct gdbarch *gdbarch, int regnum)
|
||||||
const char *
|
const char *
|
||||||
i386_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
|
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))
|
if (i386_bnd_regnum_p (gdbarch, regnum))
|
||||||
return i386_bnd_names[regnum - tdep->bnd0_regnum];
|
return i386_bnd_names[regnum - tdep->bnd0_regnum];
|
||||||
if (i386_mmx_regnum_p (gdbarch, regnum))
|
if (i386_mmx_regnum_p (gdbarch, regnum))
|
||||||
|
@ -485,7 +485,7 @@ i386_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
|
||||||
static int
|
static int
|
||||||
i386_dbx_reg_to_regnum (struct gdbarch *gdbarch, int reg)
|
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
|
/* This implements what GCC calls the "default" register map
|
||||||
(dbx_register_map[]). */
|
(dbx_register_map[]). */
|
||||||
|
@ -532,7 +532,7 @@ i386_dbx_reg_to_regnum (struct gdbarch *gdbarch, int reg)
|
||||||
static int
|
static int
|
||||||
i386_svr4_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
|
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
|
/* This implements the GCC register map that tries to be compatible
|
||||||
with the SVR4 C compiler for DWARF (svr4_dbx_register_map[]). */
|
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)
|
i386_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
struct i386_frame_cache *cache;
|
struct i386_frame_cache *cache;
|
||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
|
@ -2524,7 +2524,7 @@ i386_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||||
void **this_prologue_cache)
|
void **this_prologue_cache)
|
||||||
{
|
{
|
||||||
gdbarch *arch = get_frame_arch (this_frame);
|
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
|
/* We shouldn't even bother if we don't have a sigcontext_addr
|
||||||
handler. */
|
handler. */
|
||||||
|
@ -2611,7 +2611,7 @@ i386_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
|
||||||
CORE_ADDR sp, jb_addr;
|
CORE_ADDR sp, jb_addr;
|
||||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
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;
|
int jb_pc_offset = tdep->jb_pc_offset;
|
||||||
|
|
||||||
/* If JB_PC_OFFSET is -1, we have no way to find out where the
|
/* 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,
|
i386_extract_return_value (struct gdbarch *gdbarch, struct type *type,
|
||||||
struct regcache *regcache, gdb_byte *valbuf)
|
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);
|
int len = TYPE_LENGTH (type);
|
||||||
gdb_byte buf[I386_MAX_REGISTER_SIZE];
|
gdb_byte buf[I386_MAX_REGISTER_SIZE];
|
||||||
|
|
||||||
|
@ -2918,7 +2918,7 @@ static void
|
||||||
i386_store_return_value (struct gdbarch *gdbarch, struct type *type,
|
i386_store_return_value (struct gdbarch *gdbarch, struct type *type,
|
||||||
struct regcache *regcache, const gdb_byte *valbuf)
|
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);
|
int len = TYPE_LENGTH (type);
|
||||||
|
|
||||||
if (type->code () == TYPE_CODE_FLT)
|
if (type->code () == TYPE_CODE_FLT)
|
||||||
|
@ -2997,7 +2997,7 @@ static const char *struct_convention = default_struct_convention;
|
||||||
static int
|
static int
|
||||||
i386_reg_struct_return_p (struct gdbarch *gdbarch, struct type *type)
|
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 ();
|
enum type_code code = type->code ();
|
||||||
int len = TYPE_LENGTH (type);
|
int len = TYPE_LENGTH (type);
|
||||||
|
|
||||||
|
@ -3099,7 +3099,7 @@ i386_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||||
struct type *
|
struct type *
|
||||||
i387_ext_type (struct gdbarch *gdbarch)
|
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)
|
if (!tdep->i387_ext_type)
|
||||||
{
|
{
|
||||||
|
@ -3117,7 +3117,7 @@ i387_ext_type (struct gdbarch *gdbarch)
|
||||||
static struct type *
|
static struct type *
|
||||||
i386_bnd_type (struct gdbarch *gdbarch)
|
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)
|
if (!tdep->i386_bnd_type)
|
||||||
|
@ -3153,7 +3153,7 @@ i386_bnd_type (struct gdbarch *gdbarch)
|
||||||
static struct type *
|
static struct type *
|
||||||
i386_zmm_type (struct gdbarch *gdbarch)
|
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)
|
if (!tdep->i386_zmm_type)
|
||||||
{
|
{
|
||||||
|
@ -3212,7 +3212,7 @@ i386_zmm_type (struct gdbarch *gdbarch)
|
||||||
static struct type *
|
static struct type *
|
||||||
i386_ymm_type (struct gdbarch *gdbarch)
|
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)
|
if (!tdep->i386_ymm_type)
|
||||||
{
|
{
|
||||||
|
@ -3269,7 +3269,7 @@ i386_ymm_type (struct gdbarch *gdbarch)
|
||||||
static struct type *
|
static struct type *
|
||||||
i386_mmx_type (struct gdbarch *gdbarch)
|
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)
|
if (!tdep->i386_mmx_type)
|
||||||
{
|
{
|
||||||
|
@ -3346,7 +3346,7 @@ static int
|
||||||
i386_mmx_regnum_to_fp_regnum (readable_regcache *regcache, int regnum)
|
i386_mmx_regnum_to_fp_regnum (readable_regcache *regcache, int regnum)
|
||||||
{
|
{
|
||||||
gdbarch *arch = regcache->arch ();
|
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;
|
int mmxreg, fpreg;
|
||||||
ULONGEST fstat;
|
ULONGEST fstat;
|
||||||
int tos;
|
int tos;
|
||||||
|
@ -3387,7 +3387,7 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch,
|
||||||
}
|
}
|
||||||
else
|
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))
|
if (i386_bnd_regnum_p (gdbarch, regnum))
|
||||||
{
|
{
|
||||||
regnum -= tdep->bnd0_regnum;
|
regnum -= tdep->bnd0_regnum;
|
||||||
|
@ -3577,7 +3577,7 @@ i386_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
}
|
}
|
||||||
else
|
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))
|
if (i386_bnd_regnum_p (gdbarch, regnum))
|
||||||
{
|
{
|
||||||
|
@ -3685,7 +3685,7 @@ int
|
||||||
i386_ax_pseudo_register_collect (struct gdbarch *gdbarch,
|
i386_ax_pseudo_register_collect (struct gdbarch *gdbarch,
|
||||||
struct agent_expr *ax, int regnum)
|
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))
|
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)
|
int regnum, const void *gregs, size_t len)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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;
|
const gdb_byte *regs = (const gdb_byte *) gregs;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -3927,7 +3927,7 @@ i386_collect_gregset (const struct regset *regset,
|
||||||
int regnum, void *gregs, size_t len)
|
int regnum, void *gregs, size_t len)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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;
|
gdb_byte *regs = (gdb_byte *) gregs;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -3950,7 +3950,7 @@ i386_supply_fpregset (const struct regset *regset, struct regcache *regcache,
|
||||||
int regnum, const void *fpregs, size_t len)
|
int regnum, const void *fpregs, size_t len)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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)
|
if (len == I387_SIZEOF_FXSAVE)
|
||||||
{
|
{
|
||||||
|
@ -3973,7 +3973,7 @@ i386_collect_fpregset (const struct regset *regset,
|
||||||
int regnum, void *fpregs, size_t len)
|
int regnum, void *fpregs, size_t len)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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)
|
if (len == I387_SIZEOF_FXSAVE)
|
||||||
{
|
{
|
||||||
|
@ -4005,7 +4005,7 @@ i386_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
void *cb_data,
|
void *cb_data,
|
||||||
const struct regcache *regcache)
|
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 (".reg", tdep->sizeof_gregset, tdep->sizeof_gregset, &i386_gregset, NULL,
|
||||||
cb_data);
|
cb_data);
|
||||||
|
@ -4510,7 +4510,7 @@ i386_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||||
void
|
void
|
||||||
i386_svr4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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. */
|
/* System V Release 4 uses ELF. */
|
||||||
i386_elf_init_abi (info, gdbarch);
|
i386_elf_init_abi (info, gdbarch);
|
||||||
|
@ -4552,7 +4552,7 @@ int
|
||||||
i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
||||||
const struct reggroup *group)
|
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,
|
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,
|
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,
|
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,
|
struct i386_record_s *ir,
|
||||||
uint32_t iregnum)
|
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;
|
int i;
|
||||||
|
|
||||||
/* Oza: Because of floating point insn push/pop of fpu stack is going to
|
/* 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;
|
ULONGEST addr;
|
||||||
gdb_byte buf[I386_MAX_REGISTER_SIZE];
|
gdb_byte buf[I386_MAX_REGISTER_SIZE];
|
||||||
struct i386_record_s ir;
|
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_w = -1;
|
||||||
uint8_t rex_r = 0;
|
uint8_t rex_r = 0;
|
||||||
|
|
||||||
|
@ -8839,7 +8839,7 @@ i386_mpx_bd_base (void)
|
||||||
|
|
||||||
rcache = get_current_regcache ();
|
rcache = get_current_regcache ();
|
||||||
gdbarch *arch = rcache->arch ();
|
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);
|
regstatus = regcache_raw_read_unsigned (rcache, tdep->bndcfgu_regnum, &ret);
|
||||||
|
|
||||||
|
@ -8853,7 +8853,7 @@ int
|
||||||
i386_mpx_enabled (void)
|
i386_mpx_enabled (void)
|
||||||
{
|
{
|
||||||
gdbarch *arch = get_current_arch ();
|
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;
|
const struct target_desc *tdesc = tdep->tdesc;
|
||||||
|
|
||||||
return (tdesc_find_feature (tdesc, "org.gnu.gdb.i386.mpx") != NULL);
|
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
|
static void
|
||||||
i386_windows_init_abi_common (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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);
|
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,
|
i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
|
||||||
struct frame_info *frame, const char *args)
|
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;
|
ULONGEST fctrl;
|
||||||
int fctrl_p;
|
int fctrl_p;
|
||||||
ULONGEST fstat;
|
ULONGEST fstat;
|
||||||
|
@ -440,7 +440,7 @@ void
|
||||||
i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave)
|
i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
const gdb_byte *regs = (const gdb_byte *) fsave;
|
const gdb_byte *regs = (const gdb_byte *) fsave;
|
||||||
int i;
|
int i;
|
||||||
|
@ -495,7 +495,7 @@ void
|
||||||
i387_collect_fsave (const struct regcache *regcache, int regnum, void *fsave)
|
i387_collect_fsave (const struct regcache *regcache, int regnum, void *fsave)
|
||||||
{
|
{
|
||||||
gdbarch *arch = regcache->arch ();
|
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;
|
gdb_byte *regs = (gdb_byte *) fsave;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -589,7 +589,7 @@ void
|
||||||
i387_supply_fxsave (struct regcache *regcache, int regnum, const void *fxsave)
|
i387_supply_fxsave (struct regcache *regcache, int regnum, const void *fxsave)
|
||||||
{
|
{
|
||||||
gdbarch *arch = regcache->arch ();
|
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;
|
const gdb_byte *regs = (const gdb_byte *) fxsave;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -673,7 +673,7 @@ void
|
||||||
i387_collect_fxsave (const struct regcache *regcache, int regnum, void *fxsave)
|
i387_collect_fxsave (const struct regcache *regcache, int regnum, void *fxsave)
|
||||||
{
|
{
|
||||||
gdbarch *arch = regcache->arch ();
|
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;
|
gdb_byte *regs = (gdb_byte *) fxsave;
|
||||||
int i;
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
const gdb_byte *regs = (const gdb_byte *) xsave;
|
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. */
|
/* Get `xstat_bv'. The supported bits in `xstat_bv' are 8 bytes. */
|
||||||
ULONGEST xstate_bv = extract_unsigned_integer (XSAVE_XSTATE_BV_ADDR (regs),
|
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 ();
|
struct gdbarch *gdbarch = regcache->arch ();
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
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;
|
const gdb_byte *regs = (const gdb_byte *) xsave;
|
||||||
int i;
|
int i;
|
||||||
/* In 64-bit mode the split between "low" and "high" ZMM registers is at
|
/* 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 ();
|
struct gdbarch *gdbarch = regcache->arch ();
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
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 *p, *regs = (gdb_byte *) xsave;
|
||||||
gdb_byte raw[I386_MAX_REGISTER_SIZE];
|
gdb_byte raw[I386_MAX_REGISTER_SIZE];
|
||||||
ULONGEST initial_xstate_bv, clear_bv, xstate_bv = 0;
|
ULONGEST initial_xstate_bv, clear_bv, xstate_bv = 0;
|
||||||
|
@ -1934,7 +1934,7 @@ i387_tag (const gdb_byte *raw)
|
||||||
void
|
void
|
||||||
i387_return_value (struct gdbarch *gdbarch, struct regcache *regcache)
|
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;
|
ULONGEST fstat;
|
||||||
|
|
||||||
/* Set the top of the floating-point register stack to 7. The
|
/* 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
|
void
|
||||||
i387_reset_bnd_regs (struct gdbarch *gdbarch, struct regcache *regcache)
|
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)
|
if (I387_BND0R_REGNUM (tdep) > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -216,7 +216,7 @@ ia64_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
static void
|
static void
|
||||||
ia64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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_prefixes[] = { "r", NULL };
|
||||||
static const char *const stap_register_indirection_prefixes[] = { "[",
|
static const char *const stap_register_indirection_prefixes[] = { "[",
|
||||||
NULL };
|
NULL };
|
||||||
|
|
|
@ -310,7 +310,7 @@ static const struct floatformat *floatformats_ia64_ext[2] =
|
||||||
static struct type *
|
static struct type *
|
||||||
ia64_ext_type (struct gdbarch *gdbarch)
|
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)
|
if (!tdep->ia64_ext_type)
|
||||||
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 ia64_frame_cache *cache)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
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)
|
if (tdep->sigcontext_register_address)
|
||||||
{
|
{
|
||||||
|
@ -2336,7 +2336,7 @@ ia64_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||||
void **this_cache)
|
void **this_cache)
|
||||||
{
|
{
|
||||||
gdbarch *arch = get_frame_arch (this_frame);
|
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)
|
if (tdep->pc_in_sigtramp)
|
||||||
{
|
{
|
||||||
CORE_ADDR pc = get_frame_pc (this_frame);
|
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;
|
unw_word_t bsp, sof, cfm, psr, ip;
|
||||||
struct frame_info *this_frame = (struct frame_info *) arg;
|
struct frame_info *this_frame = (struct frame_info *) arg;
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
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. */
|
/* We never call any libunwind routines that need to write registers. */
|
||||||
gdb_assert (!write);
|
gdb_assert (!write);
|
||||||
|
@ -3485,7 +3485,7 @@ ia64_find_global_pointer_from_dynamic_section (struct gdbarch *gdbarch,
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
ia64_find_global_pointer (struct gdbarch *gdbarch, CORE_ADDR faddr)
|
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;
|
CORE_ADDR addr = 0;
|
||||||
|
|
||||||
if (tdep->find_global_pointer_from_solib)
|
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,
|
function_call_return_method return_method,
|
||||||
CORE_ADDR struct_addr)
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
int argno;
|
int argno;
|
||||||
struct value *arg;
|
struct value *arg;
|
||||||
|
|
|
@ -255,7 +255,7 @@ loongarch_linux_syscall_next_pc (struct frame_info *frame)
|
||||||
static void
|
static void
|
||||||
loongarch_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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);
|
linux_init_abi (info, gdbarch, 0);
|
||||||
|
|
||||||
|
|
|
@ -225,7 +225,7 @@ static CORE_ADDR
|
||||||
loongarch_next_pc (struct regcache *regcache, CORE_ADDR cur_pc)
|
loongarch_next_pc (struct regcache *regcache, CORE_ADDR cur_pc)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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);
|
insn_t insn = loongarch_fetch_instruction (cur_pc);
|
||||||
size_t insn_len = loongarch_insn_length (insn);
|
size_t insn_len = loongarch_insn_length (insn);
|
||||||
CORE_ADDR next_pc = cur_pc + insn_len;
|
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
|
we are looking for. If it doesn't then we can't reuse this
|
||||||
gdbarch. */
|
gdbarch. */
|
||||||
loongarch_gdbarch_tdep *candidate_tdep
|
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)
|
if (candidate_tdep->abi_features != abi_features)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -142,7 +142,7 @@ struct m32c_gdbarch_tdep : gdbarch_tdep
|
||||||
static void
|
static void
|
||||||
make_types (struct gdbarch *arch)
|
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;
|
unsigned long mach = gdbarch_bfd_arch_info (arch)->mach;
|
||||||
int data_addr_reg_bits, code_addr_reg_bits;
|
int data_addr_reg_bits, code_addr_reg_bits;
|
||||||
char type_name[50];
|
char type_name[50];
|
||||||
|
@ -215,7 +215,7 @@ make_types (struct gdbarch *arch)
|
||||||
static const char *
|
static const char *
|
||||||
m32c_register_name (struct gdbarch *gdbarch, int num)
|
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;
|
return tdep->regs[num].name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ m32c_register_name (struct gdbarch *gdbarch, int num)
|
||||||
static struct type *
|
static struct type *
|
||||||
m32c_register_type (struct gdbarch *arch, int reg_nr)
|
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;
|
return tdep->regs[reg_nr].type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ m32c_register_type (struct gdbarch *arch, int reg_nr)
|
||||||
static int
|
static int
|
||||||
m32c_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
|
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;
|
return tdep->regs[reg_nr].sim_num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@ m32c_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
|
||||||
static int
|
static int
|
||||||
m32c_debug_info_reg_to_regnum (struct gdbarch *gdbarch, int reg_nr)
|
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
|
if (0 <= reg_nr && reg_nr <= M32C_MAX_DWARF_REGNUM
|
||||||
&& tdep->dwarf_regs[reg_nr])
|
&& tdep->dwarf_regs[reg_nr])
|
||||||
return tdep->dwarf_regs[reg_nr]->num;
|
return tdep->dwarf_regs[reg_nr]->num;
|
||||||
|
@ -254,7 +254,7 @@ static int
|
||||||
m32c_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
m32c_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
||||||
const struct reggroup *group)
|
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];
|
struct m32c_reg *reg = &tdep->regs[regnum];
|
||||||
|
|
||||||
/* The anonymous raw registers aren't in any groups. */
|
/* The anonymous raw registers aren't in any groups. */
|
||||||
|
@ -330,7 +330,7 @@ static int
|
||||||
m32c_read_flg (readable_regcache *cache)
|
m32c_read_flg (readable_regcache *cache)
|
||||||
{
|
{
|
||||||
gdbarch *arch = cache->arch ();
|
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;
|
ULONGEST flg;
|
||||||
|
|
||||||
cache->raw_read (tdep->flg->num, &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)
|
m32c_r3r2r1r0_read (struct m32c_reg *reg, readable_regcache *cache, gdb_byte *buf)
|
||||||
{
|
{
|
||||||
gdbarch *arch = reg->arch;
|
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);
|
int len = TYPE_LENGTH (tdep->r0->type);
|
||||||
enum register_status status;
|
enum register_status status;
|
||||||
|
|
||||||
|
@ -567,7 +567,7 @@ m32c_r3r2r1r0_write (struct m32c_reg *reg, struct regcache *cache,
|
||||||
const gdb_byte *buf)
|
const gdb_byte *buf)
|
||||||
{
|
{
|
||||||
gdbarch *arch = reg->arch;
|
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);
|
int len = TYPE_LENGTH (tdep->r0->type);
|
||||||
|
|
||||||
if (gdbarch_byte_order (reg->arch) == BFD_ENDIAN_BIG)
|
if (gdbarch_byte_order (reg->arch) == BFD_ENDIAN_BIG)
|
||||||
|
@ -595,7 +595,7 @@ m32c_pseudo_register_read (struct gdbarch *arch,
|
||||||
int cookednum,
|
int cookednum,
|
||||||
gdb_byte *buf)
|
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;
|
struct m32c_reg *reg;
|
||||||
|
|
||||||
gdb_assert (0 <= cookednum && cookednum < tdep->num_regs);
|
gdb_assert (0 <= cookednum && cookednum < tdep->num_regs);
|
||||||
|
@ -613,7 +613,7 @@ m32c_pseudo_register_write (struct gdbarch *arch,
|
||||||
int cookednum,
|
int cookednum,
|
||||||
const gdb_byte *buf)
|
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;
|
struct m32c_reg *reg;
|
||||||
|
|
||||||
gdb_assert (0 <= cookednum && cookednum < tdep->num_regs);
|
gdb_assert (0 <= cookednum && cookednum < tdep->num_regs);
|
||||||
|
@ -638,7 +638,7 @@ add_reg (struct gdbarch *arch,
|
||||||
struct m32c_reg *ry,
|
struct m32c_reg *ry,
|
||||||
int n)
|
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];
|
struct m32c_reg *r = &tdep->regs[tdep->num_regs];
|
||||||
|
|
||||||
gdb_assert (tdep->num_regs < M32C_MAX_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. */
|
/* Update the DWARF->reg mapping. */
|
||||||
gdbarch *arch = reg->arch;
|
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;
|
tdep->dwarf_regs[num] = reg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -800,7 +800,7 @@ mark_save_restore (struct m32c_reg *reg)
|
||||||
static void
|
static void
|
||||||
make_regs (struct gdbarch *arch)
|
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 mach = gdbarch_bfd_arch_info (arch)->mach;
|
||||||
int num_raw_regs;
|
int num_raw_regs;
|
||||||
int num_cooked_regs;
|
int num_cooked_regs;
|
||||||
|
@ -1349,7 +1349,7 @@ m32c_pv_enter (struct m32c_pv_state *state, int size)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
gdbarch *arch = state->arch;
|
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))
|
if (m32c_pv_push (state, state->fb, tdep->push_addr_bytes))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
@ -1379,7 +1379,7 @@ static int
|
||||||
m32c_pv_pushm (struct m32c_pv_state *state, int src)
|
m32c_pv_pushm (struct m32c_pv_state *state, int src)
|
||||||
{
|
{
|
||||||
gdbarch *arch = state->arch;
|
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:
|
/* The bits in SRC indicating which registers to save are:
|
||||||
r0 r1 r2 r3 a0 a1 sb fb */
|
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)
|
m32c_is_1st_arg_reg (struct m32c_pv_state *state, pv_t value)
|
||||||
{
|
{
|
||||||
gdbarch *arch = state->arch;
|
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
|
return (value.kind == pvk_register
|
||||||
&& (gdbarch_bfd_arch_info (state->arch)->mach == bfd_mach_m16c
|
&& (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)
|
m32c_is_arg_reg (struct m32c_pv_state *state, pv_t value)
|
||||||
{
|
{
|
||||||
gdbarch *arch = state->arch;
|
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
|
return (value.kind == pvk_register
|
||||||
&& (gdbarch_bfd_arch_info (state->arch)->mach == bfd_mach_m16c
|
&& (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)
|
pv_t value)
|
||||||
{
|
{
|
||||||
gdbarch *arch = st->arch;
|
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)
|
return (m32c_is_arg_reg (st, value)
|
||||||
&& loc.kind == srcdest_mem
|
&& loc.kind == srcdest_mem
|
||||||
|
@ -1464,7 +1464,7 @@ m32c_is_struct_return (struct m32c_pv_state *st,
|
||||||
pv_t value)
|
pv_t value)
|
||||||
{
|
{
|
||||||
gdbarch *arch = st->arch;
|
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)
|
return (m32c_is_1st_arg_reg (st, value)
|
||||||
&& !st->stack->find_reg (st->arch, value.reg, 0)
|
&& !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)
|
m32c_pushm_is_reg_save (struct m32c_pv_state *st, int src)
|
||||||
{
|
{
|
||||||
gdbarch *arch = st->arch;
|
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:
|
/* The bits in SRC indicating which registers to save are:
|
||||||
r0 r1 r2 r3 a0 a1 sb fb */
|
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 m32c_prologue *prologue = (struct m32c_prologue *) prologue_untyped;
|
||||||
struct gdbarch *arch = prologue->arch;
|
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
|
/* Is this the unchanged value of some register being saved on the
|
||||||
stack? */
|
stack? */
|
||||||
|
@ -1550,7 +1550,7 @@ m32c_analyze_prologue (struct gdbarch *arch,
|
||||||
CORE_ADDR start, CORE_ADDR limit,
|
CORE_ADDR start, CORE_ADDR limit,
|
||||||
struct m32c_prologue *prologue)
|
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;
|
unsigned long mach = gdbarch_bfd_arch_info (arch)->mach;
|
||||||
CORE_ADDR after_last_frame_related_insn;
|
CORE_ADDR after_last_frame_related_insn;
|
||||||
struct m32c_pv_state st;
|
struct m32c_pv_state st;
|
||||||
|
@ -1881,7 +1881,7 @@ m32c_frame_base (struct frame_info *this_frame,
|
||||||
struct m32c_prologue *p
|
struct m32c_prologue *p
|
||||||
= m32c_analyze_frame_prologue (this_frame, this_prologue_cache);
|
= m32c_analyze_frame_prologue (this_frame, this_prologue_cache);
|
||||||
gdbarch *arch = get_frame_arch (this_frame);
|
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
|
/* In functions that use alloca, the distance between the stack
|
||||||
pointer and the frame base varies dynamically, so we can't use
|
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)
|
void **this_prologue_cache, int regnum)
|
||||||
{
|
{
|
||||||
gdbarch *arch = get_frame_arch (this_frame);
|
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
|
struct m32c_prologue *p
|
||||||
= m32c_analyze_frame_prologue (this_frame, this_prologue_cache);
|
= m32c_analyze_frame_prologue (this_frame, this_prologue_cache);
|
||||||
CORE_ADDR frame_base = m32c_frame_base (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,
|
function_call_return_method return_method,
|
||||||
CORE_ADDR struct_addr)
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
unsigned long mach = gdbarch_bfd_arch_info (gdbarch)->mach;
|
unsigned long mach = gdbarch_bfd_arch_info (gdbarch)->mach;
|
||||||
CORE_ADDR cfa;
|
CORE_ADDR cfa;
|
||||||
|
@ -2178,7 +2178,7 @@ m32c_return_value (struct gdbarch *gdbarch,
|
||||||
gdb_byte *readbuf,
|
gdb_byte *readbuf,
|
||||||
const gdb_byte *writebuf)
|
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 bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
enum return_value_convention conv;
|
enum return_value_convention conv;
|
||||||
ULONGEST valtype_len = TYPE_LENGTH (valtype);
|
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)
|
m32c_skip_trampoline_code (struct frame_info *frame, CORE_ADDR stop_pc)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
|
|
||||||
/* It would be nicer to simply look up the addresses of known
|
/* 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 m32c_prologue p;
|
||||||
|
|
||||||
struct regcache *regcache = get_current_regcache ();
|
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))
|
if (!find_pc_partial_function (pc, &name, &func_addr, &func_end))
|
||||||
internal_error (__FILE__, __LINE__,
|
internal_error (__FILE__, __LINE__,
|
||||||
|
|
|
@ -146,14 +146,14 @@ struct m68gc11_gdbarch_tdep : gdbarch_tdep
|
||||||
static int
|
static int
|
||||||
stack_correction (gdbarch *arch)
|
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;
|
return tdep->stack_correction;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
use_page_register (gdbarch *arch)
|
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;
|
return tdep->stack_correction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -642,7 +642,7 @@ m68hc11_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc,
|
||||||
return 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;
|
seq_table = tdep->prologue;
|
||||||
|
|
||||||
/* The 68hc11 stack is as follows:
|
/* The 68hc11 stack is as follows:
|
||||||
|
@ -1020,7 +1020,7 @@ m68hc11_print_register (struct gdbarch *gdbarch, struct ui_file *file,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m68gc11_gdbarch_tdep *tdep
|
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)
|
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=");
|
gdb_printf (file, " Y=");
|
||||||
m68hc11_print_register (gdbarch, file, frame, HARD_Y_REGNUM);
|
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)
|
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))
|
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||||
{
|
{
|
||||||
m68gc11_gdbarch_tdep *tdep
|
m68gc11_gdbarch_tdep *tdep
|
||||||
= (m68gc11_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
= gdbarch_tdep<m68gc11_gdbarch_tdep> (arches->gdbarch);
|
||||||
|
|
||||||
if (tdep->elf_flags != elf_flags)
|
if (tdep->elf_flags != elf_flags)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -133,7 +133,7 @@ m68kbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
static void
|
static void
|
||||||
m68kbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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_pc = 5;
|
||||||
tdep->jb_elt_size = 4;
|
tdep->jb_elt_size = 4;
|
||||||
|
|
|
@ -384,7 +384,7 @@ m68k_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
static void
|
static void
|
||||||
m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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);
|
linux_init_abi (info, gdbarch, 0);
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ typedef BP_MANIPULATION (m68k_break_insn) m68k_breakpoint;
|
||||||
static struct type *
|
static struct type *
|
||||||
m68k_ps_type (struct gdbarch *gdbarch)
|
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)
|
if (!tdep->m68k_ps_type)
|
||||||
{
|
{
|
||||||
|
@ -99,7 +99,7 @@ m68k_ps_type (struct gdbarch *gdbarch)
|
||||||
static struct type *
|
static struct type *
|
||||||
m68881_ext_type (struct gdbarch *gdbarch)
|
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)
|
if (!tdep->m68881_ext_type)
|
||||||
tdep->m68881_ext_type
|
tdep->m68881_ext_type
|
||||||
|
@ -120,7 +120,7 @@ m68881_ext_type (struct gdbarch *gdbarch)
|
||||||
static struct type *
|
static struct type *
|
||||||
m68k_register_type (struct gdbarch *gdbarch, int regnum)
|
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)
|
if (tdep->fpregs_present)
|
||||||
{
|
{
|
||||||
|
@ -171,7 +171,7 @@ static const char * const m68k_register_names[] = {
|
||||||
static const char *
|
static const char *
|
||||||
m68k_register_name (struct gdbarch *gdbarch, int regnum)
|
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))
|
if (regnum < 0 || regnum >= ARRAY_SIZE (m68k_register_names))
|
||||||
internal_error (__FILE__, __LINE__,
|
internal_error (__FILE__, __LINE__,
|
||||||
|
@ -191,7 +191,7 @@ static int
|
||||||
m68k_convert_register_p (struct gdbarch *gdbarch,
|
m68k_convert_register_p (struct gdbarch *gdbarch,
|
||||||
int regnum, struct type *type)
|
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)
|
if (!tdep->fpregs_present)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -300,7 +300,7 @@ m68k_extract_return_value (struct type *type, struct regcache *regcache,
|
||||||
if (type->code () == TYPE_CODE_PTR && len == 4)
|
if (type->code () == TYPE_CODE_PTR && len == 4)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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);
|
regcache->raw_read (tdep->pointer_result_regnum, valbuf);
|
||||||
}
|
}
|
||||||
else if (len <= 4)
|
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];
|
gdb_byte buf[M68K_MAX_REGISTER_SIZE];
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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)
|
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)
|
if (type->code () == TYPE_CODE_PTR && len == 4)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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);
|
regcache->raw_write (tdep->pointer_result_regnum, valbuf);
|
||||||
/* gdb historically also set D0 in the SVR4 case. */
|
/* gdb historically also set D0 in the SVR4 case. */
|
||||||
if (tdep->pointer_result_regnum != M68K_D0_REGNUM)
|
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)
|
const gdb_byte *valbuf)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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)
|
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
|
static int
|
||||||
m68k_reg_struct_return_p (struct gdbarch *gdbarch, struct type *type)
|
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 ();
|
enum type_code code = type->code ();
|
||||||
int len = TYPE_LENGTH (type);
|
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)
|
gdb_byte *readbuf, const gdb_byte *writebuf)
|
||||||
{
|
{
|
||||||
enum type_code code = type->code ();
|
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
|
/* Aggregates with a single member are always returned like their
|
||||||
sole element. */
|
sole element. */
|
||||||
|
@ -541,7 +541,7 @@ m68k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||||
function_call_return_method return_method,
|
function_call_return_method return_method,
|
||||||
CORE_ADDR struct_addr)
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
gdb_byte buf[4];
|
gdb_byte buf[4];
|
||||||
int i;
|
int i;
|
||||||
|
@ -596,7 +596,7 @@ m68k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||||
static int
|
static int
|
||||||
m68k_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int num)
|
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)
|
if (num < 8)
|
||||||
/* d0..7 */
|
/* d0..7 */
|
||||||
|
@ -766,7 +766,7 @@ m68k_analyze_register_saves (struct gdbarch *gdbarch, CORE_ADDR pc,
|
||||||
struct m68k_frame_cache *cache)
|
struct m68k_frame_cache *cache)
|
||||||
{
|
{
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
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)
|
if (cache->locals >= 0)
|
||||||
{
|
{
|
||||||
|
@ -1058,7 +1058,7 @@ m68k_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
|
||||||
gdb_byte *buf;
|
gdb_byte *buf;
|
||||||
CORE_ADDR sp, jb_addr;
|
CORE_ADDR sp, jb_addr;
|
||||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
|
|
||||||
if (tdep->jb_pc < 0)
|
if (tdep->jb_pc < 0)
|
||||||
|
@ -1104,7 +1104,7 @@ m68k_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
|
||||||
void
|
void
|
||||||
m68k_svr4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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. */
|
/* SVR4 uses a different calling convention. */
|
||||||
set_gdbarch_return_value (gdbarch, m68k_svr4_return_value);
|
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
|
static void
|
||||||
m68k_embedded_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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);
|
m68k_svr4_init_abi (info, gdbarch);
|
||||||
tdep->pointer_result_regnum = M68K_D0_REGNUM;
|
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))
|
best_arch = gdbarch_list_lookup_by_info (best_arch->next, &info))
|
||||||
{
|
{
|
||||||
m68k_gdbarch_tdep *tdep
|
m68k_gdbarch_tdep *tdep
|
||||||
= (m68k_gdbarch_tdep *) gdbarch_tdep (best_arch->gdbarch);
|
= gdbarch_tdep<m68k_gdbarch_tdep> (best_arch->gdbarch);
|
||||||
|
|
||||||
if (flavour != tdep->flavour)
|
if (flavour != tdep->flavour)
|
||||||
continue;
|
continue;
|
||||||
|
@ -1339,7 +1339,7 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||||
static void
|
static void
|
||||||
m68k_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
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)
|
if (tdep == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -260,7 +260,7 @@ me_module_register_set (CONFIG_ATTR me_module,
|
||||||
specifically excluding the generic coprocessor register sets. */
|
specifically excluding the generic coprocessor register sets. */
|
||||||
|
|
||||||
mep_gdbarch_tdep *tdep
|
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;
|
CGEN_CPU_DESC desc = tdep->cpu_desc;
|
||||||
const CGEN_HW_ENTRY *hw;
|
const CGEN_HW_ENTRY *hw;
|
||||||
|
|
||||||
|
@ -856,7 +856,7 @@ current_me_module (void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mep_gdbarch_tdep *tdep
|
mep_gdbarch_tdep *tdep
|
||||||
= (mep_gdbarch_tdep *) gdbarch_tdep (target_gdbarch ());
|
= gdbarch_tdep<mep_gdbarch_tdep> (target_gdbarch ());
|
||||||
return tdep->me_module;
|
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))
|
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||||
{
|
{
|
||||||
mep_gdbarch_tdep *tdep
|
mep_gdbarch_tdep *tdep
|
||||||
= (mep_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
= gdbarch_tdep<mep_gdbarch_tdep> (arches->gdbarch);
|
||||||
|
|
||||||
if (tdep->me_module == me_module)
|
if (tdep->me_module == me_module)
|
||||||
return arches->gdbarch;
|
return arches->gdbarch;
|
||||||
|
|
|
@ -1317,7 +1317,7 @@ mips_linux_get_syscall_number (struct gdbarch *gdbarch,
|
||||||
thread_info *thread)
|
thread_info *thread)
|
||||||
{
|
{
|
||||||
struct regcache *regcache = get_thread_regcache (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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
int regsize = register_size (gdbarch, MIPS_V0_REGNUM);
|
int regsize = register_size (gdbarch, MIPS_V0_REGNUM);
|
||||||
/* The content of a register */
|
/* The content of a register */
|
||||||
|
@ -1527,7 +1527,7 @@ static void
|
||||||
mips_linux_init_abi (struct gdbarch_info info,
|
mips_linux_init_abi (struct gdbarch_info info,
|
||||||
struct gdbarch *gdbarch)
|
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);
|
enum mips_abi abi = mips_abi (gdbarch);
|
||||||
struct tdesc_arch_data *tdesc_data = info.tdesc_data;
|
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 *
|
const struct mips_regnum *
|
||||||
mips_regnum (struct gdbarch *gdbarch)
|
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;
|
return tdep->regnum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ mips_float_register_p (struct gdbarch *gdbarch, int regnum)
|
||||||
static bool
|
static bool
|
||||||
mips_eabi (gdbarch *arch)
|
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 \
|
return (tdep->mips_abi == MIPS_ABI_EABI32 \
|
||||||
|| tdep->mips_abi == MIPS_ABI_EABI64);
|
|| tdep->mips_abi == MIPS_ABI_EABI64);
|
||||||
}
|
}
|
||||||
|
@ -260,21 +260,21 @@ mips_eabi (gdbarch *arch)
|
||||||
static int
|
static int
|
||||||
mips_last_fp_arg_regnum (gdbarch *arch)
|
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;
|
return tdep->mips_last_fp_arg_regnum;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mips_last_arg_regnum (gdbarch *arch)
|
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;
|
return tdep->mips_last_arg_regnum;
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum mips_fpu_type
|
static enum mips_fpu_type
|
||||||
mips_get_fpu_type (gdbarch *arch)
|
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;
|
return tdep->mips_fpu_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,14 +282,14 @@ mips_get_fpu_type (gdbarch *arch)
|
||||||
enum mips_abi
|
enum mips_abi
|
||||||
mips_abi (struct gdbarch *gdbarch)
|
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;
|
return tdep->mips_abi;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
mips_isa_regsize (struct gdbarch *gdbarch)
|
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 we know how big the registers are, use that size. */
|
||||||
if (tdep->register_size_valid_p)
|
if (tdep->register_size_valid_p)
|
||||||
|
@ -335,7 +335,7 @@ mips_abi_regsize (struct gdbarch *gdbarch)
|
||||||
static int
|
static int
|
||||||
is_mips16_isa (struct gdbarch *gdbarch)
|
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;
|
return tdep->mips_isa == ISA_MIPS16;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@ is_mips16_isa (struct gdbarch *gdbarch)
|
||||||
static int
|
static int
|
||||||
is_micromips_isa (struct gdbarch *gdbarch)
|
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;
|
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 *
|
static const char *
|
||||||
mips_register_name (struct gdbarch *gdbarch, int regno)
|
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. */
|
/* GPR names for all ABIs other than n32/n64. */
|
||||||
static const char *mips_gpr_names[] = {
|
static const char *mips_gpr_names[] = {
|
||||||
"zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
|
"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) >
|
else if (register_size (gdbarch, rawnum) >
|
||||||
register_size (gdbarch, cookednum))
|
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)
|
if (tdep->mips64_transfers_32bit_regs_p)
|
||||||
return regcache->raw_read_part (rawnum, 0, 4, buf);
|
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) >
|
else if (register_size (gdbarch, rawnum) >
|
||||||
register_size (gdbarch, cookednum))
|
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)
|
if (tdep->mips64_transfers_32bit_regs_p)
|
||||||
regcache->raw_write_part (rawnum, 0, 4, buf);
|
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))
|
if (register_size (gdbarch, rawnum) > register_size (gdbarch, reg))
|
||||||
{
|
{
|
||||||
mips_gdbarch_tdep *tdep
|
mips_gdbarch_tdep *tdep
|
||||||
= (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
= gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
if (!tdep->mips64_transfers_32bit_regs_p
|
if (!tdep->mips64_transfers_32bit_regs_p
|
||||||
|| gdbarch_byte_order (gdbarch) != BFD_ENDIAN_BIG)
|
|| gdbarch_byte_order (gdbarch) != BFD_ENDIAN_BIG)
|
||||||
|
@ -1059,7 +1059,7 @@ mips_register_type (struct gdbarch *gdbarch, int regnum)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int rawnum = regnum - gdbarch_num_regs (gdbarch);
|
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 cooked or ABI registers. These are sized according to
|
||||||
the ABI (with a few complications). */
|
the ABI (with a few complications). */
|
||||||
|
@ -1191,7 +1191,7 @@ show_mask_address (struct ui_file *file, int from_tty,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mips_gdbarch_tdep *tdep
|
mips_gdbarch_tdep *tdep
|
||||||
= (mips_gdbarch_tdep *) gdbarch_tdep (target_gdbarch ());
|
= gdbarch_tdep<mips_gdbarch_tdep> (target_gdbarch ());
|
||||||
|
|
||||||
if (mips_mask_address_p (tdep))
|
if (mips_mask_address_p (tdep))
|
||||||
additional_text = _(" (currently \"on\")");
|
additional_text = _(" (currently \"on\")");
|
||||||
|
@ -1727,7 +1727,7 @@ mips32_next_pc (struct regcache *regcache, CORE_ADDR pc)
|
||||||
case 12: /* SYSCALL */
|
case 12: /* SYSCALL */
|
||||||
{
|
{
|
||||||
mips_gdbarch_tdep *tdep
|
mips_gdbarch_tdep *tdep
|
||||||
= (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
= gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
if (tdep->syscall_next_pc != NULL)
|
if (tdep->syscall_next_pc != NULL)
|
||||||
pc = tdep->syscall_next_pc (get_current_frame ());
|
pc = tdep->syscall_next_pc (get_current_frame ());
|
||||||
|
@ -1938,7 +1938,7 @@ micromips_next_pc (struct regcache *regcache, CORE_ADDR pc)
|
||||||
case 0x22d: /* SYSCALL: 000000 1000101101 111100 */
|
case 0x22d: /* SYSCALL: 000000 1000101101 111100 */
|
||||||
{
|
{
|
||||||
mips_gdbarch_tdep *tdep
|
mips_gdbarch_tdep *tdep
|
||||||
= (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
= gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
if (tdep->syscall_next_pc != NULL)
|
if (tdep->syscall_next_pc != NULL)
|
||||||
pc = tdep->syscall_next_pc (get_current_frame ());
|
pc = tdep->syscall_next_pc (get_current_frame ());
|
||||||
|
@ -3901,7 +3901,7 @@ mips_stub_frame_base_sniffer (struct frame_info *this_frame)
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
mips_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR 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))
|
if (mips_mask_address_p (tdep) && (((ULONGEST) addr) >> 32 == 0xffffffffUL))
|
||||||
/* This hack is a work-around for existing boards using PMON, the
|
/* This hack is a work-around for existing boards using PMON, the
|
||||||
|
@ -4804,7 +4804,7 @@ mips_eabi_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||||
struct type *type, struct regcache *regcache,
|
struct type *type, struct regcache *regcache,
|
||||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
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 fp_return_type = 0;
|
||||||
int offset, regnum, xfer;
|
int offset, regnum, xfer;
|
||||||
|
|
||||||
|
@ -5195,7 +5195,7 @@ mips_n32n64_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||||
struct type *type, struct regcache *regcache,
|
struct type *type, struct regcache *regcache,
|
||||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
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
|
/* From MIPSpro N32 ABI Handbook, Document Number: 007-2816-004
|
||||||
|
|
||||||
|
@ -5704,7 +5704,7 @@ mips_o32_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||||
{
|
{
|
||||||
CORE_ADDR func_addr = function ? find_function_addr (function, NULL) : 0;
|
CORE_ADDR func_addr = function ? find_function_addr (function, NULL) : 0;
|
||||||
int mips16 = mips_pc_is_mips16 (gdbarch, func_addr);
|
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;
|
enum mips_fval_reg fval_reg;
|
||||||
|
|
||||||
fval_reg = readbuf ? mips16 ? mips_fval_gpr : mips_fval_fpr : mips_fval_both;
|
fval_reg = readbuf ? mips16 ? mips_fval_gpr : mips_fval_fpr : mips_fval_both;
|
||||||
|
@ -8101,7 +8101,7 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||||
else if (arches != NULL)
|
else if (arches != NULL)
|
||||||
{
|
{
|
||||||
mips_gdbarch_tdep *tdep
|
mips_gdbarch_tdep *tdep
|
||||||
= (mips_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
= gdbarch_tdep<mips_gdbarch_tdep> (arches->gdbarch);
|
||||||
elf_flags = tdep->elf_flags;
|
elf_flags = tdep->elf_flags;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -8142,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)
|
if (found_abi == MIPS_ABI_UNKNOWN && info.abfd == NULL && arches != NULL)
|
||||||
{
|
{
|
||||||
mips_gdbarch_tdep *tdep
|
mips_gdbarch_tdep *tdep
|
||||||
= (mips_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
= gdbarch_tdep<mips_gdbarch_tdep> (arches->gdbarch);
|
||||||
found_abi = tdep->found_abi;
|
found_abi = tdep->found_abi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8459,7 +8459,7 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||||
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||||
{
|
{
|
||||||
mips_gdbarch_tdep *tdep
|
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
|
/* MIPS needs to be pedantic about which ABI and the compressed
|
||||||
ISA variation the object is using. */
|
ISA variation the object is using. */
|
||||||
|
@ -8917,7 +8917,7 @@ mips_fpu_type_str (enum mips_fpu_type fpu_type)
|
||||||
static void
|
static void
|
||||||
mips_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
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)
|
if (tdep != NULL)
|
||||||
{
|
{
|
||||||
int ef_mips_arch;
|
int ef_mips_arch;
|
||||||
|
|
|
@ -1412,7 +1412,7 @@ mn10300_gdbarch_init (struct gdbarch_info info,
|
||||||
static void
|
static void
|
||||||
mn10300_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
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",
|
gdb_printf (file, "mn10300_dump_tdep: am33_mode = %d\n",
|
||||||
tdep->am33_mode);
|
tdep->am33_mode);
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ struct mn10300_gdbarch_tdep : gdbarch_tdep
|
||||||
static inline int
|
static inline int
|
||||||
get_am33_mode (gdbarch *arch)
|
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;
|
return tdep->am33_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -341,7 +341,7 @@ msp430_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc,
|
||||||
int rn;
|
int rn;
|
||||||
pv_t reg[MSP430_NUM_TOTAL_REGS];
|
pv_t reg[MSP430_NUM_TOTAL_REGS];
|
||||||
CORE_ADDR after_last_frame_setup_insn = start_pc;
|
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 code_model = tdep->code_model;
|
||||||
int sz;
|
int sz;
|
||||||
|
|
||||||
|
@ -570,7 +570,7 @@ msp430_return_value (struct gdbarch *gdbarch,
|
||||||
{
|
{
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
LONGEST valtype_len = TYPE_LENGTH (valtype);
|
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;
|
int code_model = tdep->code_model;
|
||||||
|
|
||||||
if (TYPE_LENGTH (valtype) > 8
|
if (TYPE_LENGTH (valtype) > 8
|
||||||
|
@ -651,7 +651,7 @@ msp430_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||||
int write_pass;
|
int write_pass;
|
||||||
int sp_off = 0;
|
int sp_off = 0;
|
||||||
CORE_ADDR cfa;
|
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;
|
int code_model = tdep->code_model;
|
||||||
|
|
||||||
struct type *func_type = value_type (function);
|
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 ();
|
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
|
if (tdep->code_model == MSP_SMALL_CODE_MODEL
|
||||||
&& msp430_in_return_stub (gdbarch, pc, stub_name))
|
&& 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)
|
if (ca && gdbarch_bfd_arch_info (ca)->arch == bfd_arch_msp430)
|
||||||
{
|
{
|
||||||
msp430_gdbarch_tdep *ca_tdep
|
msp430_gdbarch_tdep *ca_tdep
|
||||||
= (msp430_gdbarch_tdep *) gdbarch_tdep (ca);
|
= gdbarch_tdep<msp430_gdbarch_tdep> (ca);
|
||||||
|
|
||||||
elf_flags = ca_tdep->elf_flags;
|
elf_flags = ca_tdep->elf_flags;
|
||||||
isa = ca_tdep->isa;
|
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))
|
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||||
{
|
{
|
||||||
msp430_gdbarch_tdep *candidate_tdep
|
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
|
if (candidate_tdep->elf_flags != elf_flags
|
||||||
|| candidate_tdep->isa != isa
|
|| candidate_tdep->isa != isa
|
||||||
|
|
|
@ -289,7 +289,7 @@ typedef BP_MANIPULATION (nds32_break_insn) nds32_breakpoint;
|
||||||
static int
|
static int
|
||||||
nds32_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int num)
|
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 FSR = 38;
|
||||||
const int FDR = FSR + 32;
|
const int FDR = FSR + 32;
|
||||||
|
|
||||||
|
@ -432,7 +432,7 @@ nds32_pseudo_register_read (struct gdbarch *gdbarch,
|
||||||
readable_regcache *regcache, int regnum,
|
readable_regcache *regcache, int regnum,
|
||||||
gdb_byte *buf)
|
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];
|
gdb_byte reg_buf[8];
|
||||||
int offset, fdr_regnum;
|
int offset, fdr_regnum;
|
||||||
enum register_status status;
|
enum register_status status;
|
||||||
|
@ -471,7 +471,7 @@ nds32_pseudo_register_write (struct gdbarch *gdbarch,
|
||||||
struct regcache *regcache, int regnum,
|
struct regcache *regcache, int regnum,
|
||||||
const gdb_byte *buf)
|
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];
|
gdb_byte reg_buf[8];
|
||||||
int offset, fdr_regnum;
|
int offset, fdr_regnum;
|
||||||
|
|
||||||
|
@ -608,7 +608,7 @@ static CORE_ADDR
|
||||||
nds32_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc,
|
nds32_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc,
|
||||||
CORE_ADDR limit_pc, struct nds32_frame_cache *cache)
|
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);
|
int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
|
||||||
/* Current scanning status. */
|
/* Current scanning status. */
|
||||||
int in_prologue_bb = 0;
|
int in_prologue_bb = 0;
|
||||||
|
@ -1169,7 +1169,7 @@ static int
|
||||||
nds32_analyze_epilogue (struct gdbarch *gdbarch, CORE_ADDR pc,
|
nds32_analyze_epilogue (struct gdbarch *gdbarch, CORE_ADDR pc,
|
||||||
struct nds32_frame_cache *cache)
|
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);
|
int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
|
||||||
CORE_ADDR limit_pc;
|
CORE_ADDR limit_pc;
|
||||||
uint32_t insn, insn_len;
|
uint32_t insn, insn_len;
|
||||||
|
@ -1220,7 +1220,7 @@ nds32_analyze_epilogue (struct gdbarch *gdbarch, CORE_ADDR pc,
|
||||||
static int
|
static int
|
||||||
nds32_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr)
|
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 abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
|
||||||
int insn_type = INSN_NORMAL;
|
int insn_type = INSN_NORMAL;
|
||||||
int ret_found = 0;
|
int ret_found = 0;
|
||||||
|
@ -1424,7 +1424,7 @@ nds32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||||
int i;
|
int i;
|
||||||
ULONGEST regval;
|
ULONGEST regval;
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
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);
|
struct type *func_type = value_type (function);
|
||||||
int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
|
int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
|
||||||
int abi_split = nds32_abi_split (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)
|
struct regcache *regcache, gdb_byte *valbuf)
|
||||||
{
|
{
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
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 abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
|
||||||
int calling_use_fpr;
|
int calling_use_fpr;
|
||||||
int len;
|
int len;
|
||||||
|
@ -1742,7 +1742,7 @@ nds32_store_return_value (struct gdbarch *gdbarch, struct type *type,
|
||||||
struct regcache *regcache, const gdb_byte *valbuf)
|
struct regcache *regcache, const gdb_byte *valbuf)
|
||||||
{
|
{
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
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 abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
|
||||||
int calling_use_fpr;
|
int calling_use_fpr;
|
||||||
int len;
|
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))
|
best_arch = gdbarch_list_lookup_by_info (best_arch->next, &info))
|
||||||
{
|
{
|
||||||
nds32_gdbarch_tdep *idep
|
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)
|
if (idep->elf_abi != elf_abi)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -217,7 +217,7 @@ nios2_linux_is_kernel_helper (CORE_ADDR pc)
|
||||||
static void
|
static void
|
||||||
nios2_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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);
|
linux_init_abi (info, gdbarch, 0);
|
||||||
|
|
||||||
|
|
|
@ -2098,7 +2098,7 @@ static CORE_ADDR
|
||||||
nios2_get_next_pc (struct regcache *regcache, CORE_ADDR pc)
|
nios2_get_next_pc (struct regcache *regcache, CORE_ADDR pc)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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 long mach = gdbarch_bfd_arch_info (gdbarch)->mach;
|
||||||
unsigned int insn;
|
unsigned int insn;
|
||||||
const struct nios2_opcode *op = nios2_fetch_insn (gdbarch, pc, &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)
|
nios2_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
CORE_ADDR jb_addr = get_frame_register_unsigned (frame, NIOS2_R4_REGNUM);
|
CORE_ADDR jb_addr = get_frame_register_unsigned (frame, NIOS2_R4_REGNUM);
|
||||||
gdb_byte buf[4];
|
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 bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
enum type_code rv_type = valtype->code ();
|
enum type_code rv_type = valtype->code ();
|
||||||
unsigned int rv_size = TYPE_LENGTH (valtype);
|
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;
|
int bpw = tdep->bytes_per_word;
|
||||||
|
|
||||||
/* Deal with struct/union as addresses. If an array won't fit in a
|
/* 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;
|
const CGEN_INSN *insn;
|
||||||
CGEN_FIELDS tmp_fields;
|
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,
|
insn = cgen_lookup_insn (tdep->gdb_cgen_cpu_desc,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -635,7 +635,7 @@ or1k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||||
int heap_offset = 0;
|
int heap_offset = 0;
|
||||||
CORE_ADDR heap_sp = sp - 128;
|
CORE_ADDR heap_sp = sp - 128;
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
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 bpa = tdep->bytes_per_address;
|
||||||
int bpw = tdep->bytes_per_word;
|
int bpw = tdep->bytes_per_word;
|
||||||
struct type *func_type = value_type (function);
|
struct type *func_type = value_type (function);
|
||||||
|
@ -1273,7 +1273,7 @@ or1k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||||
static void
|
static void
|
||||||
or1k_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
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)
|
if (NULL == tdep)
|
||||||
return; /* Nothing to report */
|
return; /* Nothing to report */
|
||||||
|
|
|
@ -100,7 +100,7 @@ fill_fpregset (const struct regcache *regcache,
|
||||||
static int
|
static int
|
||||||
getfpregs_supplies (struct gdbarch *gdbarch, int regno)
|
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
|
/* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
|
||||||
point registers. Traditionally, GDB's register set has still
|
point registers. Traditionally, GDB's register set has still
|
||||||
|
@ -185,7 +185,7 @@ static int
|
||||||
ppcfbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
|
ppcfbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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;
|
int i, regnum;
|
||||||
|
|
||||||
/* The stack pointer shouldn't be zero. */
|
/* The stack pointer shouldn't be zero. */
|
||||||
|
|
|
@ -126,7 +126,7 @@ ppcfbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
void *cb_data,
|
void *cb_data,
|
||||||
const struct regcache *regcache)
|
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)
|
if (tdep->wordsize == 4)
|
||||||
cb (".reg", 148, 148, &ppc32_fbsd_gregset, NULL, cb_data);
|
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)
|
ppcfbsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
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;
|
struct trad_frame_cache *cache;
|
||||||
CORE_ADDR addr, base, func;
|
CORE_ADDR addr, base, func;
|
||||||
gdb_byte buf[PPC_INSN_SIZE];
|
gdb_byte buf[PPC_INSN_SIZE];
|
||||||
|
@ -287,7 +287,7 @@ static CORE_ADDR
|
||||||
ppcfbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
|
ppcfbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
|
||||||
CORE_ADDR lm_addr, CORE_ADDR offset)
|
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;
|
struct regcache *regcache;
|
||||||
int tp_offset, tp_regnum;
|
int tp_offset, tp_regnum;
|
||||||
|
|
||||||
|
@ -319,7 +319,7 @@ ppcfbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
|
||||||
static void
|
static void
|
||||||
ppcfbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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. */
|
/* Generic FreeBSD support. */
|
||||||
fbsd_init_abi (info, gdbarch);
|
fbsd_init_abi (info, gdbarch);
|
||||||
|
|
|
@ -649,7 +649,7 @@ static int
|
||||||
ppc_register_u_addr (struct gdbarch *gdbarch, int regno)
|
ppc_register_u_addr (struct gdbarch *gdbarch, int regno)
|
||||||
{
|
{
|
||||||
int u_addr = -1;
|
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
|
/* NOTE: cagney/2003-11-25: This is the word size used by the ptrace
|
||||||
interface, and not the wordsize of the program's ABI. */
|
interface, and not the wordsize of the program's ABI. */
|
||||||
int wordsize = sizeof (long);
|
int wordsize = sizeof (long);
|
||||||
|
@ -802,7 +802,7 @@ static void
|
||||||
fetch_spe_register (struct regcache *regcache, int tid, int regno)
|
fetch_spe_register (struct regcache *regcache, int tid, int regno)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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;
|
struct gdb_evrregset_t evrregs;
|
||||||
|
|
||||||
gdb_assert (sizeof (evrregs.evr[0])
|
gdb_assert (sizeof (evrregs.evr[0])
|
||||||
|
@ -911,7 +911,7 @@ static void
|
||||||
fetch_register (struct regcache *regcache, int tid, int regno)
|
fetch_register (struct regcache *regcache, int tid, int regno)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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. */
|
/* This isn't really an address. But ptrace thinks of it as one. */
|
||||||
CORE_ADDR regaddr = ppc_register_u_addr (gdbarch, regno);
|
CORE_ADDR regaddr = ppc_register_u_addr (gdbarch, regno);
|
||||||
int bytes_transferred;
|
int bytes_transferred;
|
||||||
|
@ -1156,7 +1156,7 @@ static void
|
||||||
fetch_gp_regs (struct regcache *regcache, int tid)
|
fetch_gp_regs (struct regcache *regcache, int tid)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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;
|
int i;
|
||||||
|
|
||||||
if (have_ptrace_getsetregs)
|
if (have_ptrace_getsetregs)
|
||||||
|
@ -1208,7 +1208,7 @@ static void
|
||||||
fetch_fp_regs (struct regcache *regcache, int tid)
|
fetch_fp_regs (struct regcache *regcache, int tid)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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;
|
int i;
|
||||||
|
|
||||||
if (have_ptrace_getsetfpregs)
|
if (have_ptrace_getsetfpregs)
|
||||||
|
@ -1226,7 +1226,7 @@ static void
|
||||||
fetch_ppc_registers (struct regcache *regcache, int tid)
|
fetch_ppc_registers (struct regcache *regcache, int tid)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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);
|
fetch_gp_regs (regcache, tid);
|
||||||
if (tdep->ppc_fp0_regnum >= 0)
|
if (tdep->ppc_fp0_regnum >= 0)
|
||||||
|
@ -1425,7 +1425,7 @@ static void
|
||||||
store_spe_register (const struct regcache *regcache, int tid, int regno)
|
store_spe_register (const struct regcache *regcache, int tid, int regno)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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;
|
struct gdb_evrregset_t evrregs;
|
||||||
|
|
||||||
gdb_assert (sizeof (evrregs.evr[0])
|
gdb_assert (sizeof (evrregs.evr[0])
|
||||||
|
@ -1477,7 +1477,7 @@ static void
|
||||||
store_register (const struct regcache *regcache, int tid, int regno)
|
store_register (const struct regcache *regcache, int tid, int regno)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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. */
|
/* This isn't really an address. But ptrace thinks of it as one. */
|
||||||
CORE_ADDR regaddr = ppc_register_u_addr (gdbarch, regno);
|
CORE_ADDR regaddr = ppc_register_u_addr (gdbarch, regno);
|
||||||
int i;
|
int i;
|
||||||
|
@ -1718,7 +1718,7 @@ static void
|
||||||
store_gp_regs (const struct regcache *regcache, int tid, int regno)
|
store_gp_regs (const struct regcache *regcache, int tid, int regno)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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;
|
int i;
|
||||||
|
|
||||||
if (have_ptrace_getsetregs)
|
if (have_ptrace_getsetregs)
|
||||||
|
@ -1780,7 +1780,7 @@ static void
|
||||||
store_fp_regs (const struct regcache *regcache, int tid, int regno)
|
store_fp_regs (const struct regcache *regcache, int tid, int regno)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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;
|
int i;
|
||||||
|
|
||||||
if (have_ptrace_getsetfpregs)
|
if (have_ptrace_getsetfpregs)
|
||||||
|
@ -1798,7 +1798,7 @@ static void
|
||||||
store_ppc_registers (const struct regcache *regcache, int tid)
|
store_ppc_registers (const struct regcache *regcache, int tid)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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);
|
store_gp_regs (regcache, tid, -1);
|
||||||
if (tdep->ppc_fp0_regnum >= 0)
|
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];
|
unsigned int insnbuf[POWERPC32_PLT_CHECK_LEN];
|
||||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
CORE_ADDR target = 0;
|
CORE_ADDR target = 0;
|
||||||
int scan_limit, i;
|
int scan_limit, i;
|
||||||
|
@ -898,7 +898,7 @@ ppc_linux_vsxregset (void)
|
||||||
const struct regset *
|
const struct regset *
|
||||||
ppc_linux_cgprregset (struct gdbarch *gdbarch)
|
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)
|
if (tdep->wordsize == 4)
|
||||||
{
|
{
|
||||||
|
@ -938,7 +938,7 @@ ppc_linux_collect_core_cpgrregset (const struct regset *regset,
|
||||||
int regnum, void *buf, size_t len)
|
int regnum, void *buf, size_t len)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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);
|
const struct regset *cgprregset = ppc_linux_cgprregset (gdbarch);
|
||||||
|
|
||||||
|
@ -985,7 +985,7 @@ ppc_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
void *cb_data,
|
void *cb_data,
|
||||||
const struct regcache *regcache)
|
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_altivec = tdep->ppc_vr0_regnum != -1;
|
||||||
int have_vsx = tdep->ppc_vsr0_upper_regnum != -1;
|
int have_vsx = tdep->ppc_vsr0_upper_regnum != -1;
|
||||||
int have_ppr = tdep->ppc_ppr_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;
|
CORE_ADDR fpregs;
|
||||||
int i;
|
int i;
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
|
|
||||||
base = get_frame_register_unsigned (this_frame,
|
base = get_frame_register_unsigned (this_frame,
|
||||||
|
@ -1341,7 +1341,7 @@ ppc_linux_get_syscall_number (struct gdbarch *gdbarch,
|
||||||
thread_info *thread)
|
thread_info *thread)
|
||||||
{
|
{
|
||||||
struct regcache *regcache = get_thread_regcache (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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
|
|
||||||
/* Make sure we're in a 32- or 64-bit machine */
|
/* Make sure we're in a 32- or 64-bit machine */
|
||||||
|
@ -1419,7 +1419,7 @@ static int
|
||||||
ppc_linux_syscall_record (struct regcache *regcache)
|
ppc_linux_syscall_record (struct regcache *regcache)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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;
|
ULONGEST scnum;
|
||||||
enum gdb_syscall syscall_gdb;
|
enum gdb_syscall syscall_gdb;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -1509,7 +1509,7 @@ ppc_linux_record_signal (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
const int SIGNAL_FRAMESIZE = 128;
|
const int SIGNAL_FRAMESIZE = 128;
|
||||||
const int sizeof_rt_sigframe = 1440 * 2 + 8 * 2 + 4 * 6 + 8 + 8 + 128 + 512;
|
const int sizeof_rt_sigframe = 1440 * 2 + 8 * 2 + 4 * 6 + 8 + 8 + 128 + 512;
|
||||||
ULONGEST sp;
|
ULONGEST sp;
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 3; i <= 12; i++)
|
for (i = 3; i <= 12; i++)
|
||||||
|
@ -2044,7 +2044,7 @@ static void
|
||||||
ppc_linux_init_abi (struct gdbarch_info info,
|
ppc_linux_init_abi (struct gdbarch_info info,
|
||||||
struct gdbarch *gdbarch)
|
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;
|
struct tdesc_arch_data *tdesc_data = info.tdesc_data;
|
||||||
static const char *const stap_integer_prefixes[] = { "i", NULL };
|
static const char *const stap_integer_prefixes[] = { "i", NULL };
|
||||||
static const char *const stap_register_indirection_prefixes[] = { "(",
|
static const char *const stap_register_indirection_prefixes[] = { "(",
|
||||||
|
|
|
@ -52,7 +52,7 @@ static ppc_nbsd_nat_target the_ppc_nbsd_nat_target;
|
||||||
static int
|
static int
|
||||||
getregs_supplies (struct gdbarch *gdbarch, int regnum)
|
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
|
return ((regnum >= tdep->ppc_gp0_regnum
|
||||||
&& regnum < tdep->ppc_gp0_regnum + ppc_num_gprs)
|
&& regnum < tdep->ppc_gp0_regnum + ppc_num_gprs)
|
||||||
|
@ -68,7 +68,7 @@ getregs_supplies (struct gdbarch *gdbarch, int regnum)
|
||||||
static int
|
static int
|
||||||
getfpregs_supplies (struct gdbarch *gdbarch, int regnum)
|
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
|
/* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
|
||||||
point registers. Traditionally, GDB's register set has still
|
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 switchframe sf;
|
||||||
struct callframe cf;
|
struct callframe cf;
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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;
|
int i;
|
||||||
|
|
||||||
/* The stack pointer shouldn't be zero. */
|
/* The stack pointer shouldn't be zero. */
|
||||||
|
|
|
@ -102,7 +102,7 @@ ppcnbsd_sigtramp_cache_init (const struct tramp_frame *self,
|
||||||
CORE_ADDR func)
|
CORE_ADDR func)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
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;
|
CORE_ADDR addr, base;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ static ppc_obsd_nat_target the_ppc_obsd_nat_target;
|
||||||
static int
|
static int
|
||||||
getfpregs_supplies (struct gdbarch *gdbarch, int regnum)
|
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
|
/* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
|
||||||
point registers. Traditionally, GDB's register set has still
|
point registers. Traditionally, GDB's register set has still
|
||||||
|
@ -154,7 +154,7 @@ static int
|
||||||
ppcobsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
|
ppcobsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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 switchframe sf;
|
||||||
struct callframe cf;
|
struct callframe cf;
|
||||||
int i, regnum;
|
int i, regnum;
|
||||||
|
|
|
@ -161,7 +161,7 @@ static struct trad_frame_cache *
|
||||||
ppcobsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
|
ppcobsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
struct trad_frame_cache *cache;
|
struct trad_frame_cache *cache;
|
||||||
CORE_ADDR addr, base, func;
|
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,
|
function_call_return_method return_method,
|
||||||
CORE_ADDR struct_addr)
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function));
|
int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function));
|
||||||
ULONGEST saved_sp;
|
ULONGEST saved_sp;
|
||||||
|
@ -602,7 +602,7 @@ get_decimal_float_return_value (struct gdbarch *gdbarch, struct type *valtype,
|
||||||
struct regcache *regcache, gdb_byte *readbuf,
|
struct regcache *regcache, gdb_byte *readbuf,
|
||||||
const gdb_byte *writebuf)
|
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);
|
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,
|
gdb_byte *readbuf, const gdb_byte *writebuf,
|
||||||
int broken_gcc)
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
int opencl_abi = func_type? ppc_sysv_use_opencl_abi (func_type) : 0;
|
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,
|
const bfd_byte *val, int len, int align,
|
||||||
struct ppc64_sysv_argpos *argpos)
|
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;
|
int offset = 0;
|
||||||
|
|
||||||
/* Enforce alignment of stack location, if requested. */
|
/* Enforce alignment of stack location, if requested. */
|
||||||
|
@ -1317,7 +1317,7 @@ static void
|
||||||
ppc64_sysv_abi_push_integer (struct gdbarch *gdbarch, ULONGEST val,
|
ppc64_sysv_abi_push_integer (struct gdbarch *gdbarch, ULONGEST val,
|
||||||
struct ppc64_sysv_argpos *argpos)
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
gdb_byte buf[PPC_MAX_REGISTER_SIZE];
|
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 type *type, const bfd_byte *val,
|
||||||
struct ppc64_sysv_argpos *argpos)
|
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)
|
if (tdep->soft_float)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1420,7 +1420,7 @@ static void
|
||||||
ppc64_sysv_abi_push_vreg (struct gdbarch *gdbarch, const bfd_byte *val,
|
ppc64_sysv_abi_push_vreg (struct gdbarch *gdbarch, const bfd_byte *val,
|
||||||
struct ppc64_sysv_argpos *argpos)
|
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)
|
if (argpos->regcache && argpos->vreg <= 13)
|
||||||
argpos->regcache->cooked_write (tdep->ppc_vr0_regnum + argpos->vreg, val);
|
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 type *type, const bfd_byte *val,
|
||||||
struct ppc64_sysv_argpos *argpos)
|
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
|
if (type->code () == TYPE_CODE_FLT
|
||||||
&& TYPE_LENGTH (type) == 16
|
&& TYPE_LENGTH (type) == 16
|
||||||
|
@ -1589,7 +1589,7 @@ ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
|
||||||
CORE_ADDR struct_addr)
|
CORE_ADDR struct_addr)
|
||||||
{
|
{
|
||||||
CORE_ADDR func_addr = find_function_addr (function, NULL);
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function));
|
int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function));
|
||||||
ULONGEST back_chain;
|
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,
|
struct regcache *regcache, gdb_byte *readbuf,
|
||||||
const gdb_byte *writebuf, int index)
|
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. */
|
/* Integers live in GPRs starting at r3. */
|
||||||
if ((valtype->code () == TYPE_CODE_INT
|
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,
|
struct type *valtype, struct regcache *regcache,
|
||||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
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;
|
struct type *func_type = function ? value_type (function) : NULL;
|
||||||
int opencl_abi = func_type? ppc_sysv_use_opencl_abi (func_type) : 0;
|
int opencl_abi = func_type? ppc_sysv_use_opencl_abi (func_type) : 0;
|
||||||
struct type *eltype;
|
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);
|
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
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;
|
CORE_ADDR tocp;
|
||||||
|
|
||||||
if (execution_direction == EXEC_REVERSE)
|
if (execution_direction == EXEC_REVERSE)
|
||||||
|
|
|
@ -179,7 +179,7 @@ riscv_linux_syscall_next_pc (struct frame_info *frame)
|
||||||
static void
|
static void
|
||||||
riscv_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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);
|
linux_init_abi (info, gdbarch, 0);
|
||||||
|
|
||||||
|
|
|
@ -733,7 +733,7 @@ show_riscv_debug_variable (struct ui_file *file, int from_tty,
|
||||||
int
|
int
|
||||||
riscv_isa_xlen (struct gdbarch *gdbarch)
|
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;
|
return tdep->isa_features.xlen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -742,7 +742,7 @@ riscv_isa_xlen (struct gdbarch *gdbarch)
|
||||||
int
|
int
|
||||||
riscv_abi_xlen (struct gdbarch *gdbarch)
|
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;
|
return tdep->abi_features.xlen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -751,7 +751,7 @@ riscv_abi_xlen (struct gdbarch *gdbarch)
|
||||||
int
|
int
|
||||||
riscv_isa_flen (struct gdbarch *gdbarch)
|
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;
|
return tdep->isa_features.flen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -760,7 +760,7 @@ riscv_isa_flen (struct gdbarch *gdbarch)
|
||||||
int
|
int
|
||||||
riscv_abi_flen (struct gdbarch *gdbarch)
|
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;
|
return tdep->abi_features.flen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -769,7 +769,7 @@ riscv_abi_flen (struct gdbarch *gdbarch)
|
||||||
bool
|
bool
|
||||||
riscv_abi_embedded (struct gdbarch *gdbarch)
|
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;
|
return tdep->abi_features.embedded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -786,7 +786,7 @@ riscv_has_fp_regs (struct gdbarch *gdbarch)
|
||||||
static bool
|
static bool
|
||||||
riscv_has_fp_abi (struct gdbarch *gdbarch)
|
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;
|
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
|
will show up in 'info register all'. Unless, we identify the
|
||||||
duplicate copies of these registers (in riscv_tdesc_unknown_reg) and
|
duplicate copies of these registers (in riscv_tdesc_unknown_reg) and
|
||||||
then hide the registers here by giving them no name. */
|
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)
|
if (tdep->duplicate_fflags_regnum == regnum)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (tdep->duplicate_frm_regnum == regnum)
|
if (tdep->duplicate_frm_regnum == regnum)
|
||||||
|
@ -938,7 +938,7 @@ riscv_register_name (struct gdbarch *gdbarch, int regnum)
|
||||||
static struct type *
|
static struct type *
|
||||||
riscv_fpreg_d_type (struct gdbarch *gdbarch)
|
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)
|
if (tdep->riscv_fpreg_d_type == nullptr)
|
||||||
{
|
{
|
||||||
|
@ -1260,7 +1260,7 @@ riscv_is_regnum_a_named_csr (int regnum)
|
||||||
static bool
|
static bool
|
||||||
riscv_is_unknown_csr (struct gdbarch *gdbarch, int regnum)
|
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
|
return (regnum >= tdep->unknown_csrs_first_regnum
|
||||||
&& regnum < (tdep->unknown_csrs_first_regnum
|
&& regnum < (tdep->unknown_csrs_first_regnum
|
||||||
+ tdep->unknown_csrs_count));
|
+ tdep->unknown_csrs_count));
|
||||||
|
@ -3600,7 +3600,7 @@ riscv_tdesc_unknown_reg (struct gdbarch *gdbarch, tdesc_feature *feature,
|
||||||
record their register numbers here. */
|
record their register numbers here. */
|
||||||
if (strcmp (tdesc_feature_name (feature), riscv_freg_feature.name ()) == 0)
|
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;
|
int *regnum_ptr = nullptr;
|
||||||
|
|
||||||
if (strcmp (reg_name, "fflags") == 0)
|
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. */
|
about register groups in riscv_register_reggroup_p. */
|
||||||
if (strcmp (tdesc_feature_name (feature), riscv_csr_feature.name ()) == 0)
|
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)
|
if (tdep->unknown_csrs_first_regnum == -1)
|
||||||
tdep->unknown_csrs_first_regnum = possible_regnum;
|
tdep->unknown_csrs_first_regnum = possible_regnum;
|
||||||
gdb_assert (tdep->unknown_csrs_first_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
|
we are looking for. If it doesn't then we can't reuse this
|
||||||
gdbarch. */
|
gdbarch. */
|
||||||
riscv_gdbarch_tdep *other_tdep
|
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
|
if (other_tdep->isa_features != features
|
||||||
|| other_tdep->abi_features != abi_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 ();
|
struct gdbarch *gdbarch = regcache->arch ();
|
||||||
const riscv_gdbarch_tdep *tdep
|
const riscv_gdbarch_tdep *tdep
|
||||||
= (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
= gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
|
||||||
struct riscv_insn insn;
|
struct riscv_insn insn;
|
||||||
CORE_ADDR next_pc;
|
CORE_ADDR next_pc;
|
||||||
|
|
||||||
|
|
|
@ -267,7 +267,7 @@ struct rl78_prologue
|
||||||
static struct type *
|
static struct type *
|
||||||
rl78_psw_type (struct gdbarch *gdbarch)
|
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)
|
if (tdep->rl78_psw_type == NULL)
|
||||||
{
|
{
|
||||||
|
@ -291,7 +291,7 @@ rl78_psw_type (struct gdbarch *gdbarch)
|
||||||
static struct type *
|
static struct type *
|
||||||
rl78_register_type (struct gdbarch *gdbarch, int reg_nr)
|
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)
|
if (reg_nr == RL78_PC_REGNUM)
|
||||||
return tdep->rl78_code_pointer;
|
return tdep->rl78_code_pointer;
|
||||||
|
@ -1248,7 +1248,7 @@ rl78_return_value (struct gdbarch *gdbarch,
|
||||||
{
|
{
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
ULONGEST valtype_len = TYPE_LENGTH (valtype);
|
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;
|
int is_g10 = tdep->elf_flags & E_FLAG_RL78_G10;
|
||||||
|
|
||||||
if (valtype_len > 8)
|
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))
|
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||||
{
|
{
|
||||||
rl78_gdbarch_tdep *tdep
|
rl78_gdbarch_tdep *tdep
|
||||||
= (rl78_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
= gdbarch_tdep<rl78_gdbarch_tdep> (arches->gdbarch);
|
||||||
|
|
||||||
if (tdep->elf_flags != elf_flags)
|
if (tdep->elf_flags != elf_flags)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -115,7 +115,7 @@ static rs6000_nat_target the_rs6000_nat_target;
|
||||||
static int
|
static int
|
||||||
regmap (struct gdbarch *gdbarch, int regno, int *isfloat)
|
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;
|
*isfloat = 0;
|
||||||
if (tdep->ppc_gp0_regnum <= regno
|
if (tdep->ppc_gp0_regnum <= regno
|
||||||
|
@ -317,7 +317,7 @@ rs6000_nat_target::fetch_registers (struct regcache *regcache, int regno)
|
||||||
|
|
||||||
else
|
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. */
|
/* Read 32 general purpose registers. */
|
||||||
for (regno = tdep->ppc_gp0_regnum;
|
for (regno = tdep->ppc_gp0_regnum;
|
||||||
|
@ -359,7 +359,7 @@ rs6000_nat_target::store_registers (struct regcache *regcache, int regno)
|
||||||
|
|
||||||
else
|
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. */
|
/* Write general purpose registers first. */
|
||||||
for (regno = tdep->ppc_gp0_regnum;
|
for (regno = tdep->ppc_gp0_regnum;
|
||||||
|
|
|
@ -75,7 +75,7 @@ aix_sighandle_frame_cache (struct frame_info *this_frame,
|
||||||
LONGEST backchain;
|
LONGEST backchain;
|
||||||
CORE_ADDR base, base_orig, func;
|
CORE_ADDR base, base_orig, func;
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
struct trad_frame_cache *this_trad_cache;
|
struct trad_frame_cache *this_trad_cache;
|
||||||
|
|
||||||
|
@ -261,7 +261,7 @@ rs6000_aix_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
void *cb_data,
|
void *cb_data,
|
||||||
const struct regcache *regcache)
|
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)
|
if (tdep->wordsize == 4)
|
||||||
cb (".reg", 592, 592, &rs6000_aix32_regset, NULL, cb_data);
|
cb (".reg", 592, 592, &rs6000_aix32_regset, NULL, cb_data);
|
||||||
else
|
else
|
||||||
|
@ -292,7 +292,7 @@ rs6000_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||||
function_call_return_method return_method,
|
function_call_return_method return_method,
|
||||||
CORE_ADDR struct_addr)
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
int ii;
|
int ii;
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
@ -522,7 +522,7 @@ rs6000_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||||
struct type *valtype, struct regcache *regcache,
|
struct type *valtype, struct regcache *regcache,
|
||||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
|
|
||||||
/* The calling convention this function implements assumes the
|
/* The calling convention this function implements assumes the
|
||||||
|
@ -660,7 +660,7 @@ rs6000_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
|
||||||
CORE_ADDR addr,
|
CORE_ADDR addr,
|
||||||
struct target_ops *targ)
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
struct obj_section *s;
|
struct obj_section *s;
|
||||||
|
|
||||||
|
@ -704,7 +704,7 @@ branch_dest (struct regcache *regcache, int opcode, int instr,
|
||||||
CORE_ADDR pc, CORE_ADDR safety)
|
CORE_ADDR pc, CORE_ADDR safety)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
CORE_ADDR dest;
|
CORE_ADDR dest;
|
||||||
int immediate;
|
int immediate;
|
||||||
|
@ -972,7 +972,7 @@ static struct ld_info
|
||||||
rs6000_aix_extract_ld_info (struct gdbarch *gdbarch,
|
rs6000_aix_extract_ld_info (struct gdbarch *gdbarch,
|
||||||
const gdb_byte *ldi_buf)
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
struct type *ptr_type = builtin_type (gdbarch)->builtin_data_ptr;
|
struct type *ptr_type = builtin_type (gdbarch)->builtin_data_ptr;
|
||||||
const struct ld_info_desc desc
|
const struct ld_info_desc desc
|
||||||
|
@ -1131,7 +1131,7 @@ rs6000_aix_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
|
||||||
static void
|
static void
|
||||||
rs6000_aix_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
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. */
|
/* RS6000/AIX does not support PT_STEP. Has to be simulated. */
|
||||||
set_gdbarch_software_single_step (gdbarch, rs6000_software_single_step);
|
set_gdbarch_software_single_step (gdbarch, rs6000_software_single_step);
|
||||||
|
|
|
@ -36,7 +36,7 @@ rs6000_lynx178_push_dummy_call (struct gdbarch *gdbarch,
|
||||||
function_call_return_method return_method,
|
function_call_return_method return_method,
|
||||||
CORE_ADDR struct_addr)
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
int ii;
|
int ii;
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
@ -265,7 +265,7 @@ rs6000_lynx178_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||||
struct type *valtype, struct regcache *regcache,
|
struct type *valtype, struct regcache *regcache,
|
||||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
|
|
||||||
/* The calling convention this function implements assumes the
|
/* The calling convention this function implements assumes the
|
||||||
|
|
|
@ -201,7 +201,7 @@ struct rs6000_framedata
|
||||||
int
|
int
|
||||||
vsx_register_p (struct gdbarch *gdbarch, int regno)
|
vsx_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);
|
||||||
if (tdep->ppc_vsr0_regnum < 0)
|
if (tdep->ppc_vsr0_regnum < 0)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
|
@ -213,7 +213,7 @@ vsx_register_p (struct gdbarch *gdbarch, int regno)
|
||||||
int
|
int
|
||||||
altivec_register_p (struct gdbarch *gdbarch, int regno)
|
altivec_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);
|
||||||
if (tdep->ppc_vr0_regnum < 0 || tdep->ppc_vrsave_regnum < 0)
|
if (tdep->ppc_vr0_regnum < 0 || tdep->ppc_vrsave_regnum < 0)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
|
@ -225,7 +225,7 @@ altivec_register_p (struct gdbarch *gdbarch, int regno)
|
||||||
int
|
int
|
||||||
spe_register_p (struct gdbarch *gdbarch, int regno)
|
spe_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);
|
||||||
|
|
||||||
/* Is it a reference to EV0 -- EV31, and do we have those? */
|
/* Is it a reference to EV0 -- EV31, and do we have those? */
|
||||||
if (IS_SPE_PSEUDOREG (tdep, regno))
|
if (IS_SPE_PSEUDOREG (tdep, regno))
|
||||||
|
@ -257,7 +257,7 @@ spe_register_p (struct gdbarch *gdbarch, int regno)
|
||||||
int
|
int
|
||||||
ppc_floating_point_unit_p (struct gdbarch *gdbarch)
|
ppc_floating_point_unit_p (struct gdbarch *gdbarch)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
return (tdep->ppc_fp0_regnum >= 0
|
return (tdep->ppc_fp0_regnum >= 0
|
||||||
&& tdep->ppc_fpscr_regnum >= 0);
|
&& tdep->ppc_fpscr_regnum >= 0);
|
||||||
|
@ -268,7 +268,7 @@ ppc_floating_point_unit_p (struct gdbarch *gdbarch)
|
||||||
int
|
int
|
||||||
ppc_altivec_support_p (struct gdbarch *gdbarch)
|
ppc_altivec_support_p (struct gdbarch *gdbarch)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
return (tdep->ppc_vr0_regnum >= 0
|
return (tdep->ppc_vr0_regnum >= 0
|
||||||
&& tdep->ppc_vrsave_regnum >= 0);
|
&& tdep->ppc_vrsave_regnum >= 0);
|
||||||
|
@ -297,7 +297,7 @@ set_sim_regno (int *table, int gdb_regno, int sim_regno)
|
||||||
static void
|
static void
|
||||||
init_sim_regno_table (struct gdbarch *arch)
|
init_sim_regno_table (struct gdbarch *arch)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (arch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (arch);
|
||||||
int total_regs = gdbarch_num_regs (arch);
|
int total_regs = gdbarch_num_regs (arch);
|
||||||
int *sim_regno = GDBARCH_OBSTACK_CALLOC (arch, total_regs, int);
|
int *sim_regno = GDBARCH_OBSTACK_CALLOC (arch, total_regs, int);
|
||||||
int i;
|
int i;
|
||||||
|
@ -391,7 +391,7 @@ init_sim_regno_table (struct gdbarch *arch)
|
||||||
static int
|
static int
|
||||||
rs6000_register_sim_regno (struct gdbarch *gdbarch, int reg)
|
rs6000_register_sim_regno (struct gdbarch *gdbarch, int reg)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int sim_regno;
|
int sim_regno;
|
||||||
|
|
||||||
if (tdep->sim_regno == NULL)
|
if (tdep->sim_regno == NULL)
|
||||||
|
@ -522,7 +522,7 @@ ppc_supply_gregset (const struct regset *regset, struct regcache *regcache,
|
||||||
int regnum, const void *gregs, size_t len)
|
int regnum, const void *gregs, size_t len)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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 ppc_reg_offsets *offsets
|
const struct ppc_reg_offsets *offsets
|
||||||
= (const struct ppc_reg_offsets *) regset->regmap;
|
= (const struct ppc_reg_offsets *) regset->regmap;
|
||||||
size_t offset;
|
size_t offset;
|
||||||
|
@ -578,7 +578,7 @@ ppc_supply_fpregset (const struct regset *regset, struct regcache *regcache,
|
||||||
if (!ppc_floating_point_unit_p (gdbarch))
|
if (!ppc_floating_point_unit_p (gdbarch))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
offsets = (const struct ppc_reg_offsets *) regset->regmap;
|
offsets = (const struct ppc_reg_offsets *) regset->regmap;
|
||||||
if (regnum == -1)
|
if (regnum == -1)
|
||||||
{
|
{
|
||||||
|
@ -611,7 +611,7 @@ ppc_collect_gregset (const struct regset *regset,
|
||||||
int regnum, void *gregs, size_t len)
|
int regnum, void *gregs, size_t len)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
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 ppc_reg_offsets *offsets
|
const struct ppc_reg_offsets *offsets
|
||||||
= (const struct ppc_reg_offsets *) regset->regmap;
|
= (const struct ppc_reg_offsets *) regset->regmap;
|
||||||
size_t offset;
|
size_t offset;
|
||||||
|
@ -668,7 +668,7 @@ ppc_collect_fpregset (const struct regset *regset,
|
||||||
if (!ppc_floating_point_unit_p (gdbarch))
|
if (!ppc_floating_point_unit_p (gdbarch))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
offsets = (const struct ppc_reg_offsets *) regset->regmap;
|
offsets = (const struct ppc_reg_offsets *) regset->regmap;
|
||||||
if (regnum == -1)
|
if (regnum == -1)
|
||||||
{
|
{
|
||||||
|
@ -746,7 +746,7 @@ static int
|
||||||
rs6000_in_function_epilogue_frame_p (struct frame_info *curfrm,
|
rs6000_in_function_epilogue_frame_p (struct frame_info *curfrm,
|
||||||
struct gdbarch *gdbarch, CORE_ADDR pc)
|
struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||||
{
|
{
|
||||||
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
bfd_byte insn_buf[PPC_INSN_SIZE];
|
bfd_byte insn_buf[PPC_INSN_SIZE];
|
||||||
CORE_ADDR scan_pc, func_start, func_end, epilogue_start, epilogue_end;
|
CORE_ADDR scan_pc, func_start, func_end, epilogue_start, epilogue_end;
|
||||||
|
@ -1042,7 +1042,7 @@ ppc_displaced_step_fixup (struct gdbarch *gdbarch,
|
||||||
if (insn & 0x1)
|
if (insn & 0x1)
|
||||||
{
|
{
|
||||||
/* Link register needs to be set to the next instruction's PC. */
|
/* Link register needs to be set to the next instruction's PC. */
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
regcache_cooked_write_unsigned (regs,
|
regcache_cooked_write_unsigned (regs,
|
||||||
tdep->ppc_lr_regnum,
|
tdep->ppc_lr_regnum,
|
||||||
from + PPC_INSN_SIZE);
|
from + PPC_INSN_SIZE);
|
||||||
|
@ -1590,7 +1590,7 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||||
int num_skip_non_prologue_insns = 0;
|
int num_skip_non_prologue_insns = 0;
|
||||||
int r0_contains_arg = 0;
|
int r0_contains_arg = 0;
|
||||||
const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (gdbarch);
|
const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (gdbarch);
|
||||||
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
|
|
||||||
memset (fdata, 0, sizeof (struct rs6000_framedata));
|
memset (fdata, 0, sizeof (struct rs6000_framedata));
|
||||||
|
@ -2310,7 +2310,7 @@ static CORE_ADDR
|
||||||
rs6000_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
|
rs6000_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
unsigned int ii, op;
|
unsigned int ii, op;
|
||||||
int rel;
|
int rel;
|
||||||
|
@ -2368,7 +2368,7 @@ rs6000_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
|
||||||
static struct type *
|
static struct type *
|
||||||
rs6000_builtin_type_vec64 (struct gdbarch *gdbarch)
|
rs6000_builtin_type_vec64 (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->ppc_builtin_type_vec64)
|
if (!tdep->ppc_builtin_type_vec64)
|
||||||
{
|
{
|
||||||
|
@ -2413,7 +2413,7 @@ rs6000_builtin_type_vec64 (struct gdbarch *gdbarch)
|
||||||
static struct type *
|
static struct type *
|
||||||
rs6000_builtin_type_vec128 (struct gdbarch *gdbarch)
|
rs6000_builtin_type_vec128 (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->ppc_builtin_type_vec128)
|
if (!tdep->ppc_builtin_type_vec128)
|
||||||
{
|
{
|
||||||
|
@ -2467,7 +2467,7 @@ rs6000_builtin_type_vec128 (struct gdbarch *gdbarch)
|
||||||
static const char *
|
static const char *
|
||||||
rs6000_register_name (struct gdbarch *gdbarch, int regno)
|
rs6000_register_name (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);
|
||||||
|
|
||||||
/* The upper half "registers" have names in the XML description,
|
/* The upper half "registers" have names in the XML description,
|
||||||
but we present only the low GPRs and the full 64-bit registers
|
but we present only the low GPRs and the full 64-bit registers
|
||||||
|
@ -2605,7 +2605,7 @@ rs6000_register_name (struct gdbarch *gdbarch, int regno)
|
||||||
static struct type *
|
static struct type *
|
||||||
rs6000_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
|
rs6000_pseudo_register_type (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);
|
||||||
|
|
||||||
/* These are the e500 pseudo-registers. */
|
/* These are the e500 pseudo-registers. */
|
||||||
if (IS_SPE_PSEUDOREG (tdep, regnum))
|
if (IS_SPE_PSEUDOREG (tdep, regnum))
|
||||||
|
@ -2644,7 +2644,7 @@ static int
|
||||||
rs6000_pseudo_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
rs6000_pseudo_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
||||||
const struct reggroup *group)
|
const struct reggroup *group)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
if (IS_V_ALIAS_PSEUDOREG (tdep, regnum))
|
if (IS_V_ALIAS_PSEUDOREG (tdep, regnum))
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2659,7 +2659,7 @@ static int
|
||||||
rs6000_convert_register_p (struct gdbarch *gdbarch, int regnum,
|
rs6000_convert_register_p (struct gdbarch *gdbarch, int regnum,
|
||||||
struct type *type)
|
struct type *type)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
return (tdep->ppc_fp0_regnum >= 0
|
return (tdep->ppc_fp0_regnum >= 0
|
||||||
&& regnum >= tdep->ppc_fp0_regnum
|
&& regnum >= tdep->ppc_fp0_regnum
|
||||||
|
@ -2744,7 +2744,7 @@ e500_move_ev_register (move_ev_register_func move,
|
||||||
struct regcache *regcache, int ev_reg, void *buffer)
|
struct regcache *regcache, int ev_reg, void *buffer)
|
||||||
{
|
{
|
||||||
struct gdbarch *arch = regcache->arch ();
|
struct gdbarch *arch = regcache->arch ();
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (arch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (arch);
|
||||||
int reg_index;
|
int reg_index;
|
||||||
gdb_byte *byte_buffer = (gdb_byte *) buffer;
|
gdb_byte *byte_buffer = (gdb_byte *) buffer;
|
||||||
enum register_status status;
|
enum register_status status;
|
||||||
|
@ -2785,7 +2785,7 @@ e500_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache,
|
||||||
int ev_reg, gdb_byte *buffer)
|
int ev_reg, gdb_byte *buffer)
|
||||||
{
|
{
|
||||||
struct gdbarch *arch = regcache->arch ();
|
struct gdbarch *arch = regcache->arch ();
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int reg_index;
|
int reg_index;
|
||||||
enum register_status status;
|
enum register_status status;
|
||||||
|
|
||||||
|
@ -2826,7 +2826,7 @@ static enum register_status
|
||||||
dfp_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache,
|
dfp_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache,
|
||||||
int reg_nr, gdb_byte *buffer)
|
int reg_nr, gdb_byte *buffer)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int reg_index, fp0;
|
int reg_index, fp0;
|
||||||
enum register_status status;
|
enum register_status status;
|
||||||
|
|
||||||
|
@ -2866,7 +2866,7 @@ static void
|
||||||
dfp_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
dfp_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
int reg_nr, const gdb_byte *buffer)
|
int reg_nr, const gdb_byte *buffer)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int reg_index, fp0;
|
int reg_index, fp0;
|
||||||
|
|
||||||
if (IS_DFP_PSEUDOREG (tdep, reg_nr))
|
if (IS_DFP_PSEUDOREG (tdep, reg_nr))
|
||||||
|
@ -2903,7 +2903,7 @@ v_alias_pseudo_register_read (struct gdbarch *gdbarch,
|
||||||
readable_regcache *regcache, int reg_nr,
|
readable_regcache *regcache, int reg_nr,
|
||||||
gdb_byte *buffer)
|
gdb_byte *buffer)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
gdb_assert (IS_V_ALIAS_PSEUDOREG (tdep, reg_nr));
|
gdb_assert (IS_V_ALIAS_PSEUDOREG (tdep, reg_nr));
|
||||||
|
|
||||||
return regcache->raw_read (tdep->ppc_vr0_regnum
|
return regcache->raw_read (tdep->ppc_vr0_regnum
|
||||||
|
@ -2918,7 +2918,7 @@ v_alias_pseudo_register_write (struct gdbarch *gdbarch,
|
||||||
struct regcache *regcache,
|
struct regcache *regcache,
|
||||||
int reg_nr, const gdb_byte *buffer)
|
int reg_nr, const gdb_byte *buffer)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
gdb_assert (IS_V_ALIAS_PSEUDOREG (tdep, reg_nr));
|
gdb_assert (IS_V_ALIAS_PSEUDOREG (tdep, reg_nr));
|
||||||
|
|
||||||
regcache->raw_write (tdep->ppc_vr0_regnum
|
regcache->raw_write (tdep->ppc_vr0_regnum
|
||||||
|
@ -2930,7 +2930,7 @@ static enum register_status
|
||||||
vsx_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache,
|
vsx_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache,
|
||||||
int reg_nr, gdb_byte *buffer)
|
int reg_nr, gdb_byte *buffer)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int reg_index, vr0, fp0, vsr0_upper;
|
int reg_index, vr0, fp0, vsr0_upper;
|
||||||
enum register_status status;
|
enum register_status status;
|
||||||
|
|
||||||
|
@ -2978,7 +2978,7 @@ static void
|
||||||
vsx_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
vsx_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
int reg_nr, const gdb_byte *buffer)
|
int reg_nr, const gdb_byte *buffer)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int reg_index, vr0, fp0, vsr0_upper;
|
int reg_index, vr0, fp0, vsr0_upper;
|
||||||
|
|
||||||
if (IS_VSX_PSEUDOREG (tdep, reg_nr))
|
if (IS_VSX_PSEUDOREG (tdep, reg_nr))
|
||||||
|
@ -3020,7 +3020,7 @@ static enum register_status
|
||||||
efp_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache,
|
efp_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache,
|
||||||
int reg_nr, gdb_byte *buffer)
|
int reg_nr, gdb_byte *buffer)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int reg_index, vr0;
|
int reg_index, vr0;
|
||||||
|
|
||||||
if (IS_EFP_PSEUDOREG (tdep, reg_nr))
|
if (IS_EFP_PSEUDOREG (tdep, reg_nr))
|
||||||
|
@ -3049,7 +3049,7 @@ static void
|
||||||
efp_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
efp_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
int reg_nr, const gdb_byte *buffer)
|
int reg_nr, const gdb_byte *buffer)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int reg_index, vr0;
|
int reg_index, vr0;
|
||||||
int offset = gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG ? 0 : 8;
|
int offset = gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG ? 0 : 8;
|
||||||
|
|
||||||
|
@ -3085,7 +3085,7 @@ rs6000_pseudo_register_read (struct gdbarch *gdbarch,
|
||||||
int reg_nr, gdb_byte *buffer)
|
int reg_nr, gdb_byte *buffer)
|
||||||
{
|
{
|
||||||
struct gdbarch *regcache_arch = regcache->arch ();
|
struct gdbarch *regcache_arch = regcache->arch ();
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
gdb_assert (regcache_arch == gdbarch);
|
gdb_assert (regcache_arch == gdbarch);
|
||||||
|
|
||||||
|
@ -3116,7 +3116,7 @@ rs6000_pseudo_register_write (struct gdbarch *gdbarch,
|
||||||
int reg_nr, const gdb_byte *buffer)
|
int reg_nr, const gdb_byte *buffer)
|
||||||
{
|
{
|
||||||
struct gdbarch *regcache_arch = regcache->arch ();
|
struct gdbarch *regcache_arch = regcache->arch ();
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
gdb_assert (regcache_arch == gdbarch);
|
gdb_assert (regcache_arch == gdbarch);
|
||||||
|
|
||||||
|
@ -3147,7 +3147,7 @@ static void
|
||||||
dfp_ax_pseudo_register_collect (struct gdbarch *gdbarch,
|
dfp_ax_pseudo_register_collect (struct gdbarch *gdbarch,
|
||||||
struct agent_expr *ax, int reg_nr)
|
struct agent_expr *ax, int reg_nr)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int reg_index, fp0;
|
int reg_index, fp0;
|
||||||
|
|
||||||
if (IS_DFP_PSEUDOREG (tdep, reg_nr))
|
if (IS_DFP_PSEUDOREG (tdep, reg_nr))
|
||||||
|
@ -3174,7 +3174,7 @@ static void
|
||||||
v_alias_pseudo_register_collect (struct gdbarch *gdbarch,
|
v_alias_pseudo_register_collect (struct gdbarch *gdbarch,
|
||||||
struct agent_expr *ax, int reg_nr)
|
struct agent_expr *ax, int reg_nr)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
gdb_assert (IS_V_ALIAS_PSEUDOREG (tdep, reg_nr));
|
gdb_assert (IS_V_ALIAS_PSEUDOREG (tdep, reg_nr));
|
||||||
|
|
||||||
ax_reg_mask (ax, tdep->ppc_vr0_regnum
|
ax_reg_mask (ax, tdep->ppc_vr0_regnum
|
||||||
|
@ -3188,7 +3188,7 @@ static void
|
||||||
vsx_ax_pseudo_register_collect (struct gdbarch *gdbarch,
|
vsx_ax_pseudo_register_collect (struct gdbarch *gdbarch,
|
||||||
struct agent_expr *ax, int reg_nr)
|
struct agent_expr *ax, int reg_nr)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int reg_index, vr0, fp0, vsr0_upper;
|
int reg_index, vr0, fp0, vsr0_upper;
|
||||||
|
|
||||||
if (IS_VSX_PSEUDOREG (tdep, reg_nr))
|
if (IS_VSX_PSEUDOREG (tdep, reg_nr))
|
||||||
|
@ -3226,7 +3226,7 @@ static void
|
||||||
efp_ax_pseudo_register_collect (struct gdbarch *gdbarch,
|
efp_ax_pseudo_register_collect (struct gdbarch *gdbarch,
|
||||||
struct agent_expr *ax, int reg_nr)
|
struct agent_expr *ax, int reg_nr)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int reg_index, vr0;
|
int reg_index, vr0;
|
||||||
|
|
||||||
if (IS_EFP_PSEUDOREG (tdep, reg_nr))
|
if (IS_EFP_PSEUDOREG (tdep, reg_nr))
|
||||||
|
@ -3249,7 +3249,7 @@ static int
|
||||||
rs6000_ax_pseudo_register_collect (struct gdbarch *gdbarch,
|
rs6000_ax_pseudo_register_collect (struct gdbarch *gdbarch,
|
||||||
struct agent_expr *ax, int reg_nr)
|
struct agent_expr *ax, int reg_nr)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
if (IS_SPE_PSEUDOREG (tdep, reg_nr))
|
if (IS_SPE_PSEUDOREG (tdep, reg_nr))
|
||||||
{
|
{
|
||||||
int reg_index = reg_nr - tdep->ppc_ev0_regnum;
|
int reg_index = reg_nr - tdep->ppc_ev0_regnum;
|
||||||
|
@ -3289,7 +3289,7 @@ rs6000_gen_return_address (struct gdbarch *gdbarch,
|
||||||
struct agent_expr *ax, struct axs_value *value,
|
struct agent_expr *ax, struct axs_value *value,
|
||||||
CORE_ADDR scope)
|
CORE_ADDR scope)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
value->type = register_type (gdbarch, tdep->ppc_lr_regnum);
|
value->type = register_type (gdbarch, tdep->ppc_lr_regnum);
|
||||||
value->kind = axs_lvalue_register;
|
value->kind = axs_lvalue_register;
|
||||||
value->u.reg = tdep->ppc_lr_regnum;
|
value->u.reg = tdep->ppc_lr_regnum;
|
||||||
|
@ -3300,7 +3300,7 @@ rs6000_gen_return_address (struct gdbarch *gdbarch,
|
||||||
static int
|
static int
|
||||||
rs6000_stab_reg_to_regnum (struct gdbarch *gdbarch, int num)
|
rs6000_stab_reg_to_regnum (struct gdbarch *gdbarch, int num)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
if (0 <= num && num <= 31)
|
if (0 <= num && num <= 31)
|
||||||
return tdep->ppc_gp0_regnum + num;
|
return tdep->ppc_gp0_regnum + num;
|
||||||
|
@ -3342,7 +3342,7 @@ rs6000_stab_reg_to_regnum (struct gdbarch *gdbarch, int num)
|
||||||
static int
|
static int
|
||||||
rs6000_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int num)
|
rs6000_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int num)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
if (0 <= num && num <= 31)
|
if (0 <= num && num <= 31)
|
||||||
return tdep->ppc_gp0_regnum + num;
|
return tdep->ppc_gp0_regnum + num;
|
||||||
|
@ -3561,7 +3561,7 @@ rs6000_frame_cache (struct frame_info *this_frame, void **this_cache)
|
||||||
{
|
{
|
||||||
struct rs6000_frame_cache *cache;
|
struct rs6000_frame_cache *cache;
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
struct rs6000_framedata fdata;
|
struct rs6000_framedata fdata;
|
||||||
int wordsize = tdep->wordsize;
|
int wordsize = tdep->wordsize;
|
||||||
|
@ -3797,7 +3797,7 @@ rs6000_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache)
|
||||||
{
|
{
|
||||||
struct rs6000_frame_cache *cache;
|
struct rs6000_frame_cache *cache;
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
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);
|
||||||
|
|
||||||
if (*this_cache)
|
if (*this_cache)
|
||||||
return (struct rs6000_frame_cache *) *this_cache;
|
return (struct rs6000_frame_cache *) *this_cache;
|
||||||
|
@ -3918,7 +3918,7 @@ ppc_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
|
||||||
struct dwarf2_frame_state_reg *reg,
|
struct dwarf2_frame_state_reg *reg,
|
||||||
struct frame_info *this_frame)
|
struct frame_info *this_frame)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
/* PPC32 and PPC64 ABI's are the same regarding volatile and
|
/* PPC32 and PPC64 ABI's are the same regarding volatile and
|
||||||
non-volatile registers. We will use the same code for both. */
|
non-volatile registers. We will use the same code for both. */
|
||||||
|
@ -4229,7 +4229,7 @@ static int
|
||||||
ppc_process_record_op4 (struct gdbarch *gdbarch, struct regcache *regcache,
|
ppc_process_record_op4 (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
CORE_ADDR addr, uint32_t insn)
|
CORE_ADDR addr, uint32_t insn)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int ext = PPC_FIELD (insn, 21, 11);
|
int ext = PPC_FIELD (insn, 21, 11);
|
||||||
int vra = PPC_FIELD (insn, 11, 5);
|
int vra = PPC_FIELD (insn, 11, 5);
|
||||||
|
|
||||||
|
@ -4771,7 +4771,7 @@ static int
|
||||||
ppc_process_record_op6 (struct gdbarch *gdbarch, struct regcache *regcache,
|
ppc_process_record_op6 (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
CORE_ADDR addr, uint32_t insn)
|
CORE_ADDR addr, uint32_t insn)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int subtype = PPC_FIELD (insn, 28, 4);
|
int subtype = PPC_FIELD (insn, 28, 4);
|
||||||
CORE_ADDR ea = 0;
|
CORE_ADDR ea = 0;
|
||||||
|
|
||||||
|
@ -4799,7 +4799,7 @@ static int
|
||||||
ppc_process_record_op19 (struct gdbarch *gdbarch, struct regcache *regcache,
|
ppc_process_record_op19 (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
CORE_ADDR addr, uint32_t insn)
|
CORE_ADDR addr, uint32_t insn)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int ext = PPC_EXTOP (insn);
|
int ext = PPC_EXTOP (insn);
|
||||||
|
|
||||||
switch (ext & 0x01f)
|
switch (ext & 0x01f)
|
||||||
|
@ -4855,7 +4855,7 @@ ppc_process_record_op31_177 (struct gdbarch *gdbarch,
|
||||||
{
|
{
|
||||||
int RA_opcode = PPC_RA(insn);
|
int RA_opcode = PPC_RA(insn);
|
||||||
int as = PPC_FIELD (insn, 6, 3);
|
int as = PPC_FIELD (insn, 6, 3);
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
switch (RA_opcode)
|
switch (RA_opcode)
|
||||||
{
|
{
|
||||||
|
@ -4875,7 +4875,7 @@ static int
|
||||||
ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache,
|
ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
CORE_ADDR addr, uint32_t insn)
|
CORE_ADDR addr, uint32_t insn)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int ext = PPC_EXTOP (insn);
|
int ext = PPC_EXTOP (insn);
|
||||||
int tmp, nr, nb = 0, i;
|
int tmp, nr, nb = 0, i;
|
||||||
CORE_ADDR at_dcsz, ea = 0;
|
CORE_ADDR at_dcsz, ea = 0;
|
||||||
|
@ -5536,7 +5536,7 @@ static int
|
||||||
ppc_process_record_op59 (struct gdbarch *gdbarch, struct regcache *regcache,
|
ppc_process_record_op59 (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
CORE_ADDR addr, uint32_t insn)
|
CORE_ADDR addr, uint32_t insn)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int ext = PPC_EXTOP (insn);
|
int ext = PPC_EXTOP (insn);
|
||||||
int at = PPC_FIELD (insn, 6, 3);
|
int at = PPC_FIELD (insn, 6, 3);
|
||||||
|
|
||||||
|
@ -5701,7 +5701,7 @@ ppc_process_record_op60_XX2 (struct gdbarch *gdbarch,
|
||||||
struct regcache *regcache,
|
struct regcache *regcache,
|
||||||
CORE_ADDR addr, uint32_t insn)
|
CORE_ADDR addr, uint32_t insn)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int RA_opcode = PPC_RA(insn);
|
int RA_opcode = PPC_RA(insn);
|
||||||
|
|
||||||
switch (RA_opcode)
|
switch (RA_opcode)
|
||||||
|
@ -5742,7 +5742,7 @@ static int
|
||||||
ppc_process_record_op60 (struct gdbarch *gdbarch, struct regcache *regcache,
|
ppc_process_record_op60 (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
CORE_ADDR addr, uint32_t insn)
|
CORE_ADDR addr, uint32_t insn)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int ext = PPC_EXTOP (insn);
|
int ext = PPC_EXTOP (insn);
|
||||||
|
|
||||||
switch (ext >> 2)
|
switch (ext >> 2)
|
||||||
|
@ -6097,7 +6097,7 @@ static int
|
||||||
ppc_process_record_op61 (struct gdbarch *gdbarch, struct regcache *regcache,
|
ppc_process_record_op61 (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
CORE_ADDR addr, uint32_t insn)
|
CORE_ADDR addr, uint32_t insn)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
ULONGEST ea = 0;
|
ULONGEST ea = 0;
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
|
@ -6156,7 +6156,7 @@ static int
|
||||||
ppc_process_record_op63 (struct gdbarch *gdbarch, struct regcache *regcache,
|
ppc_process_record_op63 (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
CORE_ADDR addr, uint32_t insn)
|
CORE_ADDR addr, uint32_t insn)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int ext = PPC_EXTOP (insn);
|
int ext = PPC_EXTOP (insn);
|
||||||
int tmp;
|
int tmp;
|
||||||
|
|
||||||
|
@ -6453,7 +6453,7 @@ ppc_process_record_prefix_op42 (struct gdbarch *gdbarch,
|
||||||
struct regcache *regcache,
|
struct regcache *regcache,
|
||||||
uint32_t insn_prefix, uint32_t insn_suffix)
|
uint32_t insn_prefix, uint32_t insn_suffix)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int type = PPC_FIELD (insn_prefix, 6, 2);
|
int type = PPC_FIELD (insn_prefix, 6, 2);
|
||||||
int ST1 = PPC_FIELD (insn_prefix, 8, 1);
|
int ST1 = PPC_FIELD (insn_prefix, 8, 1);
|
||||||
|
|
||||||
|
@ -6489,7 +6489,7 @@ ppc_process_record_prefix_op59_XX3 (struct gdbarch *gdbarch,
|
||||||
int type = PPC_FIELD (insn_prefix, 6, 2);
|
int type = PPC_FIELD (insn_prefix, 6, 2);
|
||||||
int ST4 = PPC_FIELD (insn_prefix, 8, 4);
|
int ST4 = PPC_FIELD (insn_prefix, 8, 4);
|
||||||
int at = PPC_FIELD (insn_suffix, 6, 3);
|
int at = PPC_FIELD (insn_suffix, 6, 3);
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
if (type == 3)
|
if (type == 3)
|
||||||
{
|
{
|
||||||
|
@ -6603,7 +6603,7 @@ ppc_process_record_prefix_store (struct gdbarch *gdbarch,
|
||||||
CORE_ADDR addr, uint32_t insn_prefix,
|
CORE_ADDR addr, uint32_t insn_prefix,
|
||||||
uint32_t insn_suffix)
|
uint32_t insn_suffix)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
ULONGEST iaddr = 0;
|
ULONGEST iaddr = 0;
|
||||||
int size;
|
int size;
|
||||||
int R = PPC_BIT (insn_prefix, 11);
|
int R = PPC_BIT (insn_prefix, 11);
|
||||||
|
@ -6659,7 +6659,7 @@ ppc_process_record_prefix_op32 (struct gdbarch *gdbarch,
|
||||||
int type = PPC_FIELD (insn_prefix, 6, 2);
|
int type = PPC_FIELD (insn_prefix, 6, 2);
|
||||||
int ST1 = PPC_FIELD (insn_prefix, 8, 1);
|
int ST1 = PPC_FIELD (insn_prefix, 8, 1);
|
||||||
int ST4 = PPC_FIELD (insn_prefix, 8, 4);
|
int ST4 = PPC_FIELD (insn_prefix, 8, 4);
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
if (type == 1)
|
if (type == 1)
|
||||||
{
|
{
|
||||||
|
@ -6713,7 +6713,7 @@ ppc_process_record_prefix_op33 (struct gdbarch *gdbarch,
|
||||||
{
|
{
|
||||||
int type = PPC_FIELD (insn_prefix, 6, 2);
|
int type = PPC_FIELD (insn_prefix, 6, 2);
|
||||||
int ST4 = PPC_FIELD (insn_prefix, 8, 4);
|
int ST4 = PPC_FIELD (insn_prefix, 8, 4);
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
if (type == 1)
|
if (type == 1)
|
||||||
{
|
{
|
||||||
|
@ -6751,7 +6751,7 @@ ppc_process_record_prefix_op34 (struct gdbarch *gdbarch,
|
||||||
int type = PPC_FIELD (insn_prefix, 6, 2);
|
int type = PPC_FIELD (insn_prefix, 6, 2);
|
||||||
int ST1 = PPC_FIELD (insn_prefix, 8, 1);
|
int ST1 = PPC_FIELD (insn_prefix, 8, 1);
|
||||||
int ST4 = PPC_FIELD (insn_prefix, 8, 4);
|
int ST4 = PPC_FIELD (insn_prefix, 8, 4);
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
if (type == 1)
|
if (type == 1)
|
||||||
{
|
{
|
||||||
|
@ -6797,7 +6797,7 @@ ppc_process_record_prefix_store_vsx_ds_form (struct gdbarch *gdbarch,
|
||||||
uint32_t insn_prefix,
|
uint32_t insn_prefix,
|
||||||
uint32_t insn_suffix)
|
uint32_t insn_suffix)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
ULONGEST ea = 0;
|
ULONGEST ea = 0;
|
||||||
int size;
|
int size;
|
||||||
int R = PPC_BIT (insn_prefix, 11);
|
int R = PPC_BIT (insn_prefix, 11);
|
||||||
|
@ -6850,7 +6850,7 @@ ppc_process_record_prefix_vsx_d_form (struct gdbarch *gdbarch,
|
||||||
uint32_t insn_prefix,
|
uint32_t insn_prefix,
|
||||||
uint32_t insn_suffix)
|
uint32_t insn_suffix)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
ULONGEST ea = 0;
|
ULONGEST ea = 0;
|
||||||
int size;
|
int size;
|
||||||
int R = PPC_BIT (insn_prefix, 11);
|
int R = PPC_BIT (insn_prefix, 11);
|
||||||
|
@ -6907,7 +6907,7 @@ ppc_process_prefix_instruction (int insn_prefix, int insn_suffix,
|
||||||
{
|
{
|
||||||
int type = PPC_FIELD (insn_prefix, 6, 2);
|
int type = PPC_FIELD (insn_prefix, 6, 2);
|
||||||
int ST1 = PPC_FIELD (insn_prefix, 8, 1);
|
int ST1 = PPC_FIELD (insn_prefix, 8, 1);
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
int op6;
|
int op6;
|
||||||
|
|
||||||
/* D-form has uses a 5-bit opcode in the instruction suffix */
|
/* D-form has uses a 5-bit opcode in the instruction suffix */
|
||||||
|
@ -7086,7 +7086,7 @@ int
|
||||||
ppc_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
|
ppc_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
CORE_ADDR addr)
|
CORE_ADDR 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);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
uint32_t insn, insn_suffix;
|
uint32_t insn, insn_suffix;
|
||||||
int op6, tmp, i;
|
int op6, tmp, i;
|
||||||
|
@ -8150,7 +8150,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||||
meaningful, because 64-bit CPUs can run in 32-bit mode. So, perform
|
meaningful, because 64-bit CPUs can run in 32-bit mode. So, perform
|
||||||
separate word size check. */
|
separate word size check. */
|
||||||
ppc_gdbarch_tdep *tdep
|
ppc_gdbarch_tdep *tdep
|
||||||
= (ppc_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
= gdbarch_tdep<ppc_gdbarch_tdep> (arches->gdbarch);
|
||||||
if (tdep && tdep->elf_abi != elf_abi)
|
if (tdep && tdep->elf_abi != elf_abi)
|
||||||
continue;
|
continue;
|
||||||
if (tdep && tdep->soft_float != soft_float)
|
if (tdep && tdep->soft_float != soft_float)
|
||||||
|
@ -8452,7 +8452,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||||
static void
|
static void
|
||||||
rs6000_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
rs6000_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
|
||||||
{
|
{
|
||||||
ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
if (tdep == NULL)
|
if (tdep == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -964,7 +964,7 @@ rx_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||||
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||||
{
|
{
|
||||||
rx_gdbarch_tdep *tdep
|
rx_gdbarch_tdep *tdep
|
||||||
= (rx_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
= gdbarch_tdep<rx_gdbarch_tdep> (arches->gdbarch);
|
||||||
|
|
||||||
if (tdep->elf_flags != elf_flags)
|
if (tdep->elf_flags != elf_flags)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -79,7 +79,7 @@ static void
|
||||||
s390_write_pc (struct regcache *regcache, CORE_ADDR pc)
|
s390_write_pc (struct regcache *regcache, CORE_ADDR pc)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
struct gdbarch *gdbarch = regcache->arch ();
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
regcache_cooked_write_unsigned (regcache, tdep->pc_regnum, pc);
|
regcache_cooked_write_unsigned (regcache, tdep->pc_regnum, pc);
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ s390_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
void *cb_data,
|
void *cb_data,
|
||||||
const struct regcache *regcache)
|
const struct regcache *regcache)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
const int gregset_size = (tdep->abi == ABI_LINUX_S390 ?
|
const int gregset_size = (tdep->abi == ABI_LINUX_S390 ?
|
||||||
s390_sizeof_gregset : s390x_sizeof_gregset);
|
s390_sizeof_gregset : s390x_sizeof_gregset);
|
||||||
|
|
||||||
|
@ -390,7 +390,7 @@ s390_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
|
||||||
void **this_prologue_cache)
|
void **this_prologue_cache)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
int word_size = gdbarch_ptr_bit (gdbarch) / 8;
|
int word_size = gdbarch_ptr_bit (gdbarch) / 8;
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
struct s390_sigtramp_unwind_cache *info;
|
struct s390_sigtramp_unwind_cache *info;
|
||||||
|
@ -561,7 +561,7 @@ s390_linux_get_syscall_number (struct gdbarch *gdbarch,
|
||||||
thread_info *thread)
|
thread_info *thread)
|
||||||
{
|
{
|
||||||
struct regcache *regs = get_thread_regcache (thread);
|
struct regcache *regs = get_thread_regcache (thread);
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
ULONGEST pc;
|
ULONGEST pc;
|
||||||
ULONGEST svc_number = -1;
|
ULONGEST svc_number = -1;
|
||||||
|
@ -594,7 +594,7 @@ static int
|
||||||
s390_all_but_pc_registers_record (struct regcache *regcache)
|
s390_all_but_pc_registers_record (struct regcache *regcache)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
struct gdbarch *gdbarch = regcache->arch ();
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
|
@ -804,7 +804,7 @@ static int
|
||||||
s390_linux_syscall_record (struct regcache *regcache, LONGEST syscall_native)
|
s390_linux_syscall_record (struct regcache *regcache, LONGEST syscall_native)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
struct gdbarch *gdbarch = regcache->arch ();
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
int ret;
|
int ret;
|
||||||
enum gdb_syscall syscall_gdb;
|
enum gdb_syscall syscall_gdb;
|
||||||
|
|
||||||
|
@ -855,7 +855,7 @@ static int
|
||||||
s390_linux_record_signal (struct gdbarch *gdbarch, struct regcache *regcache,
|
s390_linux_record_signal (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
enum gdb_signal signal)
|
enum gdb_signal signal)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
/* There are two kinds of signal frames on s390. rt_sigframe is always
|
/* There are two kinds of signal frames on s390. rt_sigframe is always
|
||||||
the larger one, so don't even bother with sigframe. */
|
the larger one, so don't even bother with sigframe. */
|
||||||
const int sizeof_rt_sigframe = (tdep->abi == ABI_LINUX_ZSERIES ?
|
const int sizeof_rt_sigframe = (tdep->abi == ABI_LINUX_ZSERIES ?
|
||||||
|
@ -1119,7 +1119,7 @@ s390_init_linux_record_tdep (struct linux_record_tdep *record_tdep,
|
||||||
static void
|
static void
|
||||||
s390_linux_init_abi_any (struct gdbarch_info info, struct gdbarch *gdbarch)
|
s390_linux_init_abi_any (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
tdep->s390_syscall_record = s390_linux_syscall_record;
|
tdep->s390_syscall_record = s390_linux_syscall_record;
|
||||||
|
|
||||||
|
@ -1154,7 +1154,7 @@ s390_linux_init_abi_any (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||||
static void
|
static void
|
||||||
s390_linux_init_abi_31 (struct gdbarch_info info, struct gdbarch *gdbarch)
|
s390_linux_init_abi_31 (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
tdep->abi = ABI_LINUX_S390;
|
tdep->abi = ABI_LINUX_S390;
|
||||||
|
|
||||||
|
@ -1170,7 +1170,7 @@ s390_linux_init_abi_31 (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||||
static void
|
static void
|
||||||
s390_linux_init_abi_64 (struct gdbarch_info info, struct gdbarch *gdbarch)
|
s390_linux_init_abi_64 (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
tdep->abi = ABI_LINUX_ZSERIES;
|
tdep->abi = ABI_LINUX_ZSERIES;
|
||||||
|
|
||||||
|
|
|
@ -1045,7 +1045,7 @@ s390_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||||
static int
|
static int
|
||||||
s390_register_call_saved (struct gdbarch *gdbarch, int regnum)
|
s390_register_call_saved (struct gdbarch *gdbarch, int regnum)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
switch (tdep->abi)
|
switch (tdep->abi)
|
||||||
{
|
{
|
||||||
|
@ -1076,7 +1076,7 @@ s390_guess_tracepoint_registers (struct gdbarch *gdbarch,
|
||||||
struct regcache *regcache,
|
struct regcache *regcache,
|
||||||
CORE_ADDR addr)
|
CORE_ADDR addr)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
int sz = register_size (gdbarch, S390_PSWA_REGNUM);
|
int sz = register_size (gdbarch, S390_PSWA_REGNUM);
|
||||||
gdb_byte *reg = (gdb_byte *) alloca (sz);
|
gdb_byte *reg = (gdb_byte *) alloca (sz);
|
||||||
ULONGEST pswm, pswa;
|
ULONGEST pswm, pswa;
|
||||||
|
@ -1172,7 +1172,7 @@ enum { s390_dwarf_reg_r0l = ARRAY_SIZE (s390_dwarf_regmap) - 16 };
|
||||||
static int
|
static int
|
||||||
s390_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
|
s390_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
int gdb_reg = -1;
|
int gdb_reg = -1;
|
||||||
|
|
||||||
/* In a 32-on-64 debug scenario, debug info refers to the full
|
/* In a 32-on-64 debug scenario, debug info refers to the full
|
||||||
|
@ -1231,7 +1231,7 @@ static struct value *
|
||||||
s390_value_from_register (struct gdbarch *gdbarch, struct type *type,
|
s390_value_from_register (struct gdbarch *gdbarch, struct type *type,
|
||||||
int regnum, struct frame_id frame_id)
|
int regnum, struct frame_id frame_id)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
struct value *value = default_value_from_register (gdbarch, type,
|
struct value *value = default_value_from_register (gdbarch, type,
|
||||||
regnum, frame_id);
|
regnum, frame_id);
|
||||||
check_typedef (type);
|
check_typedef (type);
|
||||||
|
@ -1250,7 +1250,7 @@ s390_value_from_register (struct gdbarch *gdbarch, struct type *type,
|
||||||
static const char *
|
static const char *
|
||||||
s390_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
|
s390_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
if (regnum == tdep->pc_regnum)
|
if (regnum == tdep->pc_regnum)
|
||||||
return "pc";
|
return "pc";
|
||||||
|
@ -1284,7 +1284,7 @@ s390_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
|
||||||
static struct type *
|
static struct type *
|
||||||
s390_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
|
s390_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
if (regnum == tdep->pc_regnum)
|
if (regnum == tdep->pc_regnum)
|
||||||
return builtin_type (gdbarch)->builtin_func_ptr;
|
return builtin_type (gdbarch)->builtin_func_ptr;
|
||||||
|
@ -1308,7 +1308,7 @@ static enum register_status
|
||||||
s390_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache,
|
s390_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache,
|
||||||
int regnum, gdb_byte *buf)
|
int regnum, gdb_byte *buf)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
int regsize = register_size (gdbarch, regnum);
|
int regsize = register_size (gdbarch, regnum);
|
||||||
ULONGEST val;
|
ULONGEST val;
|
||||||
|
@ -1383,7 +1383,7 @@ static void
|
||||||
s390_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
s390_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
int regnum, const gdb_byte *buf)
|
int regnum, const gdb_byte *buf)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
int regsize = register_size (gdbarch, regnum);
|
int regsize = register_size (gdbarch, regnum);
|
||||||
ULONGEST val, psw;
|
ULONGEST val, psw;
|
||||||
|
@ -1442,7 +1442,7 @@ static int
|
||||||
s390_pseudo_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
s390_pseudo_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
||||||
const struct reggroup *group)
|
const struct reggroup *group)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
/* We usually save/restore the whole PSW, which includes PC and CC.
|
/* We usually save/restore the whole PSW, which includes PC and CC.
|
||||||
However, some older gdbservers may not support saving/restoring
|
However, some older gdbservers may not support saving/restoring
|
||||||
|
@ -1470,7 +1470,7 @@ static int
|
||||||
s390_ax_pseudo_register_collect (struct gdbarch *gdbarch,
|
s390_ax_pseudo_register_collect (struct gdbarch *gdbarch,
|
||||||
struct agent_expr *ax, int regnum)
|
struct agent_expr *ax, int regnum)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
if (regnum == tdep->pc_regnum)
|
if (regnum == tdep->pc_regnum)
|
||||||
{
|
{
|
||||||
ax_reg_mask (ax, S390_PSWA_REGNUM);
|
ax_reg_mask (ax, S390_PSWA_REGNUM);
|
||||||
|
@ -1504,7 +1504,7 @@ static int
|
||||||
s390_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
|
s390_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
|
||||||
struct agent_expr *ax, int regnum)
|
struct agent_expr *ax, int regnum)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
if (regnum == tdep->pc_regnum)
|
if (regnum == tdep->pc_regnum)
|
||||||
{
|
{
|
||||||
ax_reg (ax, S390_PSWA_REGNUM);
|
ax_reg (ax, S390_PSWA_REGNUM);
|
||||||
|
@ -1905,7 +1905,7 @@ s390_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||||
function_call_return_method return_method,
|
function_call_return_method return_method,
|
||||||
CORE_ADDR struct_addr)
|
CORE_ADDR struct_addr)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
int word_size = gdbarch_ptr_bit (gdbarch) / 8;
|
int word_size = gdbarch_ptr_bit (gdbarch) / 8;
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
int i;
|
int i;
|
||||||
|
@ -2084,7 +2084,7 @@ s390_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||||
break;
|
break;
|
||||||
case TYPE_CODE_ARRAY:
|
case TYPE_CODE_ARRAY:
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
rvc = (tdep->vector_abi == S390_VECTOR_ABI_128
|
rvc = (tdep->vector_abi == S390_VECTOR_ABI_128
|
||||||
&& TYPE_LENGTH (type) <= 16 && type->is_vector ())
|
&& TYPE_LENGTH (type) <= 16 && type->is_vector ())
|
||||||
? RETURN_VALUE_REGISTER_CONVENTION
|
? RETURN_VALUE_REGISTER_CONVENTION
|
||||||
|
@ -2168,7 +2168,7 @@ s390_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
s390_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
|
s390_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
ULONGEST pc;
|
ULONGEST pc;
|
||||||
pc = frame_unwind_register_unsigned (next_frame, tdep->pc_regnum);
|
pc = frame_unwind_register_unsigned (next_frame, tdep->pc_regnum);
|
||||||
return gdbarch_addr_bits_remove (gdbarch, pc);
|
return gdbarch_addr_bits_remove (gdbarch, pc);
|
||||||
|
@ -2190,7 +2190,7 @@ static struct value *
|
||||||
s390_unwind_pseudo_register (struct frame_info *this_frame, int regnum)
|
s390_unwind_pseudo_register (struct frame_info *this_frame, int regnum)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
struct type *type = register_type (gdbarch, regnum);
|
struct type *type = register_type (gdbarch, regnum);
|
||||||
|
|
||||||
/* Unwind PC via PSW address. */
|
/* Unwind PC via PSW address. */
|
||||||
|
@ -2775,7 +2775,7 @@ static CORE_ADDR
|
||||||
s390_record_address_mask (struct gdbarch *gdbarch, struct regcache *regcache,
|
s390_record_address_mask (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
CORE_ADDR val)
|
CORE_ADDR val)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
ULONGEST pswm, pswa;
|
ULONGEST pswm, pswa;
|
||||||
int am;
|
int am;
|
||||||
if (tdep->abi == ABI_LINUX_S390)
|
if (tdep->abi == ABI_LINUX_S390)
|
||||||
|
@ -2842,7 +2842,7 @@ s390_record_calc_disp_vsce (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
uint8_t vx, uint8_t el, uint8_t es, uint16_t bd,
|
uint8_t vx, uint8_t el, uint8_t es, uint16_t bd,
|
||||||
int8_t dh, CORE_ADDR *res)
|
int8_t dh, CORE_ADDR *res)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
ULONGEST x;
|
ULONGEST x;
|
||||||
gdb_byte buf[16];
|
gdb_byte buf[16];
|
||||||
|
@ -2885,7 +2885,7 @@ static int s390_popcnt (unsigned int x) {
|
||||||
static int
|
static int
|
||||||
s390_record_gpr_g (struct gdbarch *gdbarch, struct regcache *regcache, int i)
|
s390_record_gpr_g (struct gdbarch *gdbarch, struct regcache *regcache, int i)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + i))
|
if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + i))
|
||||||
return -1;
|
return -1;
|
||||||
if (tdep->abi == ABI_LINUX_S390)
|
if (tdep->abi == ABI_LINUX_S390)
|
||||||
|
@ -2899,7 +2899,7 @@ s390_record_gpr_g (struct gdbarch *gdbarch, struct regcache *regcache, int i)
|
||||||
static int
|
static int
|
||||||
s390_record_gpr_h (struct gdbarch *gdbarch, struct regcache *regcache, int i)
|
s390_record_gpr_h (struct gdbarch *gdbarch, struct regcache *regcache, int i)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
if (tdep->abi == ABI_LINUX_S390)
|
if (tdep->abi == ABI_LINUX_S390)
|
||||||
{
|
{
|
||||||
if (record_full_arch_list_add_reg (regcache, S390_R0_UPPER_REGNUM + i))
|
if (record_full_arch_list_add_reg (regcache, S390_R0_UPPER_REGNUM + i))
|
||||||
|
@ -2939,7 +2939,7 @@ static int
|
||||||
s390_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
|
s390_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||||
CORE_ADDR addr)
|
CORE_ADDR addr)
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
|
||||||
uint16_t insn[3] = {0};
|
uint16_t insn[3] = {0};
|
||||||
/* Instruction as bytes. */
|
/* Instruction as bytes. */
|
||||||
uint8_t ibyte[6];
|
uint8_t ibyte[6];
|
||||||
|
@ -7178,7 +7178,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||||
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||||
{
|
{
|
||||||
s390_gdbarch_tdep *tmp
|
s390_gdbarch_tdep *tmp
|
||||||
= (s390_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
|
= gdbarch_tdep<s390_gdbarch_tdep> (arches->gdbarch);
|
||||||
|
|
||||||
if (!tmp)
|
if (!tmp)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -195,7 +195,7 @@ sh_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||||
set_gdbarch_fetch_tls_load_module_address (gdbarch,
|
set_gdbarch_fetch_tls_load_module_address (gdbarch,
|
||||||
svr4_fetch_objfile_link_map);
|
svr4_fetch_objfile_link_map);
|
||||||
|
|
||||||
sh_gdbarch_tdep *tdep = (sh_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
sh_gdbarch_tdep *tdep = gdbarch_tdep<sh_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
/* Remember regset characteristics. The sizes should match
|
/* Remember regset characteristics. The sizes should match
|
||||||
elf_gregset_t and elf_fpregset_t from Linux. */
|
elf_gregset_t and elf_fpregset_t from Linux. */
|
||||||
|
|
|
@ -63,7 +63,7 @@ static void
|
||||||
shnbsd_init_abi (struct gdbarch_info info,
|
shnbsd_init_abi (struct gdbarch_info info,
|
||||||
struct gdbarch *gdbarch)
|
struct gdbarch *gdbarch)
|
||||||
{
|
{
|
||||||
sh_gdbarch_tdep *tdep = (sh_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
sh_gdbarch_tdep *tdep = gdbarch_tdep<sh_gdbarch_tdep> (gdbarch);
|
||||||
nbsd_init_abi (info, gdbarch);
|
nbsd_init_abi (info, gdbarch);
|
||||||
|
|
||||||
tdep->core_gregmap = (struct sh_corefile_regmap *)regmap;
|
tdep->core_gregmap = (struct sh_corefile_regmap *)regmap;
|
||||||
|
|
|
@ -1554,7 +1554,7 @@ sh_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
||||||
static struct type *
|
static struct type *
|
||||||
sh_littlebyte_bigword_type (struct gdbarch *gdbarch)
|
sh_littlebyte_bigword_type (struct gdbarch *gdbarch)
|
||||||
{
|
{
|
||||||
sh_gdbarch_tdep *tdep = (sh_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
sh_gdbarch_tdep *tdep = gdbarch_tdep<sh_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
if (tdep->sh_littlebyte_bigword_type == NULL)
|
if (tdep->sh_littlebyte_bigword_type == NULL)
|
||||||
tdep->sh_littlebyte_bigword_type
|
tdep->sh_littlebyte_bigword_type
|
||||||
|
@ -2146,7 +2146,7 @@ sh_corefile_supply_regset (const struct regset *regset,
|
||||||
int regnum, const void *regs, size_t len)
|
int regnum, const void *regs, size_t len)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
struct gdbarch *gdbarch = regcache->arch ();
|
||||||
sh_gdbarch_tdep *tdep = (sh_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
sh_gdbarch_tdep *tdep = gdbarch_tdep<sh_gdbarch_tdep> (gdbarch);
|
||||||
const struct sh_corefile_regmap *regmap = (regset == &sh_corefile_gregset
|
const struct sh_corefile_regmap *regmap = (regset == &sh_corefile_gregset
|
||||||
? tdep->core_gregmap
|
? tdep->core_gregmap
|
||||||
: tdep->core_fpregmap);
|
: tdep->core_fpregmap);
|
||||||
|
@ -2172,7 +2172,7 @@ sh_corefile_collect_regset (const struct regset *regset,
|
||||||
int regnum, void *regs, size_t len)
|
int regnum, void *regs, size_t len)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
struct gdbarch *gdbarch = regcache->arch ();
|
||||||
sh_gdbarch_tdep *tdep = (sh_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
sh_gdbarch_tdep *tdep = gdbarch_tdep<sh_gdbarch_tdep> (gdbarch);
|
||||||
const struct sh_corefile_regmap *regmap = (regset == &sh_corefile_gregset
|
const struct sh_corefile_regmap *regmap = (regset == &sh_corefile_gregset
|
||||||
? tdep->core_gregmap
|
? tdep->core_gregmap
|
||||||
: tdep->core_fpregmap);
|
: tdep->core_fpregmap);
|
||||||
|
@ -2210,7 +2210,7 @@ sh_iterate_over_regset_sections (struct gdbarch *gdbarch,
|
||||||
void *cb_data,
|
void *cb_data,
|
||||||
const struct regcache *regcache)
|
const struct regcache *regcache)
|
||||||
{
|
{
|
||||||
sh_gdbarch_tdep *tdep = (sh_gdbarch_tdep *) gdbarch_tdep (gdbarch);
|
sh_gdbarch_tdep *tdep = gdbarch_tdep<sh_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
if (tdep->core_gregmap != NULL)
|
if (tdep->core_gregmap != NULL)
|
||||||
cb (".reg", tdep->sizeof_gregset, tdep->sizeof_gregset,
|
cb (".reg", tdep->sizeof_gregset, tdep->sizeof_gregset,
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue