GDB (xrefs)
Classes | Defines | Functions | Variables
/home/stan/gdb/src/gdb/sh-tdep.c File Reference
#include "defs.h"
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
#include "dwarf2-frame.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "gdbcmd.h"
#include "gdbcore.h"
#include "value.h"
#include "dis-asm.h"
#include "inferior.h"
#include "gdb_string.h"
#include "gdb_assert.h"
#include "arch-utils.h"
#include "floatformat.h"
#include "regcache.h"
#include "doublest.h"
#include "osabi.h"
#include "reggroups.h"
#include "regset.h"
#include "objfiles.h"
#include "sh-tdep.h"
#include "sh64-tdep.h"
#include "elf-bfd.h"
#include "solib-svr4.h"
#include "elf/sh.h"
#include "dwarf2.h"
#include "gdb/sim-sh.h"

Go to the source code of this file.

Classes

struct  sh_frame_cache

Defines

#define SH_NUM_REGS   67
#define GET_SOURCE_REG(x)   (((x) >> 4) & 0xf)
#define GET_TARGET_REG(x)   (((x) >> 8) & 0xf)
#define IS_JSR(x)   (((x) & 0xf0ff) == 0x400b)
#define IS_STS(x)   ((x) == 0x4f22)
#define IS_MACL_STS(x)   ((x) == 0x4f12)
#define IS_PUSH(x)   (((x) & 0xff0f) == 0x2f06)
#define IS_MOV_SP_FP(x)   ((x) == 0x6ef3)
#define IS_ADD_IMM_SP(x)   (((x) & 0xff00) == 0x7f00)
#define IS_MOV_R3(x)   (((x) & 0xff00) == 0x1a00)
#define IS_SHLL_R3(x)   ((x) == 0x4300)
#define IS_ADD_R3SP(x)   ((x) == 0x3f3c)
#define IS_FPUSH(x)   (((x) & 0xff0f) == 0xff0b)
#define IS_MOV_ARG_TO_REG(x)
#define IS_MOV_ARG_TO_IND_R14(x)
#define IS_MOV_ARG_TO_IND_R14_WITH_DISP(x)
#define IS_MOVW_PCREL_TO_REG(x)   (((x) & 0xf000) == 0x9000)
#define IS_MOVL_PCREL_TO_REG(x)   (((x) & 0xf000) == 0xd000)
#define IS_MOVI20(x)   (((x) & 0xf00f) == 0x0000)
#define IS_SUB_REG_FROM_SP(x)   (((x) & 0xff0f) == 0x3f08)
#define FPSCR_SZ   (1 << 20)
#define IS_RESTORE_FP(x)   ((x) == 0x6ef6)
#define IS_RTS(x)   ((x) == 0x000b)
#define IS_LDS(x)   ((x) == 0x4f26)
#define IS_MACL_LDS(x)   ((x) == 0x4f16)
#define IS_MOV_FP_SP(x)   ((x) == 0x6fe3)
#define IS_ADD_REG_TO_FP(x)   (((x) & 0xff0f) == 0x3e0c)
#define IS_ADD_IMM_FP(x)   (((x) & 0xff00) == 0x7e00)

Functions

static int sh_is_renesas_calling_convention (struct type *func_type)
static const char * sh_sh_register_name (struct gdbarch *gdbarch, int reg_nr)
static const char * sh_sh3_register_name (struct gdbarch *gdbarch, int reg_nr)
static const char * sh_sh3e_register_name (struct gdbarch *gdbarch, int reg_nr)
static const char * sh_sh2e_register_name (struct gdbarch *gdbarch, int reg_nr)
static const char * sh_sh2a_register_name (struct gdbarch *gdbarch, int reg_nr)
static const char * sh_sh2a_nofpu_register_name (struct gdbarch *gdbarch, int reg_nr)
static const char * sh_sh_dsp_register_name (struct gdbarch *gdbarch, int reg_nr)
static const char * sh_sh3_dsp_register_name (struct gdbarch *gdbarch, int reg_nr)
static const char * sh_sh4_register_name (struct gdbarch *gdbarch, int reg_nr)
static const char * sh_sh4_nofpu_register_name (struct gdbarch *gdbarch, int reg_nr)
static const char * sh_sh4al_dsp_register_name (struct gdbarch *gdbarch, int reg_nr)
static const unsigned char * sh_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
static CORE_ADDR sh_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR limit_pc, struct sh_frame_cache *cache, ULONGEST fpscr)
static CORE_ADDR sh_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
static int sh_use_struct_convention (int renesas_abi, struct type *type)
static int sh_use_struct_convention_nofpu (int renesas_abi, struct type *type)
static CORE_ADDR sh_frame_align (struct gdbarch *ignore, CORE_ADDR sp)
static const gdb_bytesh_justify_value_in_reg (struct gdbarch *gdbarch, struct value *val, int len)
static CORE_ADDR sh_stack_allocsize (int nargs, struct value **args)
static void sh_init_flt_argreg (void)
static int sh_next_flt_argreg (struct gdbarch *gdbarch, int len, struct type *func_type)
static int sh_treat_as_flt_p (struct type *type)
static CORE_ADDR sh_push_dummy_call_fpu (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 CORE_ADDR sh_push_dummy_call_nofpu (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 void sh_extract_return_value_nofpu (struct type *type, struct regcache *regcache, gdb_byte *valbuf)
static void sh_extract_return_value_fpu (struct type *type, struct regcache *regcache, gdb_byte *valbuf)
static void sh_store_return_value_nofpu (struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
static void sh_store_return_value_fpu (struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
static enum return_value_convention sh_return_value_nofpu (struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
static enum return_value_convention sh_return_value_fpu (struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
static struct typesh_sh2a_register_type (struct gdbarch *gdbarch, int reg_nr)
static struct typesh_sh3e_register_type (struct gdbarch *gdbarch, int reg_nr)
static struct typesh_sh4_build_float_register_type (struct gdbarch *gdbarch, int high)
static struct typesh_sh4_register_type (struct gdbarch *gdbarch, int reg_nr)
static struct typesh_default_register_type (struct gdbarch *gdbarch, int reg_nr)
static int sh_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
static void sh_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, gdb_byte *from, gdb_byte *to)
static void sh_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const gdb_byte *from, gdb_byte *to)
static int fv_reg_base_num (struct gdbarch *gdbarch, int fv_regnum)
static int dr_reg_base_num (struct gdbarch *gdbarch, int dr_regnum)
static enum register_status pseudo_register_read_portions (struct gdbarch *gdbarch, struct regcache *regcache, int portions, int base_regnum, gdb_byte *buffer)
static enum register_status sh_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int reg_nr, gdb_byte *buffer)
static void sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int reg_nr, const gdb_byte *buffer)
static int sh_dsp_register_sim_regno (struct gdbarch *gdbarch, int nr)
static int sh_sh2a_register_sim_regno (struct gdbarch *gdbarch, int nr)
static void sh_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum, struct dwarf2_frame_state_reg *reg, struct frame_info *this_frame)
static struct sh_frame_cachesh_alloc_frame_cache (void)
static struct sh_frame_cachesh_frame_cache (struct frame_info *this_frame, void **this_cache)
static struct valuesh_frame_prev_register (struct frame_info *this_frame, void **this_cache, int regnum)
static void sh_frame_this_id (struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
static CORE_ADDR sh_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
static CORE_ADDR sh_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
static struct frame_id sh_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
static CORE_ADDR sh_frame_base_address (struct frame_info *this_frame, void **this_cache)
static struct sh_frame_cachesh_make_stub_cache (struct frame_info *this_frame)
static void sh_stub_this_id (struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
static int sh_stub_unwind_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
static int sh_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
void sh_corefile_supply_regset (const struct regset *regset, struct regcache *regcache, int regnum, const void *regs, size_t len)
void sh_corefile_collect_regset (const struct regset *regset, const struct regcache *regcache, int regnum, void *regs, size_t len)
static struct regsetsh_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
static int sh_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
static struct gdbarchsh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
static void show_sh_command (char *args, int from_tty)
static void set_sh_command (char *args, int from_tty)
void _initialize_sh_tdep (void)

Variables

static struct cmd_list_elementsetshcmdlist = NULL
static struct cmd_list_elementshowshcmdlist = NULL
static const char sh_cc_gcc [] = "gcc"
static const char sh_cc_renesas [] = "renesas"
static const char *const sh_cc_enum []
static const char * sh_active_calling_convention = sh_cc_gcc
static int flt_argreg_array [FLOAT_ARGLAST_REGNUM-FLOAT_ARG0_REGNUM+1]
static struct frame_unwind sh_frame_unwind
static struct frame_base sh_frame_base
static struct frame_unwind sh_stub_unwind
struct regset sh_corefile_gregset
static struct regset sh_corefile_fpregset
initialize_file_ftype _initialize_sh_tdep

Define Documentation

#define FPSCR_SZ   (1 << 20)

Definition at line 525 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

#define GET_SOURCE_REG (   x)    (((x) >> 4) & 0xf)

Definition at line 459 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

#define GET_TARGET_REG (   x)    (((x) >> 8) & 0xf)

Definition at line 460 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

#define IS_ADD_IMM_FP (   x)    (((x) & 0xff00) == 0x7e00)

Definition at line 534 of file sh-tdep.c.

Referenced by sh_in_function_epilogue_p().

#define IS_ADD_IMM_SP (   x)    (((x) & 0xff00) == 0x7f00)

Definition at line 483 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

#define IS_ADD_R3SP (   x)    ((x) == 0x3f3c)

Definition at line 490 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

#define IS_ADD_REG_TO_FP (   x)    (((x) & 0xff0f) == 0x3e0c)

Definition at line 533 of file sh-tdep.c.

Referenced by sh_in_function_epilogue_p().

#define IS_FPUSH (   x)    (((x) & 0xff0f) == 0xff0b)

Definition at line 498 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

#define IS_JSR (   x)    (((x) & 0xf0ff) == 0x400b)

Definition at line 463 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

#define IS_LDS (   x)    ((x) == 0x4f26)

Definition at line 530 of file sh-tdep.c.

Referenced by sh_in_function_epilogue_p().

#define IS_MACL_LDS (   x)    ((x) == 0x4f16)

Definition at line 531 of file sh-tdep.c.

Referenced by sh_in_function_epilogue_p().

#define IS_MACL_STS (   x)    ((x) == 0x4f12)

Definition at line 471 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

#define IS_MOV_ARG_TO_IND_R14 (   x)
Value:
(((x) & 0xff0f) == 0x2e02 && \
         ((x) & 0x00f0) >= 0x0040 && \
         ((x) & 0x00f0) <= 0x0070)

Definition at line 506 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

Value:
(((x) & 0xff00) == 0x1e00 && \
         ((x) & 0x00f0) >= 0x0040 && \
         ((x) & 0x00f0) <= 0x0070)

Definition at line 511 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

#define IS_MOV_ARG_TO_REG (   x)
Value:
(((x) & 0xf00f) == 0x6003 && \
         ((x) & 0x00f0) >= 0x0040 && \
         ((x) & 0x00f0) <= 0x0070)

Definition at line 501 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

#define IS_MOV_FP_SP (   x)    ((x) == 0x6fe3)

Definition at line 532 of file sh-tdep.c.

Referenced by sh_in_function_epilogue_p().

#define IS_MOV_R3 (   x)    (((x) & 0xff00) == 0x1a00)

Definition at line 485 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

#define IS_MOV_SP_FP (   x)    ((x) == 0x6ef3)

Definition at line 479 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

#define IS_MOVI20 (   x)    (((x) & 0xf00f) == 0x0000)

Definition at line 521 of file sh-tdep.c.

Referenced by sh_analyze_prologue(), and sh_in_function_epilogue_p().

#define IS_MOVL_PCREL_TO_REG (   x)    (((x) & 0xf000) == 0xd000)

Definition at line 519 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

#define IS_MOVW_PCREL_TO_REG (   x)    (((x) & 0xf000) == 0x9000)

Definition at line 517 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

#define IS_PUSH (   x)    (((x) & 0xff0f) == 0x2f06)

Definition at line 475 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

#define IS_RESTORE_FP (   x)    ((x) == 0x6ef6)

Definition at line 528 of file sh-tdep.c.

Referenced by sh_in_function_epilogue_p().

#define IS_RTS (   x)    ((x) == 0x000b)

Definition at line 529 of file sh-tdep.c.

Referenced by sh_in_function_epilogue_p().

#define IS_SHLL_R3 (   x)    ((x) == 0x4300)

Definition at line 486 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

#define IS_STS (   x)    ((x) == 0x4f22)

Definition at line 467 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

#define IS_SUB_REG_FROM_SP (   x)    (((x) & 0xff0f) == 0x3f08)

Definition at line 523 of file sh-tdep.c.

Referenced by sh_analyze_prologue().

#define SH_NUM_REGS   67

Definition at line 72 of file sh-tdep.c.

Referenced by sh_alloc_frame_cache(), sh_frame_cache(), and sh_gdbarch_init().


Function Documentation

void _initialize_sh_tdep ( void  )
static int dr_reg_base_num ( struct gdbarch gdbarch,
int  dr_regnum 
) [static]

Definition at line 1607 of file sh-tdep.c.

References DR0_REGNUM, fp_regnum, and gdbarch_fp0_regnum().

Referenced by sh_pseudo_register_read(), and sh_pseudo_register_write().

static int fv_reg_base_num ( struct gdbarch gdbarch,
int  fv_regnum 
) [static]

Definition at line 1596 of file sh-tdep.c.

References fp_regnum, FV0_REGNUM, and gdbarch_fp0_regnum().

Referenced by sh_pseudo_register_read(), and sh_pseudo_register_write().

static enum register_status pseudo_register_read_portions ( struct gdbarch gdbarch,
struct regcache regcache,
int  portions,
int  base_regnum,
gdb_byte buffer 
) [static]

Definition at line 1620 of file sh-tdep.c.

References REG_VALID, regcache_raw_read(), register_size(), and exsummary::status.

Referenced by sh_pseudo_register_read().

static void set_sh_command ( char *  args,
int  from_tty 
) [static]

Definition at line 2425 of file sh-tdep.c.

References all_commands, gdb_stdout, help_list(), and printf_unfiltered().

Referenced by _initialize_sh_tdep().

static struct sh_frame_cache* sh_alloc_frame_cache ( void  ) [static, read]
static CORE_ADDR sh_analyze_prologue ( struct gdbarch gdbarch,
CORE_ADDR  pc,
CORE_ADDR  limit_pc,
struct sh_frame_cache cache,
ULONGEST  fpscr 
) [static]
static const unsigned char* sh_breakpoint_from_pc ( struct gdbarch gdbarch,
CORE_ADDR pcptr,
int lenptr 
) [static]

Definition at line 423 of file sh-tdep.c.

References gdbarch_byte_order(), and target_shortname.

Referenced by sh_gdbarch_init().

void sh_corefile_collect_regset ( const struct regset regset,
const struct regcache regcache,
int  regnum,
void *  regs,
size_t  len 
)
void sh_corefile_supply_regset ( const struct regset regset,
struct regcache regcache,
int  regnum,
const void *  regs,
size_t  len 
)
static struct type* sh_default_register_type ( struct gdbarch gdbarch,
int  reg_nr 
) [static, read]

Definition at line 1478 of file sh-tdep.c.

References builtin_type::builtin_int, and builtin_type().

Referenced by sh_gdbarch_init().

static int sh_dsp_register_sim_regno ( struct gdbarch gdbarch,
int  nr 
) [static]
static struct frame_id sh_dummy_id ( struct gdbarch gdbarch,
struct frame_info this_frame 
) [static, read]
static void sh_dwarf2_frame_init_reg ( struct gdbarch gdbarch,
int  regnum,
struct dwarf2_frame_state_reg reg,
struct frame_info this_frame 
) [static]
static void sh_extract_return_value_fpu ( struct type type,
struct regcache regcache,
gdb_byte valbuf 
) [static]
static void sh_extract_return_value_nofpu ( struct type type,
struct regcache regcache,
gdb_byte valbuf 
) [static]
static CORE_ADDR sh_frame_align ( struct gdbarch ignore,
CORE_ADDR  sp 
) [static]

Definition at line 853 of file sh-tdep.c.

Referenced by sh_gdbarch_init(), sh_push_dummy_call_fpu(), and sh_push_dummy_call_nofpu().

static CORE_ADDR sh_frame_base_address ( struct frame_info this_frame,
void **  this_cache 
) [static]

Definition at line 1990 of file sh-tdep.c.

References sh_frame_cache::base, and sh_frame_cache().

static struct sh_frame_cache* sh_frame_cache ( struct frame_info this_frame,
void **  this_cache 
) [static, read]
static struct value* sh_frame_prev_register ( struct frame_info this_frame,
void **  this_cache,
int  regnum 
) [static, read]
static void sh_frame_this_id ( struct frame_info this_frame,
void **  this_cache,
struct frame_id this_id 
) [static]
static struct gdbarch* sh_gdbarch_init ( struct gdbarch_info  info,
struct gdbarch_list arches 
) [static, read]

Definition at line 2240 of file sh-tdep.c.

References gdbarch_info::bfd_arch_info, core_addr_lessthan(), dwarf2_append_unwinders(), dwarf2_frame_set_init_reg(), floatformats_ieee_single, frame_base_set_default(), frame_unwind_append_unwinder(), gdbarch_list::gdbarch, gdbarch_alloc(), gdbarch_init_osabi(), gdbarch_list_lookup_by_info(), legacy_register_sim_regno(), set_gdbarch_believe_pcc_promotion(), set_gdbarch_breakpoint_from_pc(), set_gdbarch_double_bit(), set_gdbarch_double_format(), set_gdbarch_dummy_id(), set_gdbarch_float_bit(), set_gdbarch_fp0_regnum(), set_gdbarch_frame_align(), set_gdbarch_in_function_epilogue_p(), set_gdbarch_inner_than(), set_gdbarch_int_bit(), set_gdbarch_long_bit(), set_gdbarch_long_double_bit(), set_gdbarch_long_long_bit(), set_gdbarch_num_pseudo_regs(), set_gdbarch_num_regs(), set_gdbarch_pc_regnum(), set_gdbarch_print_insn(), 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_sim_regno(), set_gdbarch_register_type(), set_gdbarch_regset_from_core_section(), set_gdbarch_return_in_first_hidden_param_p(), set_gdbarch_return_value(), set_gdbarch_short_bit(), set_gdbarch_skip_prologue(), set_gdbarch_sp_regnum(), set_gdbarch_unwind_pc(), set_gdbarch_unwind_sp(), sh64_gdbarch_init, sh_breakpoint_from_pc(), sh_default_register_type(), sh_dsp_register_sim_regno(), sh_dummy_id(), sh_dwarf2_frame_init_reg(), sh_frame_align(), sh_in_function_epilogue_p(), SH_NUM_REGS, sh_pseudo_register_read(), sh_pseudo_register_write(), sh_push_dummy_call_fpu(), sh_push_dummy_call_nofpu(), sh_register_reggroup_p(), sh_regset_from_core_section(), sh_return_in_first_hidden_param_p(), sh_return_value_fpu(), sh_return_value_nofpu(), sh_sh2a_nofpu_register_name(), sh_sh2a_register_name(), sh_sh2a_register_sim_regno(), sh_sh2a_register_type(), sh_sh2e_register_name(), sh_sh3_dsp_register_name(), sh_sh3_register_name(), sh_sh3e_register_name(), sh_sh3e_register_type(), sh_sh4_nofpu_register_name(), sh_sh4_register_name(), sh_sh4_register_type(), sh_sh4al_dsp_register_name(), sh_sh_dsp_register_name(), sh_sh_register_name(), sh_skip_prologue(), sh_unwind_pc(), sh_unwind_sp(), and XZALLOC.

Referenced by _initialize_sh_tdep().

static int sh_in_function_epilogue_p ( struct gdbarch gdbarch,
CORE_ADDR  pc 
) [static]
static void sh_init_flt_argreg ( void  ) [static]

Definition at line 948 of file sh-tdep.c.

References flt_argreg_array, and memset().

Referenced by sh_push_dummy_call_fpu().

static int sh_is_renesas_calling_convention ( struct type func_type) [static]
static const gdb_byte* sh_justify_value_in_reg ( struct gdbarch gdbarch,
struct value val,
int  len 
) [static]

Definition at line 912 of file sh-tdep.c.

References gdbarch_byte_order(), memcpy(), memset(), and value_contents().

Referenced by sh_push_dummy_call_fpu(), and sh_push_dummy_call_nofpu().

static struct sh_frame_cache* sh_make_stub_cache ( struct frame_info this_frame) [static, read]
static int sh_next_flt_argreg ( struct gdbarch gdbarch,
int  len,
struct type func_type 
) [static]
static enum register_status sh_pseudo_register_read ( struct gdbarch gdbarch,
struct regcache regcache,
int  reg_nr,
gdb_byte buffer 
) [static]
static void sh_pseudo_register_write ( struct gdbarch gdbarch,
struct regcache regcache,
int  reg_nr,
const gdb_byte buffer 
) [static]
static CORE_ADDR sh_push_dummy_call_fpu ( 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 CORE_ADDR sh_push_dummy_call_nofpu ( 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 void sh_register_convert_to_raw ( struct gdbarch gdbarch,
struct type type,
int  regnum,
const gdb_byte from,
gdb_byte to 
) [static]
static void sh_register_convert_to_virtual ( struct gdbarch gdbarch,
int  regnum,
struct type type,
gdb_byte from,
gdb_byte to 
) [static]
static int sh_register_reggroup_p ( struct gdbarch gdbarch,
int  regnum,
struct reggroup reggroup 
) [static]
static struct regset* sh_regset_from_core_section ( struct gdbarch gdbarch,
const char *  sect_name,
size_t  sect_size 
) [static, read]
static int sh_return_in_first_hidden_param_p ( struct gdbarch gdbarch,
struct type type 
) [static]

Definition at line 2231 of file sh-tdep.c.

Referenced by sh_gdbarch_init().

static enum return_value_convention sh_return_value_fpu ( struct gdbarch gdbarch,
struct value function,
struct type type,
struct regcache regcache,
gdb_byte readbuf,
const gdb_byte writebuf 
) [static]
static enum return_value_convention sh_return_value_nofpu ( struct gdbarch gdbarch,
struct value function,
struct type type,
struct regcache regcache,
gdb_byte readbuf,
const gdb_byte writebuf 
) [static]
static const char* sh_sh2a_nofpu_register_name ( struct gdbarch gdbarch,
int  reg_nr 
) [static]

Definition at line 241 of file sh-tdep.c.

Referenced by sh_gdbarch_init().

static const char* sh_sh2a_register_name ( struct gdbarch gdbarch,
int  reg_nr 
) [static]

Definition at line 201 of file sh-tdep.c.

Referenced by sh_gdbarch_init().

static int sh_sh2a_register_sim_regno ( struct gdbarch gdbarch,
int  nr 
) [static]
static struct type* sh_sh2a_register_type ( struct gdbarch gdbarch,
int  reg_nr 
) [static, read]
static const char* sh_sh2e_register_name ( struct gdbarch gdbarch,
int  reg_nr 
) [static]

Definition at line 179 of file sh-tdep.c.

Referenced by sh_gdbarch_init().

static const char* sh_sh3_dsp_register_name ( struct gdbarch gdbarch,
int  reg_nr 
) [static]

Definition at line 303 of file sh-tdep.c.

Referenced by sh_gdbarch_init().

static const char* sh_sh3_register_name ( struct gdbarch gdbarch,
int  reg_nr 
) [static]

Definition at line 135 of file sh-tdep.c.

Referenced by sh_gdbarch_init().

static const char* sh_sh3e_register_name ( struct gdbarch gdbarch,
int  reg_nr 
) [static]

Definition at line 157 of file sh-tdep.c.

Referenced by sh_gdbarch_init().

static struct type* sh_sh3e_register_type ( struct gdbarch gdbarch,
int  reg_nr 
) [static, read]
static struct type* sh_sh4_build_float_register_type ( struct gdbarch gdbarch,
int  high 
) [static, read]

Definition at line 1457 of file sh-tdep.c.

References lookup_array_range_type().

Referenced by sh_sh4_register_type().

static const char* sh_sh4_nofpu_register_name ( struct gdbarch gdbarch,
int  reg_nr 
) [static]

Definition at line 364 of file sh-tdep.c.

Referenced by sh_gdbarch_init().

static const char* sh_sh4_register_name ( struct gdbarch gdbarch,
int  reg_nr 
) [static]

Definition at line 326 of file sh-tdep.c.

Referenced by sh_gdbarch_init().

static struct type* sh_sh4_register_type ( struct gdbarch gdbarch,
int  reg_nr 
) [static, read]
static const char* sh_sh4al_dsp_register_name ( struct gdbarch gdbarch,
int  reg_nr 
) [static]

Definition at line 400 of file sh-tdep.c.

Referenced by sh_gdbarch_init().

static const char* sh_sh_dsp_register_name ( struct gdbarch gdbarch,
int  reg_nr 
) [static]

Definition at line 281 of file sh-tdep.c.

Referenced by sh_gdbarch_init().

static const char* sh_sh_register_name ( struct gdbarch gdbarch,
int  reg_nr 
) [static]

Definition at line 113 of file sh-tdep.c.

Referenced by sh_gdbarch_init().

static CORE_ADDR sh_skip_prologue ( struct gdbarch gdbarch,
CORE_ADDR  pc 
) [static]
static CORE_ADDR sh_stack_allocsize ( int  nargs,
struct value **  args 
) [static]

Definition at line 931 of file sh-tdep.c.

References TYPE_LENGTH, and value_type().

Referenced by sh_push_dummy_call_fpu(), and sh_push_dummy_call_nofpu().

static void sh_store_return_value_fpu ( struct type type,
struct regcache regcache,
const gdb_byte valbuf 
) [static]
static void sh_store_return_value_nofpu ( struct type type,
struct regcache regcache,
const gdb_byte valbuf 
) [static]
static void sh_stub_this_id ( struct frame_info this_frame,
void **  this_cache,
struct frame_id this_id 
) [static]
static int sh_stub_unwind_sniffer ( const struct frame_unwind self,
struct frame_info this_frame,
void **  this_prologue_cache 
) [static]

Definition at line 2032 of file sh-tdep.c.

References get_frame_address_in_block(), and in_plt_section().

static int sh_treat_as_flt_p ( struct type type) [static]
static CORE_ADDR sh_unwind_pc ( struct gdbarch gdbarch,
struct frame_info next_frame 
) [static]

Definition at line 1975 of file sh-tdep.c.

References frame_unwind_register_unsigned(), and gdbarch_pc_regnum().

Referenced by sh_gdbarch_init().

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

Definition at line 1968 of file sh-tdep.c.

References frame_unwind_register_unsigned(), and gdbarch_sp_regnum().

Referenced by sh_gdbarch_init().

static int sh_use_struct_convention ( int  renesas_abi,
struct type type 
) [static]
static int sh_use_struct_convention_nofpu ( int  renesas_abi,
struct type type 
) [static]

Definition at line 844 of file sh-tdep.c.

References sh_use_struct_convention(), TYPE_LENGTH, and TYPE_NFIELDS.

Referenced by sh_return_value_nofpu().

static void show_sh_command ( char *  args,
int  from_tty 
) [static]

Definition at line 2419 of file sh-tdep.c.

References all_commands, gdb_stdout, and help_list().

Referenced by _initialize_sh_tdep().


Variable Documentation

Definition at line 944 of file sh-tdep.c.

Referenced by sh_init_flt_argreg(), and sh_next_flt_argreg().

struct cmd_list_element* setshcmdlist = NULL [static]

Definition at line 59 of file sh-tdep.c.

Definition at line 70 of file sh-tdep.c.

Referenced by _initialize_sh_tdep(), and sh_is_renesas_calling_convention().

const char* const sh_cc_enum[] [static]
Initial value:

Definition at line 64 of file sh-tdep.c.

Referenced by _initialize_sh_tdep().

const char sh_cc_gcc[] = "gcc" [static]

Definition at line 62 of file sh-tdep.c.

const char sh_cc_renesas[] = "renesas" [static]

Definition at line 63 of file sh-tdep.c.

Referenced by sh_is_renesas_calling_convention().

struct regset sh_corefile_fpregset [static]
Initial value:

Definition at line 2205 of file sh-tdep.c.

Referenced by sh_regset_from_core_section().

struct frame_base sh_frame_base [static]
Initial value:

Definition at line 1997 of file sh-tdep.c.

struct frame_unwind sh_frame_unwind [static]
struct frame_unwind sh_stub_unwind [static]
struct cmd_list_element* showshcmdlist = NULL [static]

Definition at line 60 of file sh-tdep.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines