GDB (xrefs)
Classes | Macros | Enumerations | Functions | Variables
/tmp/gdb-7.10/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 "m88k-tdep.h"

Go to the source code of this file.

Classes

struct  m88k_frame_cache
 
struct  m88k_prologue_insn
 

Macros

#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 void m88k_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
 
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 const struct frame_unwind m88k_frame_unwind
 
static const struct frame_base m88k_frame_base
 
static const struct regset m88k_gregset
 

Macro Definition Documentation

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

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

Referenced by m88k_analyze_prologue().

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

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

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

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

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

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

Referenced by m88k_analyze_prologue().

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

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

Referenced by m88k_analyze_prologue().

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

Definition at line 452 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 460 of file m88k-tdep.c.

Function Documentation

void _initialize_m88k_tdep ( void  )

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

References gdbarch_register(), and m88k_gdbarch_init().

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 86 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 101 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
static unsigned long m88k_fetch_instruction ( CORE_ADDR  pc,
enum bfd_endian  byte_order 
)
static

Definition at line 39 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 183 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
static struct value* m88k_frame_prev_register ( struct frame_info this_frame,
void **  this_cache,
int  regnum 
)
static
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
static int m88k_in_register_p ( struct type type)
static
static int m88k_integral_or_pointer_p ( const struct type type)
static
static void m88k_iterate_over_regset_sections ( struct gdbarch gdbarch,
iterate_over_regset_sections_cb cb,
void *  cb_data,
const struct regcache regcache 
)
static

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

References M88K_NUM_REGS.

Referenced by m88k_gdbarch_init().

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 49 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
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 202 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 783 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

const struct frame_base m88k_frame_base
static
Initial value:
=
{
m88k_frame_base_address
}
static CORE_ADDR m88k_frame_base_address(struct frame_info *this_frame, void **this_cache)
Definition: m88k-tdep.c:757
static const struct frame_unwind m88k_frame_unwind
Definition: m88k-tdep.c:745

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

const struct frame_unwind m88k_frame_unwind
static
Initial value:
=
{
NULL,
}
static struct value * m88k_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
Definition: m88k-tdep.c:720
int default_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
Definition: frame-unwind.c:170
static void m88k_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
Definition: m88k-tdep.c:707
enum unwind_stop_reason default_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
Definition: frame-unwind.c:180

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

const struct regset m88k_gregset
static
Initial value:
=
{
NULL,
}
static void m88k_supply_gregset(const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len)
Definition: m88k-tdep.c:783

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

const int m88k_max_prologue_size = 128 * M88K_INSN_SIZE

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

Referenced by m88k_skip_prologue().

struct m88k_prologue_insn m88k_prologue_insn_table[]

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

Referenced by m88k_analyze_prologue().