/* Target-dependent code for the IA-64 for GDB, the GNU debugger.
- Copyright (C) 1999-2015 Free Software Foundation, Inc.
+ Copyright (C) 1999-2017 Free Software Foundation, Inc.
This file is part of GDB.
#define NUM_IA64_RAW_REGS 462
static int sp_regnum = IA64_GR12_REGNUM;
-static int fp_regnum = IA64_VFP_REGNUM;
-static int lr_regnum = IA64_VRAP_REGNUM;
/* NOTE: we treat the register stack registers r32-r127 as
pseudo-registers because they may not be accessible via the ptrace
/* Array of register names; There should be ia64_num_regs strings in
the initializer. */
-static char *ia64_register_names[] =
+static const char *ia64_register_names[] =
{ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
"r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
paddress (gdbarch, bp_tgt->placed_address));
replace_slotN_contents (bundle, IA64_BREAKPOINT, slotnum);
- bp_tgt->placed_size = bp_tgt->shadow_len;
-
val = target_write_memory (addr + shadow_slotnum, bundle + shadow_slotnum,
bp_tgt->shadow_len);
slotnum = 2;
}
- gdb_assert (bp_tgt->placed_size == BUNDLE_LEN - shadow_slotnum);
- gdb_assert (bp_tgt->placed_size == bp_tgt->shadow_len);
+ gdb_assert (bp_tgt->shadow_len == BUNDLE_LEN - shadow_slotnum);
instr_breakpoint = slotN_contents (bundle_mem, slotnum);
if (instr_breakpoint != IA64_BREAKPOINT)
return val;
}
+/* Implement the breakpoint_kind_from_pc gdbarch method. */
+
+static int
+ia64_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+{
+ /* A place holder of gdbarch method breakpoint_kind_from_pc. */
+ return 0;
+}
+
/* As gdbarch_breakpoint_from_pc ranges have byte granularity and ia64
instruction slots ranges are bit-granular (41 bits) we have to provide an
extended range as described for ia64_memory_insert_breakpoint. We also take
&& it == M && ((instr & 0x1ee0000003fLL) == 0x02c00000000LL))
{
/* alloc - start of a regular function. */
- int sor = (int) ((instr & 0x00078000000LL) >> 27);
int sol = (int) ((instr & 0x00007f00000LL) >> 20);
int sof = (int) ((instr & 0x000000fe000LL) >> 13);
int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct ia64_frame_cache *cache;
gdb_byte buf[8];
- CORE_ADDR cfm, psr;
+ CORE_ADDR cfm;
if (*this_cache)
return (struct ia64_frame_cache *) *this_cache;
cache->bsp = extract_unsigned_integer (buf, 8, byte_order);
get_frame_register (this_frame, IA64_PSR_REGNUM, buf);
- psr = extract_unsigned_integer (buf, 8, byte_order);
get_frame_register (this_frame, IA64_CFM_REGNUM, buf);
cfm = extract_unsigned_integer (buf, 8, byte_order);
{
int regnum = ia64_uw2gdb_regnum (uw_regnum);
unw_word_t bsp, sof, sol, cfm, psr, ip;
- struct frame_info *this_frame = arg;
+ struct frame_info *this_frame = (struct frame_info *) arg;
struct gdbarch *gdbarch = get_frame_arch (this_frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
long new_sof, old_sof;
unw_fpreg_t *val, int write, void *arg)
{
int regnum = ia64_uw2gdb_regnum (uw_regnum);
- struct frame_info *this_frame = arg;
+ struct frame_info *this_frame = (struct frame_info *) arg;
/* We never call any libunwind routines that need to write registers. */
gdb_assert (!write);
{
int regnum = ia64_uw2gdb_regnum (uw_regnum);
unw_word_t bsp, sof, sol, cfm, psr, ip;
- struct regcache *regcache = arg;
+ struct regcache *regcache = (struct regcache *) arg;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
long new_sof, old_sof;
unw_fpreg_t *val, int write, void *arg)
{
int regnum = ia64_uw2gdb_regnum (uw_regnum);
- struct regcache *regcache = arg;
+ struct regcache *regcache = (struct regcache *) arg;
/* We never call any libunwind routines that need to write registers. */
gdb_assert (!write);
int nslots, rseslots, memslots, slotnum, nfuncargs;
int floatreg;
ULONGEST bsp;
- CORE_ADDR funcdescaddr, pc, global_pointer;
+ CORE_ADDR funcdescaddr, global_pointer;
CORE_ADDR func_addr = find_function_addr (function, NULL);
nslots = 0;
set_gdbarch_memory_remove_breakpoint (gdbarch,
ia64_memory_remove_breakpoint);
set_gdbarch_breakpoint_from_pc (gdbarch, ia64_breakpoint_from_pc);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, ia64_breakpoint_kind_from_pc);
set_gdbarch_read_pc (gdbarch, ia64_read_pc);
set_gdbarch_write_pc (gdbarch, ia64_write_pc);