#include "solib.h" /* Support for shared libraries. */
#include "solib-svr4.h" /* For struct link_map_offsets. */
#include "gdb_string.h"
+#include "dis-asm.h"
enum cris_num_regs
static struct gdbarch *cris_gdbarch_init (struct gdbarch_info,
struct gdbarch_list *);
-static int cris_delayed_get_disassembler (bfd_vma, disassemble_info *);
-
static void cris_dump_tdep (struct gdbarch *, struct ui_file *);
static void cris_version_update (char *ignore_args, int from_tty,
/* We only want to know the end of the prologue when fi->saved_regs == 0.
When the saved registers are allocated full information is required. */
- if (get_frame_saved_regs (fi))
+ if (deprecated_get_frame_saved_regs (fi))
{
for (regno = 0; regno < NUM_REGS; regno++)
- get_frame_saved_regs (fi)[regno] = 0;
+ deprecated_get_frame_saved_regs (fi)[regno] = 0;
}
/* Find the prologue instructions. */
/* We only want to know the end of the prologue when
fi->saved_regs == 0. */
- if (!get_frame_saved_regs (fi))
+ if (!deprecated_get_frame_saved_regs (fi))
return ip;
if (have_fp)
{
- get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM] = get_frame_base (fi);
+ deprecated_get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM] = get_frame_base (fi);
/* Calculate the addresses. */
for (regno = regsave; regno >= 0; regno--)
{
- get_frame_saved_regs (fi)[regno] = get_frame_base (fi) - val;
+ deprecated_get_frame_saved_regs (fi)[regno] = get_frame_base (fi) - val;
val -= 4;
}
if (get_frame_extra_info (fi)->leaf_function)
{
/* Set the register SP to contain the stack pointer of
the caller. */
- get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) + 4;
+ deprecated_get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) + 4;
}
else
{
/* Set the register SP to contain the stack pointer of
the caller. */
- get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) + 8;
+ deprecated_get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) + 8;
/* Set the register SRP to contain the return address of
the caller. */
- get_frame_saved_regs (fi)[SRP_REGNUM] = get_frame_base (fi) + 4;
+ deprecated_get_frame_saved_regs (fi)[SRP_REGNUM] = get_frame_base (fi) + 4;
}
}
return ip;
int len = TYPE_LENGTH (type);
if (len <= DEPRECATED_REGISTER_SIZE)
- deprecated_write_register_bytes (REGISTER_BYTE (RET_REGNUM), valbuf, len);
+ deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (RET_REGNUM), valbuf, len);
else
internal_error (__FILE__, __LINE__, "cris_abi_original_store_return_value: type length too large.");
}
if (len <= 2 * DEPRECATED_REGISTER_SIZE)
{
/* Note that this works since R10 and R11 are consecutive registers. */
- deprecated_write_register_bytes (REGISTER_BYTE (RET_REGNUM), valbuf,
- len);
+ deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (RET_REGNUM),
+ valbuf, len);
}
else
internal_error (__FILE__, __LINE__, "cris_abi_v2_store_return_value: type length too large.");
int len = TYPE_LENGTH (type);
if (len <= DEPRECATED_REGISTER_SIZE)
- memcpy (valbuf, regbuf + REGISTER_BYTE (RET_REGNUM), len);
+ memcpy (valbuf, regbuf + DEPRECATED_REGISTER_BYTE (RET_REGNUM), len);
else
internal_error (__FILE__, __LINE__, "cris_abi_original_extract_return_value: type length too large");
}
int len = TYPE_LENGTH (type);
if (len <= 2 * DEPRECATED_REGISTER_SIZE)
- memcpy (valbuf, regbuf + REGISTER_BYTE (RET_REGNUM), len);
+ memcpy (valbuf, regbuf + DEPRECATED_REGISTER_BYTE (RET_REGNUM), len);
else
internal_error (__FILE__, __LINE__, "cris_abi_v2_extract_return_value: type length too large");
}
get_frame_base (fi));
/* Examine the entire prologue. */
- register int frameless_p = 0;
+ int frameless_p = 0;
/* Has this frame's registers already been initialized? */
- if (get_frame_saved_regs (fi))
+ if (deprecated_get_frame_saved_regs (fi))
return;
frame_saved_regs_zalloc (fi);
/* I don't see this ever happening, considering the context in which
cris_frame_init_saved_regs is called (always when we're not in
a dummy frame). */
- memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
+ memcpy (deprecated_get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
}
else
{
/* Check fromleaf/frameless_function_invocation. (FIXME) */
- if (get_frame_saved_regs (fi)[SRP_REGNUM] != 0)
+ if (deprecated_get_frame_saved_regs (fi)[SRP_REGNUM] != 0)
{
/* SRP was saved on the stack; non-leaf function. */
get_frame_extra_info (fi)->return_pc =
- read_memory_integer (get_frame_saved_regs (fi)[SRP_REGNUM],
+ read_memory_integer (deprecated_get_frame_saved_regs (fi)[SRP_REGNUM],
REGISTER_RAW_SIZE (SRP_REGNUM));
}
else
{
return get_frame_base (fi);
}
- else if (!inside_entry_file (get_frame_pc (fi)))
+ else if (!deprecated_inside_entry_file (get_frame_pc (fi)))
{
return read_memory_unsigned_integer (get_frame_base (fi), 4);
}
static void
cris_pop_frame (void)
{
- register struct frame_info *fi = get_current_frame ();
- register int regno;
- register int stack_offset = 0;
+ struct frame_info *fi = get_current_frame ();
+ int regno;
+ int stack_offset = 0;
if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi),
get_frame_base (fi),
after SP was saved. */
for (regno = 0; regno < DEPRECATED_FP_REGNUM; regno++)
{
- if (get_frame_saved_regs (fi)[regno])
+ if (deprecated_get_frame_saved_regs (fi)[regno])
{
write_register (regno,
- read_memory_integer (get_frame_saved_regs (fi)[regno], 4));
+ read_memory_integer (deprecated_get_frame_saved_regs (fi)[regno], 4));
}
}
- if (get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM])
+ if (deprecated_get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM])
{
/* Pop the frame pointer (R8). It was pushed before SP
was saved. */
write_register (DEPRECATED_FP_REGNUM,
- read_memory_integer (get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM], 4));
+ read_memory_integer (deprecated_get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM], 4));
stack_offset += 4;
/* Not a leaf function. */
- if (get_frame_saved_regs (fi)[SRP_REGNUM])
+ if (deprecated_get_frame_saved_regs (fi)[SRP_REGNUM])
{
/* SRP was pushed before SP was saved. */
stack_offset += 4;
}
/* Restore the SP and adjust for R8 and (possibly) SRP. */
- write_register (SP_REGNUM, get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM] + stack_offset);
+ write_register (SP_REGNUM, deprecated_get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM] + stack_offset);
}
else
{
exec_bfd has been set. */
static int
-cris_delayed_get_disassembler (bfd_vma addr, disassemble_info *info)
+cris_delayed_get_disassembler (bfd_vma addr, struct disassemble_info *info)
{
- int (*print_insn) (bfd_vma addr, disassemble_info *info);
+ int (*print_insn) (bfd_vma addr, struct disassemble_info *info);
/* FIXME: cagney/2003-08-27: It should be possible to select a CRIS
disassembler, even when there is no BFD. Does something like
"gdb; target remote; disassmeble *0x123" work? */
/* NOTE: cagney/2002-12-06: This can be deleted when this arch is
ready to unwind the PC first (see frame.c:get_prev_frame()). */
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
+ set_gdbarch_deprecated_init_frame_pc (gdbarch, deprecated_init_frame_pc_default);
tdep->cris_version = cris_version;
tdep->cris_mode = cris_mode;
cris_abi_original_store_return_value);
set_gdbarch_deprecated_extract_return_value
(gdbarch, cris_abi_original_extract_return_value);
- set_gdbarch_reg_struct_has_addr
+ set_gdbarch_deprecated_reg_struct_has_addr
(gdbarch, cris_abi_original_reg_struct_has_addr);
}
else if (tdep->cris_abi == CRIS_ABI_V2)
set_gdbarch_deprecated_store_return_value (gdbarch, cris_abi_v2_store_return_value);
set_gdbarch_deprecated_extract_return_value
(gdbarch, cris_abi_v2_extract_return_value);
- set_gdbarch_reg_struct_has_addr (gdbarch,
- cris_abi_v2_reg_struct_has_addr);
+ set_gdbarch_deprecated_reg_struct_has_addr
+ (gdbarch, cris_abi_v2_reg_struct_has_addr);
}
else
internal_error (__FILE__, __LINE__, "cris_gdbarch_init: unknown CRIS ABI");
/* The length of the registers in the program's representation. */
set_gdbarch_deprecated_register_virtual_size (gdbarch, cris_register_size);
- /* The largest value REGISTER_VIRTUAL_SIZE can have. */
+ /* The largest value DEPRECATED_REGISTER_VIRTUAL_SIZE can have. */
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 32);
set_gdbarch_deprecated_register_virtual_type (gdbarch, cris_register_virtual_type);