*/
+ int bits_big_endian;
int short_bit;
int int_bit;
int long_bit;
int fp0_regnum;
gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
- gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
gdbarch_register_name_ftype *register_name;
gdbarch_register_type_ftype *register_type;
- gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
+ gdbarch_dummy_id_ftype *dummy_id;
int deprecated_fp_regnum;
gdbarch_push_dummy_call_ftype *push_dummy_call;
int call_dummy_location;
gdbarch_integer_to_address_ftype *integer_to_address;
gdbarch_return_value_ftype *return_value;
gdbarch_skip_prologue_ftype *skip_prologue;
+ gdbarch_skip_main_prologue_ftype *skip_main_prologue;
gdbarch_inner_than_ftype *inner_than;
gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
gdbarch_register_reggroup_p_ftype *register_reggroup_p;
gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
gdbarch_regset_from_core_section_ftype *regset_from_core_section;
+ struct core_regset_section * core_regset_sections;
gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
int vtable_function_descriptors;
int vbit_in_delta;
gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
+ ULONGEST max_insn_length;
+ gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn;
+ gdbarch_displaced_step_fixup_ftype *displaced_step_fixup;
+ gdbarch_displaced_step_free_closure_ftype *displaced_step_free_closure;
+ gdbarch_displaced_step_location_ftype *displaced_step_location;
gdbarch_overlay_update_ftype *overlay_update;
gdbarch_core_read_description_ftype *core_read_description;
gdbarch_static_transform_name_ftype *static_transform_name;
int sofun_address_maybe_missing;
+ gdbarch_target_signal_from_host_ftype *target_signal_from_host;
+ gdbarch_target_signal_to_host_ftype *target_signal_to_host;
+ gdbarch_record_special_symbol_ftype *record_special_symbol;
};
/*per-architecture data-pointers and swap regions */
0, NULL, NULL,
/* Multi-arch values */
+ 1, /* bits_big_endian */
8 * sizeof (short), /* short_bit */
8 * sizeof (int), /* int_bit */
8 * sizeof (long), /* long_bit */
-1, /* pc_regnum */
-1, /* ps_regnum */
0, /* fp0_regnum */
- 0, /* stab_reg_to_regnum */
- 0, /* ecoff_reg_to_regnum */
- 0, /* dwarf_reg_to_regnum */
- 0, /* sdb_reg_to_regnum */
- 0, /* dwarf2_reg_to_regnum */
+ no_op_reg_to_regnum, /* stab_reg_to_regnum */
+ no_op_reg_to_regnum, /* ecoff_reg_to_regnum */
+ no_op_reg_to_regnum, /* sdb_reg_to_regnum */
+ no_op_reg_to_regnum, /* dwarf2_reg_to_regnum */
0, /* register_name */
0, /* register_type */
- 0, /* unwind_dummy_id */
+ 0, /* dummy_id */
-1, /* deprecated_fp_regnum */
0, /* push_dummy_call */
0, /* call_dummy_location */
default_print_registers_info, /* print_registers_info */
0, /* print_float_info */
0, /* print_vector_info */
- 0, /* register_sim_regno */
+ legacy_register_sim_regno, /* register_sim_regno */
cannot_register_not, /* cannot_fetch_register */
cannot_register_not, /* cannot_store_register */
0, /* get_longjmp_target */
0, /* integer_to_address */
0, /* return_value */
0, /* skip_prologue */
+ 0, /* skip_main_prologue */
0, /* inner_than */
0, /* breakpoint_from_pc */
0, /* adjust_breakpoint_address */
- 0, /* memory_insert_breakpoint */
- 0, /* memory_remove_breakpoint */
+ default_memory_insert_breakpoint, /* memory_insert_breakpoint */
+ default_memory_remove_breakpoint, /* memory_remove_breakpoint */
0, /* decr_pc_after_break */
0, /* deprecated_function_start_offset */
default_remote_register_number, /* remote_register_number */
default_register_reggroup_p, /* register_reggroup_p */
0, /* fetch_pointer_argument */
0, /* regset_from_core_section */
+ 0, /* core_regset_sections */
0, /* core_xfer_shared_libraries */
0, /* vtable_function_descriptors */
0, /* vbit_in_delta */
0, /* skip_permanent_breakpoint */
+ 0, /* max_insn_length */
+ 0, /* displaced_step_copy_insn */
+ 0, /* displaced_step_fixup */
+ NULL, /* displaced_step_free_closure */
+ NULL, /* displaced_step_location */
0, /* overlay_update */
0, /* core_read_description */
0, /* static_transform_name */
0, /* sofun_address_maybe_missing */
+ default_target_signal_from_host, /* target_signal_from_host */
+ default_target_signal_to_host, /* target_signal_to_host */
+ 0, /* record_special_symbol */
/* startup_gdbarch() */
};
gdbarch->target_desc = info->target_desc;
/* Force the explicit initialization of these. */
+ gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
gdbarch->short_bit = 2*TARGET_CHAR_BIT;
gdbarch->int_bit = 4*TARGET_CHAR_BIT;
gdbarch->long_bit = 4*TARGET_CHAR_BIT;
gdbarch->fp0_regnum = -1;
gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
- gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
gdbarch->deprecated_fp_regnum = -1;
gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
gdbarch->name_of_malloc = "malloc";
gdbarch->register_reggroup_p = default_register_reggroup_p;
+ gdbarch->displaced_step_fixup = NULL;
+ gdbarch->displaced_step_free_closure = NULL;
+ gdbarch->displaced_step_location = NULL;
+ gdbarch->target_signal_from_host = default_target_signal_from_host;
+ gdbarch->target_signal_to_host = default_target_signal_to_host;
/* gdbarch_alloc() */
return gdbarch;
if (gdbarch->bfd_arch_info == NULL)
fprintf_unfiltered (log, "\n\tbfd_arch_info");
/* Check those that need to be defined for the given multi-arch level. */
+ /* Skip verify of bits_big_endian, invalid_p == 0 */
/* Skip verify of short_bit, invalid_p == 0 */
/* Skip verify of int_bit, invalid_p == 0 */
/* Skip verify of long_bit, invalid_p == 0 */
/* Skip verify of fp0_regnum, invalid_p == 0 */
/* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
/* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
- /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
/* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
/* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
if (gdbarch->register_name == 0)
fprintf_unfiltered (log, "\n\tregister_name");
/* Skip verify of register_type, has predicate */
- /* Skip verify of unwind_dummy_id, has predicate */
+ /* Skip verify of dummy_id, has predicate */
/* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
/* Skip verify of push_dummy_call, has predicate */
/* Skip verify of call_dummy_location, invalid_p == 0 */
/* Skip verify of return_value, has predicate */
if (gdbarch->skip_prologue == 0)
fprintf_unfiltered (log, "\n\tskip_prologue");
+ /* Skip verify of skip_main_prologue, has predicate */
if (gdbarch->inner_than == 0)
fprintf_unfiltered (log, "\n\tinner_than");
if (gdbarch->breakpoint_from_pc == 0)
/* Skip verify of vtable_function_descriptors, invalid_p == 0 */
/* Skip verify of vbit_in_delta, invalid_p == 0 */
/* Skip verify of skip_permanent_breakpoint, has predicate */
+ /* Skip verify of max_insn_length, has predicate */
+ /* Skip verify of displaced_step_copy_insn, has predicate */
+ /* Skip verify of displaced_step_fixup, has predicate */
+ if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
+ fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
+ if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
+ fprintf_unfiltered (log, "\n\tdisplaced_step_location");
/* Skip verify of overlay_update, has predicate */
/* Skip verify of core_read_description, has predicate */
/* Skip verify of static_transform_name, has predicate */
/* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
+ /* Skip verify of target_signal_from_host, invalid_p == 0 */
+ /* Skip verify of target_signal_to_host, invalid_p == 0 */
+ /* Skip verify of record_special_symbol, has predicate */
buf = ui_file_xstrdup (log, &dummy);
make_cleanup (xfree, buf);
if (strlen (buf) > 0)
void
gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
{
- const char *gdb_xm_file = "<not-defined>";
const char *gdb_nm_file = "<not-defined>";
- const char *gdb_tm_file = "<not-defined>";
-#if defined (GDB_XM_FILE)
- gdb_xm_file = GDB_XM_FILE;
-#endif
- fprintf_unfiltered (file,
- "gdbarch_dump: GDB_XM_FILE = %s\n",
- gdb_xm_file);
#if defined (GDB_NM_FILE)
gdb_nm_file = GDB_NM_FILE;
#endif
fprintf_unfiltered (file,
"gdbarch_dump: GDB_NM_FILE = %s\n",
gdb_nm_file);
-#if defined (GDB_TM_FILE)
- gdb_tm_file = GDB_TM_FILE;
-#endif
- fprintf_unfiltered (file,
- "gdbarch_dump: GDB_TM_FILE = %s\n",
- gdb_tm_file);
fprintf_unfiltered (file,
"gdbarch_dump: addr_bit = %s\n",
paddr_d (gdbarch->addr_bit));
fprintf_unfiltered (file,
"gdbarch_dump: bfd_arch_info = %s\n",
gdbarch_bfd_arch_info (gdbarch)->printable_name);
+ fprintf_unfiltered (file,
+ "gdbarch_dump: bits_big_endian = %s\n",
+ paddr_d (gdbarch->bits_big_endian));
fprintf_unfiltered (file,
"gdbarch_dump: breakpoint_from_pc = <0x%lx>\n",
(long) gdbarch->breakpoint_from_pc);
fprintf_unfiltered (file,
"gdbarch_dump: core_read_description = <0x%lx>\n",
(long) gdbarch->core_read_description);
+ fprintf_unfiltered (file,
+ "gdbarch_dump: core_regset_sections = %s\n",
+ host_address_to_string (gdbarch->core_regset_sections));
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
gdbarch_core_xfer_shared_libraries_p (gdbarch));
fprintf_unfiltered (file,
"gdbarch_dump: deprecated_function_start_offset = 0x%s\n",
paddr_nz (gdbarch->deprecated_function_start_offset));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
+ gdbarch_displaced_step_copy_insn_p (gdbarch));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: displaced_step_copy_insn = <0x%lx>\n",
+ (long) gdbarch->displaced_step_copy_insn);
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
+ gdbarch_displaced_step_fixup_p (gdbarch));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: displaced_step_fixup = <0x%lx>\n",
+ (long) gdbarch->displaced_step_fixup);
+ fprintf_unfiltered (file,
+ "gdbarch_dump: displaced_step_free_closure = <0x%lx>\n",
+ (long) gdbarch->displaced_step_free_closure);
+ fprintf_unfiltered (file,
+ "gdbarch_dump: displaced_step_location = <0x%lx>\n",
+ (long) gdbarch->displaced_step_location);
fprintf_unfiltered (file,
"gdbarch_dump: double_bit = %s\n",
paddr_d (gdbarch->double_bit));
fprintf_unfiltered (file,
"gdbarch_dump: double_format = %s\n",
pformat (gdbarch->double_format));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
+ gdbarch_dummy_id_p (gdbarch));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: dummy_id = <0x%lx>\n",
+ (long) gdbarch->dummy_id);
fprintf_unfiltered (file,
"gdbarch_dump: dwarf2_reg_to_regnum = <0x%lx>\n",
(long) gdbarch->dwarf2_reg_to_regnum);
- fprintf_unfiltered (file,
- "gdbarch_dump: dwarf_reg_to_regnum = <0x%lx>\n",
- (long) gdbarch->dwarf_reg_to_regnum);
fprintf_unfiltered (file,
"gdbarch_dump: ecoff_reg_to_regnum = <0x%lx>\n",
(long) gdbarch->ecoff_reg_to_regnum);
fprintf_unfiltered (file,
"gdbarch_dump: long_long_bit = %s\n",
paddr_d (gdbarch->long_long_bit));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
+ gdbarch_max_insn_length_p (gdbarch));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: max_insn_length = %s\n",
+ paddr_d (gdbarch->max_insn_length));
fprintf_unfiltered (file,
"gdbarch_dump: memory_insert_breakpoint = <0x%lx>\n",
(long) gdbarch->memory_insert_breakpoint);
fprintf_unfiltered (file,
"gdbarch_dump: read_pc = <0x%lx>\n",
(long) gdbarch->read_pc);
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
+ gdbarch_record_special_symbol_p (gdbarch));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: record_special_symbol = <0x%lx>\n",
+ (long) gdbarch->record_special_symbol);
fprintf_unfiltered (file,
"gdbarch_dump: register_name = <0x%lx>\n",
(long) gdbarch->register_name);
fprintf_unfiltered (file,
"gdbarch_dump: single_step_through_delay = <0x%lx>\n",
(long) gdbarch->single_step_through_delay);
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
+ gdbarch_skip_main_prologue_p (gdbarch));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: skip_main_prologue = <0x%lx>\n",
+ (long) gdbarch->skip_main_prologue);
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n",
gdbarch_skip_permanent_breakpoint_p (gdbarch));
"gdbarch_dump: target_desc = %s\n",
paddr_d ((long) gdbarch->target_desc));
fprintf_unfiltered (file,
- "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
- gdbarch_unwind_dummy_id_p (gdbarch));
+ "gdbarch_dump: target_signal_from_host = <0x%lx>\n",
+ (long) gdbarch->target_signal_from_host);
fprintf_unfiltered (file,
- "gdbarch_dump: unwind_dummy_id = <0x%lx>\n",
- (long) gdbarch->unwind_dummy_id);
+ "gdbarch_dump: target_signal_to_host = <0x%lx>\n",
+ (long) gdbarch->target_signal_to_host);
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
gdbarch_unwind_pc_p (gdbarch));
return gdbarch->target_desc;
}
+int
+gdbarch_bits_big_endian (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ /* Skip verify of bits_big_endian, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
+ return gdbarch->bits_big_endian;
+}
+
+void
+set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
+ int bits_big_endian)
+{
+ gdbarch->bits_big_endian = bits_big_endian;
+}
+
int
gdbarch_short_bit (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
- return gdbarch->stab_reg_to_regnum (stab_regnr);
+ return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr);
}
void
gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
- return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
+ return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr);
}
void
gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
}
-int
-gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
- return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
-}
-
-void
-set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
- gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
-{
- gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
-}
-
int
gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
{
gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
- return gdbarch->sdb_reg_to_regnum (sdb_regnr);
+ return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr);
}
void
gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
- return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
+ return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr);
}
void
}
int
-gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
+gdbarch_dummy_id_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->unwind_dummy_id != NULL;
+ return gdbarch->dummy_id != NULL;
}
struct frame_id
-gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
+gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
{
gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->unwind_dummy_id != NULL);
+ gdb_assert (gdbarch->dummy_id != NULL);
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
- return gdbarch->unwind_dummy_id (gdbarch, info);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n");
+ return gdbarch->dummy_id (gdbarch, this_frame);
}
void
-set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
- gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
+set_gdbarch_dummy_id (struct gdbarch *gdbarch,
+ gdbarch_dummy_id_ftype dummy_id)
{
- gdbarch->unwind_dummy_id = unwind_dummy_id;
+ gdbarch->dummy_id = dummy_id;
}
int
gdb_assert (gdbarch->register_sim_regno != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
- return gdbarch->register_sim_regno (reg_nr);
+ return gdbarch->register_sim_regno (gdbarch, reg_nr);
}
void
}
enum return_value_convention
-gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
+gdbarch_return_value (struct gdbarch *gdbarch, struct type *functype, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
{
gdb_assert (gdbarch != NULL);
gdb_assert (gdbarch->return_value != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
- return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
+ return gdbarch->return_value (gdbarch, functype, valtype, regcache, readbuf, writebuf);
}
void
gdb_assert (gdbarch->skip_prologue != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
- return gdbarch->skip_prologue (ip);
+ return gdbarch->skip_prologue (gdbarch, ip);
}
void
gdbarch->skip_prologue = skip_prologue;
}
+int
+gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->skip_main_prologue != NULL;
+}
+
+CORE_ADDR
+gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->skip_main_prologue != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
+ return gdbarch->skip_main_prologue (gdbarch, ip);
+}
+
+void
+set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
+ gdbarch_skip_main_prologue_ftype skip_main_prologue)
+{
+ gdbarch->skip_main_prologue = skip_main_prologue;
+}
+
int
gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
{
gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
- return gdbarch->memory_insert_breakpoint (bp_tgt);
+ return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
}
void
gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
- return gdbarch->memory_remove_breakpoint (bp_tgt);
+ return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
}
void
gdbarch->regset_from_core_section = regset_from_core_section;
}
+struct core_regset_section *
+gdbarch_core_regset_sections (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_core_regset_sections called\n");
+ return gdbarch->core_regset_sections;
+}
+
+void
+set_gdbarch_core_regset_sections (struct gdbarch *gdbarch,
+ struct core_regset_section * core_regset_sections)
+{
+ gdbarch->core_regset_sections = core_regset_sections;
+}
+
int
gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
{
gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
}
+int
+gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->max_insn_length != 0;
+}
+
+ULONGEST
+gdbarch_max_insn_length (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ /* Check variable changed from pre-default. */
+ gdb_assert (gdbarch->max_insn_length != 0);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n");
+ return gdbarch->max_insn_length;
+}
+
+void
+set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
+ ULONGEST max_insn_length)
+{
+ gdbarch->max_insn_length = max_insn_length;
+}
+
+int
+gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->displaced_step_copy_insn != NULL;
+}
+
+struct displaced_step_closure *
+gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->displaced_step_copy_insn != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n");
+ return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs);
+}
+
+void
+set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
+ gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
+{
+ gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
+}
+
+int
+gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->displaced_step_fixup != NULL;
+}
+
+void
+gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->displaced_step_fixup != NULL);
+ /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n");
+ gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs);
+}
+
+void
+set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
+ gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
+{
+ gdbarch->displaced_step_fixup = displaced_step_fixup;
+}
+
+void
+gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->displaced_step_free_closure != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n");
+ gdbarch->displaced_step_free_closure (gdbarch, closure);
+}
+
+void
+set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch,
+ gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure)
+{
+ gdbarch->displaced_step_free_closure = displaced_step_free_closure;
+}
+
+CORE_ADDR
+gdbarch_displaced_step_location (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->displaced_step_location != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n");
+ return gdbarch->displaced_step_location (gdbarch);
+}
+
+void
+set_gdbarch_displaced_step_location (struct gdbarch *gdbarch,
+ gdbarch_displaced_step_location_ftype displaced_step_location)
+{
+ gdbarch->displaced_step_location = displaced_step_location;
+}
+
int
gdbarch_overlay_update_p (struct gdbarch *gdbarch)
{
gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
}
+enum target_signal
+gdbarch_target_signal_from_host (struct gdbarch *gdbarch, int signo)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->target_signal_from_host != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_target_signal_from_host called\n");
+ return gdbarch->target_signal_from_host (gdbarch, signo);
+}
+
+void
+set_gdbarch_target_signal_from_host (struct gdbarch *gdbarch,
+ gdbarch_target_signal_from_host_ftype target_signal_from_host)
+{
+ gdbarch->target_signal_from_host = target_signal_from_host;
+}
+
+int
+gdbarch_target_signal_to_host (struct gdbarch *gdbarch, enum target_signal ts)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->target_signal_to_host != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_target_signal_to_host called\n");
+ return gdbarch->target_signal_to_host (gdbarch, ts);
+}
+
+void
+set_gdbarch_target_signal_to_host (struct gdbarch *gdbarch,
+ gdbarch_target_signal_to_host_ftype target_signal_to_host)
+{
+ gdbarch->target_signal_to_host = target_signal_to_host;
+}
+
+int
+gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->record_special_symbol != NULL;
+}
+
+void
+gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->record_special_symbol != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n");
+ gdbarch->record_special_symbol (gdbarch, objfile, sym);
+}
+
+void
+set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
+ gdbarch_record_special_symbol_ftype record_special_symbol)
+{
+ gdbarch->record_special_symbol = record_special_symbol;
+}
+
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */