/* Dynamic architecture support for GDB, the GNU debugger.
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free
Software Foundation, Inc.
This file is part of GDB.
gdbarch_smash_text_address_ftype *smash_text_address;
gdbarch_software_single_step_ftype *software_single_step;
gdbarch_single_step_through_delay_ftype *single_step_through_delay;
- gdbarch_instruction_nullified_ftype *instruction_nullified;
gdbarch_print_insn_ftype *print_insn;
gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
0, /* smash_text_address */
0, /* software_single_step */
0, /* single_step_through_delay */
- generic_instruction_nullified, /* instruction_nullified */
0, /* print_insn */
0, /* skip_trampoline_code */
generic_skip_solib_resolver, /* skip_solib_resolver */
current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
current_gdbarch->addr_bits_remove = core_addr_identity;
current_gdbarch->smash_text_address = core_addr_identity;
- current_gdbarch->instruction_nullified = generic_instruction_nullified;
current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
/* Skip verify of smash_text_address, invalid_p == 0 */
/* Skip verify of software_single_step, has predicate */
/* Skip verify of single_step_through_delay, has predicate */
- /* Skip verify of instruction_nullified, invalid_p == 0 */
if (current_gdbarch->print_insn == 0)
fprintf_unfiltered (log, "\n\tprint_insn");
/* Skip verify of skip_trampoline_code, invalid_p == 0 */
fprintf_unfiltered (file,
"gdbarch_dump: inner_than = <0x%lx>\n",
(long) current_gdbarch->inner_than);
- fprintf_unfiltered (file,
- "gdbarch_dump: instruction_nullified = <0x%lx>\n",
- (long) current_gdbarch->instruction_nullified);
#ifdef TARGET_INT_BIT
fprintf_unfiltered (file,
"gdbarch_dump: TARGET_INT_BIT # %s\n",
fprintf_unfiltered (file,
"gdbarch_dump: int_bit = %s\n",
paddr_d (current_gdbarch->int_bit));
-#ifdef INTEGER_TO_ADDRESS_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "INTEGER_TO_ADDRESS_P()",
- XSTRING (INTEGER_TO_ADDRESS_P ()));
-#endif
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
gdbarch_integer_to_address_p (current_gdbarch));
-#ifdef INTEGER_TO_ADDRESS
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "INTEGER_TO_ADDRESS(type, buf)",
- XSTRING (INTEGER_TO_ADDRESS (type, buf)));
-#endif
fprintf_unfiltered (file,
"gdbarch_dump: integer_to_address = <0x%lx>\n",
(long) current_gdbarch->integer_to_address);
}
CORE_ADDR
-gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
+gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const bfd_byte *buf)
{
gdb_assert (gdbarch != NULL);
gdb_assert (gdbarch->integer_to_address != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
- return gdbarch->integer_to_address (type, buf);
+ return gdbarch->integer_to_address (gdbarch, type, buf);
}
void
gdbarch->single_step_through_delay = single_step_through_delay;
}
-int
-gdbarch_instruction_nullified (struct gdbarch *gdbarch, struct regcache *regcache)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->instruction_nullified != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_instruction_nullified called\n");
- return gdbarch->instruction_nullified (gdbarch, regcache);
-}
-
-void
-set_gdbarch_instruction_nullified (struct gdbarch *gdbarch,
- gdbarch_instruction_nullified_ftype instruction_nullified)
-{
- gdbarch->instruction_nullified = instruction_nullified;
-}
-
int
gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
{
"Set architecture debugging.\n\
When non-zero, architecture debugging is enabled.", &setdebuglist),
&showdebuglist);
- c = add_set_cmd ("archdebug",
- class_maintenance,
- var_zinteger,
- (char *)&gdbarch_debug,
- "Set architecture debugging.\n\
-When non-zero, architecture debugging is enabled.", &setlist);
-
- deprecate_cmd (c, "set debug arch");
- deprecate_cmd (deprecated_add_show_from_set (c, &showlist), "show debug arch");
}