gdbarch_addr_bit (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->addr_bit == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_addr_bit invalid");
+ /* Check variable changed from pre-default. */
+ gdb_assert (gdbarch->addr_bit != 0);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
return gdbarch->addr_bit;
gdbarch_char_signed (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->char_signed == -1)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_char_signed invalid");
+ /* Check variable changed from pre-default. */
+ gdb_assert (gdbarch->char_signed != -1);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
return gdbarch->char_signed;
gdbarch_read_pc_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->read_pc != 0;
+ return gdbarch->read_pc != NULL;
}
CORE_ADDR
gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->read_pc == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_read_pc invalid");
+ gdb_assert (gdbarch->read_pc != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
return gdbarch->read_pc (ptid);
gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->write_pc == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_write_pc invalid");
+ gdb_assert (gdbarch->write_pc != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
gdbarch->write_pc (val, ptid);
gdbarch_read_sp_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->read_sp != 0;
+ return gdbarch->read_sp != NULL;
}
CORE_ADDR
gdbarch_read_sp (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->read_sp == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_read_sp invalid");
+ gdb_assert (gdbarch->read_sp != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
return gdbarch->read_sp ();
gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->virtual_frame_pointer == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_virtual_frame_pointer invalid");
+ gdb_assert (gdbarch->virtual_frame_pointer != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->pseudo_register_read != 0;
+ return gdbarch->pseudo_register_read != NULL;
}
void
gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->pseudo_register_read == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_pseudo_register_read invalid");
+ gdb_assert (gdbarch->pseudo_register_read != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->pseudo_register_write != 0;
+ return gdbarch->pseudo_register_write != NULL;
}
void
gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->pseudo_register_write == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_pseudo_register_write invalid");
+ gdb_assert (gdbarch->pseudo_register_write != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
gdbarch_num_regs (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->num_regs == -1)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_num_regs invalid");
+ /* Check variable changed from pre-default. */
+ gdb_assert (gdbarch->num_regs != -1);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
return gdbarch->num_regs;
gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->stab_reg_to_regnum == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_stab_reg_to_regnum invalid");
+ 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);
gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->ecoff_reg_to_regnum == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
+ 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);
gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->dwarf_reg_to_regnum == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
+ 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);
gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->sdb_reg_to_regnum == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
+ 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);
gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->dwarf2_reg_to_regnum == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
+ 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);
gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_name == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_name invalid");
+ gdb_assert (gdbarch->register_name != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
return gdbarch->register_name (regnr);
gdbarch_register_type_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->register_type != 0;
+ return gdbarch->register_type != NULL;
}
struct type *
gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_type == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_type invalid");
+ gdb_assert (gdbarch->register_type != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
return gdbarch->register_type (gdbarch, reg_nr);
gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_register_virtual_type != 0;
+ return gdbarch->deprecated_register_virtual_type != NULL;
}
struct type *
gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_register_virtual_type == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_register_virtual_type invalid");
+ gdb_assert (gdbarch->deprecated_register_virtual_type != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n");
return gdbarch->deprecated_register_virtual_type (reg_nr);
gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_register_byte == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_register_byte invalid");
- /* Ignore predicate (gdbarch->deprecated_register_byte != generic_register_byte). */
+ gdb_assert (gdbarch->deprecated_register_byte != NULL);
+ /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
return gdbarch->deprecated_register_byte (reg_nr);
gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_register_raw_size == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_register_raw_size invalid");
- /* Ignore predicate (gdbarch->deprecated_register_raw_size != generic_register_size). */
+ gdb_assert (gdbarch->deprecated_register_raw_size != NULL);
+ /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
return gdbarch->deprecated_register_raw_size (reg_nr);
gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_register_virtual_size == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_register_virtual_size invalid");
- /* Ignore predicate (gdbarch->deprecated_register_virtual_size != generic_register_size). */
+ gdb_assert (gdbarch->deprecated_register_virtual_size != NULL);
+ /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
return gdbarch->deprecated_register_virtual_size (reg_nr);
gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_max_register_raw_size != 0;
+ return gdbarch->deprecated_max_register_raw_size != NULL;
}
int
gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_max_register_virtual_size != 0;
+ return gdbarch->deprecated_max_register_virtual_size != NULL;
}
int
gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->unwind_dummy_id != 0;
+ return gdbarch->unwind_dummy_id != NULL;
}
struct frame_id
gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->unwind_dummy_id == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_unwind_dummy_id invalid");
+ gdb_assert (gdbarch->unwind_dummy_id != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
return gdbarch->unwind_dummy_id (gdbarch, info);
gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_save_dummy_frame_tos != 0;
+ return gdbarch->deprecated_save_dummy_frame_tos != NULL;
}
void
gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_save_dummy_frame_tos == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_save_dummy_frame_tos invalid");
+ gdb_assert (gdbarch->deprecated_save_dummy_frame_tos != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n");
gdbarch->deprecated_save_dummy_frame_tos (sp);
gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_target_read_fp != 0;
+ return gdbarch->deprecated_target_read_fp != NULL;
}
CORE_ADDR
gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_target_read_fp == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_target_read_fp invalid");
+ gdb_assert (gdbarch->deprecated_target_read_fp != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
return gdbarch->deprecated_target_read_fp ();
gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->push_dummy_call != 0;
+ return gdbarch->push_dummy_call != NULL;
}
CORE_ADDR
gdbarch_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->push_dummy_call == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_push_dummy_call invalid");
+ gdb_assert (gdbarch->push_dummy_call != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
return gdbarch->push_dummy_call (gdbarch, func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_push_arguments != 0;
+ return gdbarch->deprecated_push_arguments != NULL;
}
CORE_ADDR
gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_push_arguments == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_push_arguments invalid");
+ gdb_assert (gdbarch->deprecated_push_arguments != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_push_return_address != 0;
+ return gdbarch->deprecated_push_return_address != NULL;
}
CORE_ADDR
gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_push_return_address == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_push_return_address invalid");
+ gdb_assert (gdbarch->deprecated_push_return_address != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
return gdbarch->deprecated_push_return_address (pc, sp);
gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_dummy_write_sp != 0;
+ return gdbarch->deprecated_dummy_write_sp != NULL;
}
void
gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_dummy_write_sp == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_dummy_write_sp invalid");
+ gdb_assert (gdbarch->deprecated_dummy_write_sp != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
gdbarch->deprecated_dummy_write_sp (val);
gdbarch_call_dummy_address (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->call_dummy_address == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_call_dummy_address invalid");
+ gdb_assert (gdbarch->call_dummy_address != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
return gdbarch->call_dummy_address ();
gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_call_dummy_stack_adjust != 0;
+ return gdbarch->deprecated_call_dummy_stack_adjust != NULL;
}
int
gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_fix_call_dummy != 0;
+ return gdbarch->deprecated_fix_call_dummy != NULL;
}
void
gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_fix_call_dummy == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_fix_call_dummy invalid");
+ gdb_assert (gdbarch->deprecated_fix_call_dummy != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fix_call_dummy called\n");
gdbarch->deprecated_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->push_dummy_code != 0;
+ return gdbarch->push_dummy_code != NULL;
}
CORE_ADDR
gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->push_dummy_code == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_push_dummy_code invalid");
+ gdb_assert (gdbarch->push_dummy_code != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_push_dummy_frame != 0;
+ return gdbarch->deprecated_push_dummy_frame != NULL;
}
void
gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_push_dummy_frame == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
+ gdb_assert (gdbarch->deprecated_push_dummy_frame != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
gdbarch->deprecated_push_dummy_frame ();
gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_do_registers_info != 0;
+ return gdbarch->deprecated_do_registers_info != NULL;
}
void
gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_do_registers_info == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_do_registers_info invalid");
+ gdb_assert (gdbarch->deprecated_do_registers_info != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->print_registers_info == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_print_registers_info invalid");
+ gdb_assert (gdbarch->print_registers_info != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
gdbarch_print_float_info_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->print_float_info != 0;
+ return gdbarch->print_float_info != NULL;
}
void
gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->print_float_info == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_print_float_info invalid");
+ gdb_assert (gdbarch->print_float_info != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
gdbarch->print_float_info (gdbarch, file, frame, args);
gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->print_vector_info != 0;
+ return gdbarch->print_vector_info != NULL;
}
void
gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->print_vector_info == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_print_vector_info invalid");
+ gdb_assert (gdbarch->print_vector_info != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
gdbarch->print_vector_info (gdbarch, file, frame, args);
gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_sim_regno == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_sim_regno invalid");
+ 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);
gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->register_bytes_ok != 0;
+ return gdbarch->register_bytes_ok != NULL;
}
int
gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_bytes_ok == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_bytes_ok invalid");
+ gdb_assert (gdbarch->register_bytes_ok != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
return gdbarch->register_bytes_ok (nr_bytes);
gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->cannot_fetch_register == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_cannot_fetch_register invalid");
+ gdb_assert (gdbarch->cannot_fetch_register != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
return gdbarch->cannot_fetch_register (regnum);
gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->cannot_store_register == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_cannot_store_register invalid");
+ gdb_assert (gdbarch->cannot_store_register != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
return gdbarch->cannot_store_register (regnum);
gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->get_longjmp_target != 0;
+ return gdbarch->get_longjmp_target != NULL;
}
int
gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->get_longjmp_target == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_get_longjmp_target invalid");
+ gdb_assert (gdbarch->get_longjmp_target != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
return gdbarch->get_longjmp_target (pc);
gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_pc_in_call_dummy == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
- /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
+ gdb_assert (gdbarch->deprecated_pc_in_call_dummy != NULL);
+ /* Do not check predicate: gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy, allow call. */
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_init_frame_pc_first != 0;
+ return gdbarch->deprecated_init_frame_pc_first != NULL;
}
CORE_ADDR
gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_init_frame_pc_first == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
+ gdb_assert (gdbarch->deprecated_init_frame_pc_first != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n");
return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev);
gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_init_frame_pc != 0;
+ return gdbarch->deprecated_init_frame_pc != NULL;
}
CORE_ADDR
gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_init_frame_pc == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
+ gdb_assert (gdbarch->deprecated_init_frame_pc != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_get_saved_register != 0;
+ return gdbarch->deprecated_get_saved_register != NULL;
}
void
gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_get_saved_register == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_get_saved_register invalid");
+ gdb_assert (gdbarch->deprecated_get_saved_register != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_register_convertible == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_register_convertible invalid");
+ gdb_assert (gdbarch->deprecated_register_convertible != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convertible called\n");
return gdbarch->deprecated_register_convertible (nr);
gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_register_convert_to_virtual == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_register_convert_to_virtual invalid");
+ gdb_assert (gdbarch->deprecated_register_convert_to_virtual != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_virtual called\n");
gdbarch->deprecated_register_convert_to_virtual (regnum, type, from, to);
gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_register_convert_to_raw == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_register_convert_to_raw invalid");
+ gdb_assert (gdbarch->deprecated_register_convert_to_raw != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_raw called\n");
gdbarch->deprecated_register_convert_to_raw (type, regnum, from, to);
gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->convert_register_p == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_convert_register_p invalid");
+ gdb_assert (gdbarch->convert_register_p != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
return gdbarch->convert_register_p (regnum, type);
gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_to_value == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_to_value invalid");
+ gdb_assert (gdbarch->register_to_value != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
gdbarch->register_to_value (frame, regnum, type, buf);
gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->value_to_register == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_value_to_register invalid");
+ gdb_assert (gdbarch->value_to_register != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
gdbarch->value_to_register (frame, regnum, type, buf);
gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->pointer_to_address == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_pointer_to_address invalid");
+ gdb_assert (gdbarch->pointer_to_address != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
return gdbarch->pointer_to_address (type, buf);
gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->address_to_pointer == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_address_to_pointer invalid");
+ gdb_assert (gdbarch->address_to_pointer != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
gdbarch->address_to_pointer (type, buf, addr);
gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->integer_to_address != 0;
+ return gdbarch->integer_to_address != NULL;
}
CORE_ADDR
gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->integer_to_address == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_integer_to_address invalid");
+ 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);
gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->return_value_on_stack == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_return_value_on_stack invalid");
+ gdb_assert (gdbarch->return_value_on_stack != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
return gdbarch->return_value_on_stack (type);
gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_pop_frame != 0;
+ return gdbarch->deprecated_pop_frame != NULL;
}
void
gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_pop_frame == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_pop_frame invalid");
+ gdb_assert (gdbarch->deprecated_pop_frame != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
gdbarch->deprecated_pop_frame ();
gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_store_struct_return != 0;
+ return gdbarch->deprecated_store_struct_return != NULL;
}
void
gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_store_struct_return == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_store_struct_return invalid");
+ gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
gdbarch->deprecated_store_struct_return (addr, sp);
gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->extract_return_value == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_extract_return_value invalid");
+ gdb_assert (gdbarch->extract_return_value != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
gdbarch->extract_return_value (type, regcache, valbuf);
gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->store_return_value == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_store_return_value invalid");
+ gdb_assert (gdbarch->store_return_value != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
gdbarch->store_return_value (type, regcache, valbuf);
gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_extract_return_value == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_extract_return_value invalid");
+ gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_store_return_value == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_store_return_value invalid");
+ gdb_assert (gdbarch->deprecated_store_return_value != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
gdbarch->deprecated_store_return_value (type, valbuf);
gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->extract_struct_value_address != 0;
+ return gdbarch->extract_struct_value_address != NULL;
}
CORE_ADDR
gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->extract_struct_value_address == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_extract_struct_value_address invalid");
+ gdb_assert (gdbarch->extract_struct_value_address != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
return gdbarch->extract_struct_value_address (regcache);
gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_extract_struct_value_address != 0;
+ return gdbarch->deprecated_extract_struct_value_address != NULL;
}
CORE_ADDR
gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_extract_struct_value_address == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
+ gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
return gdbarch->deprecated_extract_struct_value_address (regbuf);
gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->use_struct_convention == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_use_struct_convention invalid");
+ gdb_assert (gdbarch->use_struct_convention != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
return gdbarch->use_struct_convention (gcc_p, value_type);
gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_frame_init_saved_regs != 0;
+ return gdbarch->deprecated_frame_init_saved_regs != NULL;
}
void
gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_frame_init_saved_regs == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_frame_init_saved_regs invalid");
+ gdb_assert (gdbarch->deprecated_frame_init_saved_regs != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
gdbarch->deprecated_frame_init_saved_regs (frame);
gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_init_extra_frame_info != 0;
+ return gdbarch->deprecated_init_extra_frame_info != NULL;
}
void
gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_init_extra_frame_info == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_init_extra_frame_info invalid");
+ gdb_assert (gdbarch->deprecated_init_extra_frame_info != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->skip_prologue == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_skip_prologue invalid");
+ gdb_assert (gdbarch->skip_prologue != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
return gdbarch->skip_prologue (ip);
gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->prologue_frameless_p == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_prologue_frameless_p invalid");
+ gdb_assert (gdbarch->prologue_frameless_p != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
return gdbarch->prologue_frameless_p (ip);
gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->inner_than == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_inner_than invalid");
+ gdb_assert (gdbarch->inner_than != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
return gdbarch->inner_than (lhs, rhs);
gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->breakpoint_from_pc == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_breakpoint_from_pc invalid");
+ gdb_assert (gdbarch->breakpoint_from_pc != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
return gdbarch->breakpoint_from_pc (pcptr, lenptr);
gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->memory_insert_breakpoint == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_memory_insert_breakpoint invalid");
+ 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 (addr, contents_cache);
gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->memory_remove_breakpoint == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_memory_remove_breakpoint invalid");
+ 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 (addr, contents_cache);
gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->decr_pc_after_break == -1)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_decr_pc_after_break invalid");
+ /* Check variable changed from pre-default. */
+ gdb_assert (gdbarch->decr_pc_after_break != -1);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
return gdbarch->decr_pc_after_break;
gdbarch_function_start_offset (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->function_start_offset == -1)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_function_start_offset invalid");
+ /* Check variable changed from pre-default. */
+ gdb_assert (gdbarch->function_start_offset != -1);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
return gdbarch->function_start_offset;
gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->remote_translate_xfer_address == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_remote_translate_xfer_address invalid");
+ gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
gdbarch_frame_args_skip (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->frame_args_skip == -1)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_frame_args_skip invalid");
+ /* Check variable changed from pre-default. */
+ gdb_assert (gdbarch->frame_args_skip != -1);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
return gdbarch->frame_args_skip;
gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->frameless_function_invocation == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_frameless_function_invocation invalid");
+ gdb_assert (gdbarch->frameless_function_invocation != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
return gdbarch->frameless_function_invocation (fi);
gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_frame_chain != 0;
+ return gdbarch->deprecated_frame_chain != NULL;
}
CORE_ADDR
gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_frame_chain == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_frame_chain invalid");
+ gdb_assert (gdbarch->deprecated_frame_chain != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
return gdbarch->deprecated_frame_chain (frame);
gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_frame_chain_valid != 0;
+ return gdbarch->deprecated_frame_chain_valid != NULL;
}
int
gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_frame_chain_valid == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_frame_chain_valid invalid");
+ gdb_assert (gdbarch->deprecated_frame_chain_valid != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_frame_saved_pc != 0;
+ return gdbarch->deprecated_frame_saved_pc != NULL;
}
CORE_ADDR
gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_frame_saved_pc == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_frame_saved_pc invalid");
+ gdb_assert (gdbarch->deprecated_frame_saved_pc != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
return gdbarch->deprecated_frame_saved_pc (fi);
gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->unwind_pc != 0;
+ return gdbarch->unwind_pc != NULL;
}
CORE_ADDR
gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->unwind_pc == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_unwind_pc invalid");
+ gdb_assert (gdbarch->unwind_pc != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
return gdbarch->unwind_pc (gdbarch, next_frame);
gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->unwind_sp != 0;
+ return gdbarch->unwind_sp != NULL;
}
CORE_ADDR
gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->unwind_sp == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_unwind_sp invalid");
+ gdb_assert (gdbarch->unwind_sp != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
return gdbarch->unwind_sp (gdbarch, next_frame);
gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_frame_args_address == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_frame_args_address invalid");
- /* Ignore predicate (gdbarch->deprecated_frame_args_address != get_frame_base). */
+ gdb_assert (gdbarch->deprecated_frame_args_address != NULL);
+ /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n");
return gdbarch->deprecated_frame_args_address (fi);
gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_frame_locals_address == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_frame_locals_address invalid");
- /* Ignore predicate (gdbarch->deprecated_frame_locals_address != get_frame_base). */
+ gdb_assert (gdbarch->deprecated_frame_locals_address != NULL);
+ /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n");
return gdbarch->deprecated_frame_locals_address (fi);
gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_saved_pc_after_call != 0;
+ return gdbarch->deprecated_saved_pc_after_call != NULL;
}
CORE_ADDR
gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_saved_pc_after_call == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_saved_pc_after_call invalid");
+ gdb_assert (gdbarch->deprecated_saved_pc_after_call != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
return gdbarch->deprecated_saved_pc_after_call (frame);
gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->frame_num_args != 0;
+ return gdbarch->frame_num_args != NULL;
}
int
gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->frame_num_args == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_frame_num_args invalid");
+ gdb_assert (gdbarch->frame_num_args != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
return gdbarch->frame_num_args (frame);
gdbarch_stack_align_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->stack_align != 0;
+ return gdbarch->stack_align != NULL;
}
CORE_ADDR
gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->stack_align == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_stack_align invalid");
+ gdb_assert (gdbarch->stack_align != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
return gdbarch->stack_align (sp);
gdbarch_frame_align_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->frame_align != 0;
+ return gdbarch->frame_align != NULL;
}
CORE_ADDR
gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->frame_align == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_frame_align invalid");
+ gdb_assert (gdbarch->frame_align != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
return gdbarch->frame_align (gdbarch, address);
gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->reg_struct_has_addr != 0;
+ return gdbarch->reg_struct_has_addr != NULL;
}
int
gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->reg_struct_has_addr == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_reg_struct_has_addr invalid");
+ gdb_assert (gdbarch->reg_struct_has_addr != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
return gdbarch->reg_struct_has_addr (gcc_p, type);
gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->convert_from_func_ptr_addr == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
+ gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
return gdbarch->convert_from_func_ptr_addr (addr);
gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->addr_bits_remove == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_addr_bits_remove invalid");
+ gdb_assert (gdbarch->addr_bits_remove != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
return gdbarch->addr_bits_remove (addr);
gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->smash_text_address == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_smash_text_address invalid");
+ gdb_assert (gdbarch->smash_text_address != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
return gdbarch->smash_text_address (addr);
gdbarch_software_single_step_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->software_single_step != 0;
+ return gdbarch->software_single_step != NULL;
}
void
gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->software_single_step == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_software_single_step invalid");
+ gdb_assert (gdbarch->software_single_step != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
gdbarch->software_single_step (sig, insert_breakpoints_p);
gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->print_insn == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_print_insn invalid");
+ gdb_assert (gdbarch->print_insn != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
return gdbarch->print_insn (vma, info);
gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->skip_trampoline_code == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_skip_trampoline_code invalid");
+ gdb_assert (gdbarch->skip_trampoline_code != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
return gdbarch->skip_trampoline_code (pc);
gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->in_solib_call_trampoline == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_in_solib_call_trampoline invalid");
+ gdb_assert (gdbarch->in_solib_call_trampoline != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
return gdbarch->in_solib_call_trampoline (pc, name);
gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->in_solib_return_trampoline == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_in_solib_return_trampoline invalid");
+ gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
return gdbarch->in_solib_return_trampoline (pc, name);
gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->pc_in_sigtramp == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_pc_in_sigtramp invalid");
+ gdb_assert (gdbarch->pc_in_sigtramp != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
return gdbarch->pc_in_sigtramp (pc, name);
gdbarch_sigtramp_start_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->sigtramp_start != 0;
+ return gdbarch->sigtramp_start != NULL;
}
CORE_ADDR
gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->sigtramp_start == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_sigtramp_start invalid");
+ gdb_assert (gdbarch->sigtramp_start != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n");
return gdbarch->sigtramp_start (pc);
gdbarch_sigtramp_end_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->sigtramp_end != 0;
+ return gdbarch->sigtramp_end != NULL;
}
CORE_ADDR
gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->sigtramp_end == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_sigtramp_end invalid");
+ gdb_assert (gdbarch->sigtramp_end != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n");
return gdbarch->sigtramp_end (pc);
gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->in_function_epilogue_p == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_in_function_epilogue_p invalid");
+ gdb_assert (gdbarch->in_function_epilogue_p != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
return gdbarch->in_function_epilogue_p (gdbarch, addr);
gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->construct_inferior_arguments == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_construct_inferior_arguments invalid");
+ gdb_assert (gdbarch->construct_inferior_arguments != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->dwarf2_build_frame_info != 0;
+ return gdbarch->dwarf2_build_frame_info != NULL;
}
void
gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->dwarf2_build_frame_info == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
+ gdb_assert (gdbarch->dwarf2_build_frame_info != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n");
gdbarch->dwarf2_build_frame_info (objfile);
gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->elf_make_msymbol_special == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_elf_make_msymbol_special invalid");
+ gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
gdbarch->elf_make_msymbol_special (sym, msym);
gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->coff_make_msymbol_special == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_coff_make_msymbol_special invalid");
+ gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
gdbarch->coff_make_msymbol_special (val, msym);
gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->address_class_type_flags != 0;
+ return gdbarch->address_class_type_flags != NULL;
}
int
gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->address_class_type_flags == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_address_class_type_flags invalid");
+ gdb_assert (gdbarch->address_class_type_flags != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->address_class_type_flags_to_name != 0;
+ return gdbarch->address_class_type_flags_to_name != NULL;
}
const char *
gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->address_class_type_flags_to_name == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
+ gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->address_class_name_to_type_flags != 0;
+ return gdbarch->address_class_name_to_type_flags != NULL;
}
int
gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->address_class_name_to_type_flags == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
+ gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_reggroup_p == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_reggroup_p invalid");
+ gdb_assert (gdbarch->register_reggroup_p != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->fetch_pointer_argument != 0;
+ return gdbarch->fetch_pointer_argument != NULL;
}
CORE_ADDR
gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->fetch_pointer_argument == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_fetch_pointer_argument invalid");
+ gdb_assert (gdbarch->fetch_pointer_argument != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
return gdbarch->fetch_pointer_argument (frame, argi, type);