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

Go to the source code of this file.

Classes

struct  m88k_frame_cache
struct  m88k_prologue_insn

Defines

#define BITMASK(pos, width)   (((0x1 << (width)) - 1) << (pos))
#define EXTRACT_FIELD(val, pos, width)   ((val) >> (pos) & BITMASK (0, width))
#define SUBU_OFFSET(x)   ((unsigned)(x & 0xFFFF))
#define ST_OFFSET(x)   ((unsigned)((x) & 0xFFFF))
#define ST_SRC(x)   EXTRACT_FIELD ((x), 21, 5)
#define ADDU_OFFSET(x)   ((unsigned)(x & 0xFFFF))

Enumerations

enum  m88k_prologue_insn_action {
  M88K_PIA_SKIP, M88K_PIA_NOTE_ST, M88K_PIA_NOTE_STD, M88K_PIA_NOTE_SP_ADJUSTMENT,
  M88K_PIA_NOTE_FP_ASSIGNMENT, M88K_PIA_NOTE_BRANCH, M88K_PIA_NOTE_PROLOGUE_END
}

Functions

static unsigned long m88k_fetch_instruction (CORE_ADDR pc, enum bfd_endian byte_order)
static const char * m88k_register_name (struct gdbarch *gdbarch, int regnum)
static struct typem88k_register_type (struct gdbarch *gdbarch, int regnum)
static CORE_ADDR m88k_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
static const gdb_bytem88k_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len)
static CORE_ADDR m88k_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
static void m88k_write_pc (struct regcache *regcache, CORE_ADDR pc)
static int m88k_integral_or_pointer_p (const struct type *type)
static int m88k_floating_p (const struct type *type)
static int m88k_structure_or_union_p (const struct type *type)
static int m88k_8_byte_align_p (struct type *type)
static int m88k_in_register_p (struct type *type)
static CORE_ADDR m88k_store_arguments (struct regcache *regcache, int nargs, struct value **args, CORE_ADDR sp)
static CORE_ADDR m88k_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 frame_id m88k_dummy_id (struct gdbarch *arch, struct frame_info *this_frame)
static enum return_value_convention m88k_return_value (struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
static CORE_ADDR m88k_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR limit, struct m88k_frame_cache *cache)
static CORE_ADDR m88k_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
static struct m88k_frame_cachem88k_frame_cache (struct frame_info *this_frame, void **this_cache)
static void m88k_frame_this_id (struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
static struct valuem88k_frame_prev_register (struct frame_info *this_frame, void **this_cache, int regnum)
static CORE_ADDR m88k_frame_base_address (struct frame_info *this_frame, void **this_cache)
static void m88k_supply_gregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len)
static struct regsetm88k_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
static struct gdbarchm88k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
void _initialize_m88k_tdep (void)

Variables

struct m88k_prologue_insn m88k_prologue_insn_table []
const int m88k_max_prologue_size = 128 * M88K_INSN_SIZE
static struct frame_unwind m88k_frame_unwind
static struct frame_base m88k_frame_base
static struct regset m88k_gregset

Define Documentation

#define ADDU_OFFSET (   x)    ((unsigned)(x & 0xFFFF))

Definition at line 458 of file m88k-tdep.c.

Referenced by m88k_analyze_prologue().

#define BITMASK (   pos,
  width 
)    (((0x1 << (width)) - 1) << (pos))

Definition at line 453 of file m88k-tdep.c.

#define EXTRACT_FIELD (   val,
  pos,
  width 
)    ((val) >> (pos) & BITMASK (0, width))

Definition at line 454 of file m88k-tdep.c.

#define ST_OFFSET (   x)    ((unsigned)((x) & 0xFFFF))

Definition at line 456 of file m88k-tdep.c.

Referenced by m88k_analyze_prologue().

#define ST_SRC (   x)    EXTRACT_FIELD ((x), 21, 5)

Definition at line 457 of file m88k-tdep.c.

Referenced by m88k_analyze_prologue().

#define SUBU_OFFSET (   x)    ((unsigned)(x & 0xFFFF))

Definition at line 455 of file m88k-tdep.c.

Referenced by m88k_analyze_prologue().


Enumeration Type Documentation

Enumerator:
M88K_PIA_SKIP 
M88K_PIA_NOTE_ST 
M88K_PIA_NOTE_STD 
M88K_PIA_NOTE_SP_ADJUSTMENT 
M88K_PIA_NOTE_FP_ASSIGNMENT 
M88K_PIA_NOTE_BRANCH 
M88K_PIA_NOTE_PROLOGUE_END 

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


Function Documentation

void _initialize_m88k_tdep ( void  )
static int m88k_8_byte_align_p ( struct type type) [static]
static CORE_ADDR m88k_addr_bits_remove ( struct gdbarch gdbarch,
CORE_ADDR  addr 
) [static]

Definition at line 89 of file m88k-tdep.c.

Referenced by m88k_gdbarch_init(), and m88k_unwind_pc().

static CORE_ADDR m88k_analyze_prologue ( struct gdbarch gdbarch,
CORE_ADDR  pc,
CORE_ADDR  limit,
struct m88k_frame_cache cache 
) [static]
static const gdb_byte* m88k_breakpoint_from_pc ( struct gdbarch gdbarch,
CORE_ADDR pc,
int len 
) [static]

Definition at line 104 of file m88k-tdep.c.

Referenced by m88k_gdbarch_init().

static struct frame_id m88k_dummy_id ( struct gdbarch arch,
struct frame_info this_frame 
) [static, read]
static unsigned long m88k_fetch_instruction ( CORE_ADDR  pc,
enum bfd_endian  byte_order 
) [static]

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

References read_memory_unsigned_integer().

Referenced by m88k_analyze_prologue().

static int m88k_floating_p ( const struct type type) [static]

Definition at line 186 of file m88k-tdep.c.

References len, TYPE_CODE, TYPE_CODE_FLT, and TYPE_LENGTH.

Referenced by m88k_8_byte_align_p(), m88k_in_register_p(), and m88k_return_value().

static CORE_ADDR m88k_frame_base_address ( struct frame_info this_frame,
void **  this_cache 
) [static]
static struct m88k_frame_cache* m88k_frame_cache ( struct frame_info this_frame,
void **  this_cache 
) [static, read]
static struct value* m88k_frame_prev_register ( struct frame_info this_frame,
void **  this_cache,
int  regnum 
) [static, read]
static void m88k_frame_this_id ( struct frame_info this_frame,
void **  this_cache,
struct frame_id this_id 
) [static]
static struct gdbarch* m88k_gdbarch_init ( struct gdbarch_info  info,
struct gdbarch_list arches 
) [static, read]
static int m88k_in_register_p ( struct type type) [static]
static int m88k_integral_or_pointer_p ( const struct type type) [static]
static CORE_ADDR m88k_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* m88k_register_name ( struct gdbarch gdbarch,
int  regnum 
) [static]

Definition at line 52 of file m88k-tdep.c.

References gdbarch_tdep::register_names, and regnum.

Referenced by m88k_gdbarch_init().

static struct type* m88k_register_type ( struct gdbarch gdbarch,
int  regnum 
) [static, read]
static struct regset* m88k_regset_from_core_section ( struct gdbarch gdbarch,
const char *  sect_name,
size_t  sect_size 
) [static, read]

Definition at line 812 of file m88k-tdep.c.

References m88k_gregset, and M88K_NUM_REGS.

Referenced by m88k_gdbarch_init().

static enum return_value_convention m88k_return_value ( struct gdbarch gdbarch,
struct value function,
struct type type,
struct regcache regcache,
gdb_byte readbuf,
const gdb_byte writebuf 
) [static]
static CORE_ADDR m88k_skip_prologue ( struct gdbarch gdbarch,
CORE_ADDR  pc 
) [static]
static CORE_ADDR m88k_store_arguments ( struct regcache regcache,
int  nargs,
struct value **  args,
CORE_ADDR  sp 
) [static]
static int m88k_structure_or_union_p ( const struct type type) [static]

Definition at line 205 of file m88k-tdep.c.

References TYPE_CODE, TYPE_CODE_STRUCT, and TYPE_CODE_UNION.

Referenced by m88k_8_byte_align_p(), and m88k_in_register_p().

static void m88k_supply_gregset ( const struct regset regset,
struct regcache regcache,
int  regnum,
const void *  gregs,
size_t  len 
) [static]

Definition at line 786 of file m88k-tdep.c.

References M88K_NUM_REGS, and regcache_raw_supply().

static CORE_ADDR m88k_unwind_pc ( struct gdbarch gdbarch,
struct frame_info next_frame 
) [static]
static void m88k_write_pc ( struct regcache regcache,
CORE_ADDR  pc 
) [static]

Variable Documentation

struct frame_base m88k_frame_base [static]
Initial value:

Definition at line 770 of file m88k-tdep.c.

struct regset m88k_gregset [static]
Initial value:

Definition at line 802 of file m88k-tdep.c.

Referenced by m88k_regset_from_core_section().

Definition at line 627 of file m88k-tdep.c.

Referenced by m88k_skip_prologue().

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

Referenced by m88k_analyze_prologue().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines