GDB (xrefs)
Classes | Defines | Enumerations | Functions | Variables
/home/stan/gdb/src/gdb/mt-tdep.c File Reference
#include "defs.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
#include "symtab.h"
#include "dis-asm.h"
#include "arch-utils.h"
#include "gdbtypes.h"
#include "gdb_string.h"
#include "regcache.h"
#include "reggroups.h"
#include "gdbcore.h"
#include "trad-frame.h"
#include "inferior.h"
#include "dwarf2-frame.h"
#include "infcall.h"
#include "gdb_assert.h"
#include "language.h"
#include "valprint.h"

Go to the source code of this file.

Classes

struct  gdbarch_tdep
struct  mt_unwind_cache

Defines

#define wordsize   4

Enumerations

enum  mt_arch_constants { MT_MAX_STRUCT_SIZE = 16 }
enum  mt_gdb_regnums {
  MT_R0_REGNUM, MT_R1_REGNUM, MT_1ST_ARGREG = MT_R1_REGNUM, MT_R2_REGNUM,
  MT_R3_REGNUM, MT_R4_REGNUM, MT_LAST_ARGREG = MT_R4_REGNUM, MT_R5_REGNUM,
  MT_R6_REGNUM, MT_R7_REGNUM, MT_R8_REGNUM, MT_R9_REGNUM,
  MT_R10_REGNUM, MT_R11_REGNUM, MT_R12_REGNUM, MT_FP_REGNUM = MT_R12_REGNUM,
  MT_R13_REGNUM, MT_SP_REGNUM = MT_R13_REGNUM, MT_R14_REGNUM, MT_RA_REGNUM = MT_R14_REGNUM,
  MT_R15_REGNUM, MT_IRA_REGNUM = MT_R15_REGNUM, MT_PC_REGNUM, MT_INT_ENABLE_REGNUM,
  MT_NUM_CPU_REGS, MT_COPRO_REGNUM = MT_NUM_CPU_REGS, MT_CPR0_REGNUM, MT_CPR1_REGNUM,
  MT_CPR2_REGNUM, MT_CPR3_REGNUM, MT_CPR4_REGNUM, MT_CPR5_REGNUM,
  MT_CPR6_REGNUM, MT_CPR7_REGNUM, MT_CPR8_REGNUM, MT_CPR9_REGNUM,
  MT_CPR10_REGNUM, MT_CPR11_REGNUM, MT_CPR12_REGNUM, MT_CPR13_REGNUM,
  MT_CPR14_REGNUM, MT_CPR15_REGNUM, MT_BYPA_REGNUM, MT_BYPB_REGNUM,
  MT_BYPC_REGNUM, MT_FLAG_REGNUM, MT_CONTEXT_REGNUM, MT_MAC_REGNUM,
  MT_Z1_REGNUM, MT_Z2_REGNUM, MT_ICHANNEL_REGNUM, MT_ISCRAMB_REGNUM,
  MT_QSCRAMB_REGNUM, MT_OUT_REGNUM, MT_EXMAC_REGNUM, MT_QCHANNEL_REGNUM,
  MT_ZI2_REGNUM, MT_ZQ2_REGNUM, MT_CHANNEL2_REGNUM, MT_ISCRAMB2_REGNUM,
  MT_QSCRAMB2_REGNUM, MT_QCHANNEL2_REGNUM, MT_NUM_REGS, MT_COPRO_PSEUDOREG_REGNUM = MT_NUM_REGS,
  MT_MAC_PSEUDOREG_REGNUM, MT_COPRO_PSEUDOREG_ARRAY, MT_COPRO_PSEUDOREG_DIM_1 = 2, MT_COPRO_PSEUDOREG_DIM_2 = 8,
  MT_COPRO_PSEUDOREG_REGS = MT_NUM_REGS - MT_NUM_CPU_REGS + 2, MT_COPRO_PSEUDOREG_MAC_REGNUM = MT_COPRO_PSEUDOREG_REGS - 1, MT_NUM_PSEUDO_REGS
}

Functions

static const char * mt_register_name (struct gdbarch *gdbarch, int regnum)
static struct typemt_copro_register_type (struct gdbarch *arch, int regnum)
static struct typemt_register_type (struct gdbarch *arch, int regnum)
static int mt_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *group)
static enum return_value_convention mt_return_value (struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
static CORE_ADDR mt_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
static const gdb_bytemt_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *bp_addr, int *bp_size)
static int mt_select_coprocessor (struct gdbarch *gdbarch, struct regcache *regcache, int regno)
static enum register_status mt_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int regno, gdb_byte *buf)
static void mt_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int regno, const gdb_byte *buf)
static CORE_ADDR mt_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
static void mt_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
static CORE_ADDR mt_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
static struct mt_unwind_cachemt_frame_unwind_cache (struct frame_info *this_frame, void **this_prologue_cache)
static CORE_ADDR mt_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
static CORE_ADDR mt_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
static struct frame_id mt_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
static void mt_frame_this_id (struct frame_info *this_frame, void **this_prologue_cache, struct frame_id *this_id)
static struct valuemt_frame_prev_register (struct frame_info *this_frame, void **this_prologue_cache, int regnum)
static CORE_ADDR mt_frame_base_address (struct frame_info *this_frame, void **this_prologue_cache)
static struct gdbarchmt_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
void _initialize_mt_tdep (void)

Variables

static struct frame_unwind mt_frame_unwind
static struct frame_base mt_frame_base
initialize_file_ftype _initialize_mt_tdep

Define Documentation

#define wordsize   4

Enumeration Type Documentation

Enumerator:
MT_MAX_STRUCT_SIZE 

Definition at line 42 of file mt-tdep.c.

Enumerator:
MT_R0_REGNUM 
MT_R1_REGNUM 
MT_1ST_ARGREG 
MT_R2_REGNUM 
MT_R3_REGNUM 
MT_R4_REGNUM 
MT_LAST_ARGREG 
MT_R5_REGNUM 
MT_R6_REGNUM 
MT_R7_REGNUM 
MT_R8_REGNUM 
MT_R9_REGNUM 
MT_R10_REGNUM 
MT_R11_REGNUM 
MT_R12_REGNUM 
MT_FP_REGNUM 
MT_R13_REGNUM 
MT_SP_REGNUM 
MT_R14_REGNUM 
MT_RA_REGNUM 
MT_R15_REGNUM 
MT_IRA_REGNUM 
MT_PC_REGNUM 
MT_INT_ENABLE_REGNUM 
MT_NUM_CPU_REGS 
MT_COPRO_REGNUM 
MT_CPR0_REGNUM 
MT_CPR1_REGNUM 
MT_CPR2_REGNUM 
MT_CPR3_REGNUM 
MT_CPR4_REGNUM 
MT_CPR5_REGNUM 
MT_CPR6_REGNUM 
MT_CPR7_REGNUM 
MT_CPR8_REGNUM 
MT_CPR9_REGNUM 
MT_CPR10_REGNUM 
MT_CPR11_REGNUM 
MT_CPR12_REGNUM 
MT_CPR13_REGNUM 
MT_CPR14_REGNUM 
MT_CPR15_REGNUM 
MT_BYPA_REGNUM 
MT_BYPB_REGNUM 
MT_BYPC_REGNUM 
MT_FLAG_REGNUM 
MT_CONTEXT_REGNUM 
MT_MAC_REGNUM 
MT_Z1_REGNUM 
MT_Z2_REGNUM 
MT_ICHANNEL_REGNUM 
MT_ISCRAMB_REGNUM 
MT_QSCRAMB_REGNUM 
MT_OUT_REGNUM 
MT_EXMAC_REGNUM 
MT_QCHANNEL_REGNUM 
MT_ZI2_REGNUM 
MT_ZQ2_REGNUM 
MT_CHANNEL2_REGNUM 
MT_ISCRAMB2_REGNUM 
MT_QSCRAMB2_REGNUM 
MT_QCHANNEL2_REGNUM 
MT_NUM_REGS 
MT_COPRO_PSEUDOREG_REGNUM 
MT_MAC_PSEUDOREG_REGNUM 
MT_COPRO_PSEUDOREG_ARRAY 
MT_COPRO_PSEUDOREG_DIM_1 
MT_COPRO_PSEUDOREG_DIM_2 
MT_COPRO_PSEUDOREG_REGS 
MT_COPRO_PSEUDOREG_MAC_REGNUM 
MT_NUM_PSEUDO_REGS 

Definition at line 47 of file mt-tdep.c.


Function Documentation

void _initialize_mt_tdep ( void  )

Definition at line 1216 of file mt-tdep.c.

References mt_gdbarch_init(), and register_gdbarch_init().

static const gdb_byte* mt_breakpoint_from_pc ( struct gdbarch gdbarch,
CORE_ADDR bp_addr,
int bp_size 
) [static]

Definition at line 461 of file mt-tdep.c.

References gdbarch_bfd_arch_info().

Referenced by mt_gdbarch_init().

static struct type* mt_copro_register_type ( struct gdbarch arch,
int  regnum 
) [static, read]
static struct frame_id mt_dummy_id ( struct gdbarch gdbarch,
struct frame_info this_frame 
) [static, read]

Definition at line 1071 of file mt-tdep.c.

References frame_id_build(), get_frame_pc(), get_frame_register_unsigned(), MT_SP_REGNUM, and sp.

Referenced by mt_gdbarch_init().

static CORE_ADDR mt_frame_align ( struct gdbarch gdbarch,
CORE_ADDR  sp 
) [static]

Definition at line 636 of file mt-tdep.c.

References align_down().

Referenced by mt_gdbarch_init().

static CORE_ADDR mt_frame_base_address ( struct frame_info this_frame,
void **  this_prologue_cache 
) [static]

Definition at line 1104 of file mt-tdep.c.

References mt_unwind_cache::frame_base, and mt_frame_unwind_cache().

static struct value* mt_frame_prev_register ( struct frame_info this_frame,
void **  this_prologue_cache,
int  regnum 
) [static, read]
static void mt_frame_this_id ( struct frame_info this_frame,
void **  this_prologue_cache,
struct frame_id this_id 
) [static]
static struct mt_unwind_cache* mt_frame_unwind_cache ( struct frame_info this_frame,
void **  this_prologue_cache 
) [static, read]
static struct gdbarch* mt_gdbarch_init ( struct gdbarch_info  info,
struct gdbarch_list arches 
) [static, read]

Definition at line 1140 of file mt-tdep.c.

References core_addr_lessthan(), dwarf2_append_unwinders(), floatformats_ieee_double, floatformats_ieee_single, frame_base_set_default(), frame_unwind_append_unwinder(), gdbarch_list::gdbarch, gdbarch_alloc(), gdbarch_list_lookup_by_info(), mt_breakpoint_from_pc(), mt_dummy_id(), mt_frame_align(), MT_NUM_PSEUDO_REGS, MT_NUM_REGS, MT_PC_REGNUM, mt_pseudo_register_read(), mt_pseudo_register_write(), mt_push_dummy_call(), mt_register_name(), mt_register_reggroup_p(), mt_register_type(), mt_registers_info(), mt_return_value(), mt_skip_prologue(), MT_SP_REGNUM, mt_unwind_pc(), mt_unwind_sp(), set_gdbarch_breakpoint_from_pc(), set_gdbarch_decr_pc_after_break(), set_gdbarch_double_bit(), set_gdbarch_double_format(), set_gdbarch_dummy_id(), set_gdbarch_float_bit(), set_gdbarch_float_format(), set_gdbarch_frame_align(), set_gdbarch_frame_args_skip(), set_gdbarch_inner_than(), set_gdbarch_int_bit(), set_gdbarch_long_bit(), set_gdbarch_long_double_bit(), set_gdbarch_long_double_format(), set_gdbarch_long_long_bit(), set_gdbarch_num_pseudo_regs(), set_gdbarch_num_regs(), set_gdbarch_pc_regnum(), set_gdbarch_print_insn(), set_gdbarch_print_registers_info(), set_gdbarch_pseudo_register_read(), set_gdbarch_pseudo_register_write(), set_gdbarch_ptr_bit(), set_gdbarch_push_dummy_call(), set_gdbarch_register_name(), set_gdbarch_register_reggroup_p(), set_gdbarch_register_type(), set_gdbarch_return_value(), set_gdbarch_short_bit(), set_gdbarch_skip_prologue(), set_gdbarch_sp_regnum(), set_gdbarch_unwind_pc(), set_gdbarch_unwind_sp(), and XCALLOC.

Referenced by _initialize_mt_tdep().

static enum register_status mt_pseudo_register_read ( struct gdbarch gdbarch,
struct regcache regcache,
int  regno,
gdb_byte buf 
) [static]
static void mt_pseudo_register_write ( struct gdbarch gdbarch,
struct regcache regcache,
int  regno,
const gdb_byte buf 
) [static]
static CORE_ADDR mt_push_dummy_call ( struct gdbarch gdbarch,
struct value function,
struct regcache regcache,
CORE_ADDR  bp_addr,
int  nargs,
struct value **  args,
CORE_ADDR  sp,
int  struct_return,
CORE_ADDR  struct_addr 
) [static]
static const char* mt_register_name ( struct gdbarch gdbarch,
int  regnum 
) [static]
static int mt_register_reggroup_p ( struct gdbarch gdbarch,
int  regnum,
struct reggroup group 
) [static]
static struct type* mt_register_type ( struct gdbarch arch,
int  regnum 
) [static, read]
static void mt_registers_info ( struct gdbarch gdbarch,
struct ui_file file,
struct frame_info frame,
int  regnum,
int  all 
) [static]
static enum return_value_convention mt_return_value ( struct gdbarch gdbarch,
struct value function,
struct type type,
struct regcache regcache,
gdb_byte readbuf,
const gdb_byte writebuf 
) [static]
static int mt_select_coprocessor ( struct gdbarch gdbarch,
struct regcache regcache,
int  regno 
) [static]
static CORE_ADDR mt_skip_prologue ( struct gdbarch gdbarch,
CORE_ADDR  pc 
) [static]
static CORE_ADDR mt_unwind_pc ( struct gdbarch gdbarch,
struct frame_info next_frame 
) [static]

Definition at line 1049 of file mt-tdep.c.

References frame_unwind_register_unsigned(), MT_PC_REGNUM, and ULONGEST.

Referenced by mt_gdbarch_init().

static CORE_ADDR mt_unwind_sp ( struct gdbarch gdbarch,
struct frame_info next_frame 
) [static]

Definition at line 1058 of file mt-tdep.c.

References frame_unwind_register_unsigned(), MT_SP_REGNUM, sp, and ULONGEST.

Referenced by mt_gdbarch_init().


Variable Documentation

Referenced by initialize_all_files().

struct frame_base mt_frame_base [static]
Initial value:

Definition at line 1132 of file mt-tdep.c.

struct frame_unwind mt_frame_unwind [static]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines