GDB (xrefs)
Classes | Macros | Enumerations | Functions | Variables
/tmp/gdb-8.1/gdb/ft32-tdep.c File Reference
#include "defs.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "gdbcmd.h"
#include "gdbcore.h"
#include "value.h"
#include "inferior.h"
#include "symfile.h"
#include "objfiles.h"
#include "osabi.h"
#include "language.h"
#include "arch-utils.h"
#include "regcache.h"
#include "trad-frame.h"
#include "dis-asm.h"
#include "record.h"
#include "opcode/ft32.h"
#include "ft32-tdep.h"
#include "gdb/sim-ft32.h"
#include <algorithm>

Go to the source code of this file.

Classes

struct  ft32_frame_cache
 

Macros

#define RAM_BIAS   0x800000 /* Bias added to RAM addresses. */
 

Enumerations

enum  { REG_UNAVAIL = (CORE_ADDR) (-1) }
 

Functions

static CORE_ADDR ft32_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
 
typedef BP_MANIPULATION (ft32_break_insn)
 
static const char * ft32_register_name (struct gdbarch *gdbarch, int reg_nr)
 
static struct typeft32_register_type (struct gdbarch *gdbarch, int reg_nr)
 
static void ft32_store_return_value (struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
 
static ULONGEST ft32_fetch_instruction (CORE_ADDR a, int *isize, enum bfd_endian byte_order)
 
static CORE_ADDR ft32_analyze_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr, struct ft32_frame_cache *cache, struct gdbarch *gdbarch)
 
static CORE_ADDR ft32_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 
static CORE_ADDR ft32_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
 
static int ft32_address_class_type_flags (int byte_size, int dwarf2_addr_class)
 
static const char * ft32_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
 
static int ft32_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
 
static CORE_ADDR ft32_read_pc (struct regcache *regcache)
 
static void ft32_write_pc (struct regcache *regcache, CORE_ADDR val)
 
static CORE_ADDR ft32_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
 
static void ft32_extract_return_value (struct type *type, struct regcache *regcache, gdb_byte *dst)
 
static enum return_value_convention ft32_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
 
static struct ft32_frame_cacheft32_alloc_frame_cache (void)
 
static struct ft32_frame_cacheft32_frame_cache (struct frame_info *this_frame, void **this_cache)
 
static CORE_ADDR ft32_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
 
static void ft32_frame_this_id (struct frame_info *this_frame, void **this_prologue_cache, struct frame_id *this_id)
 
static struct valueft32_frame_prev_register (struct frame_info *this_frame, void **this_prologue_cache, int regnum)
 
static CORE_ADDR ft32_frame_base_address (struct frame_info *this_frame, void **this_cache)
 
static struct frame_id ft32_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
 
static struct gdbarchft32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
void _initialize_ft32_tdep (void)
 

Variables

constexpr gdb_byte ft32_break_insn [] = { 0x02, 0x00, 0x34, 0x00 }
 
static const struct frame_unwind ft32_frame_unwind
 
static const struct frame_base ft32_frame_base
 

Macro Definition Documentation

◆ RAM_BIAS

#define RAM_BIAS   0x800000 /* Bias added to RAM addresses. */

Definition at line 46 of file ft32-tdep.c.

Referenced by ft32_frame_prev_register(), and ft32_pointer_to_address().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
REG_UNAVAIL 

Definition at line 49 of file ft32-tdep.c.

Function Documentation

◆ _initialize_ft32_tdep()

void _initialize_ft32_tdep ( void  )

Definition at line 675 of file ft32-tdep.c.

References ft32_gdbarch_init(), and register_gdbarch_init().

◆ BP_MANIPULATION()

typedef BP_MANIPULATION ( ft32_break_insn  )

Definition at line 80 of file ft32-tdep.c.

◆ ft32_address_class_name_to_type_flags()

static int ft32_address_class_name_to_type_flags ( struct gdbarch gdbarch,
const char *  name,
int *  type_flags_ptr 
)
static

Definition at line 373 of file ft32-tdep.c.

References name, and TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1.

Referenced by ft32_gdbarch_init().

◆ ft32_address_class_type_flags()

static int ft32_address_class_type_flags ( int  byte_size,
int  dwarf2_addr_class 
)
static

Definition at line 345 of file ft32-tdep.c.

References TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1.

Referenced by ft32_gdbarch_init().

◆ ft32_address_class_type_flags_to_name()

static const char* ft32_address_class_type_flags_to_name ( struct gdbarch gdbarch,
int  type_flags 
)
static

Definition at line 360 of file ft32-tdep.c.

References TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1.

Referenced by ft32_gdbarch_init().

◆ ft32_alloc_frame_cache()

static struct ft32_frame_cache* ft32_alloc_frame_cache ( void  )
static

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

References FRAME_OBSTACK_ZALLOC, REG_UNAVAIL, and ft32_frame_cache::saved_regs.

Referenced by ft32_frame_cache().

◆ ft32_analyze_prologue()

static CORE_ADDR ft32_analyze_prologue ( CORE_ADDR  start_addr,
CORE_ADDR  end_addr,
struct ft32_frame_cache cache,
struct gdbarch gdbarch 
)
static

◆ ft32_dummy_id()

static struct frame_id ft32_dummy_id ( struct gdbarch gdbarch,
struct frame_info this_frame 
)
static

Definition at line 591 of file ft32-tdep.c.

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

Referenced by ft32_gdbarch_init().

◆ ft32_extract_return_value()

static void ft32_extract_return_value ( struct type type,
struct regcache regcache,
gdb_byte dst 
)
static

◆ ft32_fetch_instruction()

static ULONGEST ft32_fetch_instruction ( CORE_ADDR  a,
int *  isize,
enum bfd_endian  byte_order 
)
static

Definition at line 146 of file ft32-tdep.c.

References gdbarch::byte_order, and read_code_unsigned_integer().

Referenced by ft32_analyze_prologue().

◆ ft32_frame_align()

static CORE_ADDR ft32_frame_align ( struct gdbarch gdbarch,
CORE_ADDR  sp 
)
static

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

Referenced by ft32_gdbarch_init().

◆ ft32_frame_base_address()

static CORE_ADDR ft32_frame_base_address ( struct frame_info this_frame,
void **  this_cache 
)
static

Definition at line 574 of file ft32-tdep.c.

References ft32_frame_cache::base, and ft32_frame_cache().

◆ ft32_frame_cache()

static struct ft32_frame_cache* ft32_frame_cache ( struct frame_info this_frame,
void **  this_cache 
)
static

◆ ft32_frame_prev_register()

static struct value* ft32_frame_prev_register ( struct frame_info this_frame,
void **  this_prologue_cache,
int  regnum 
)
static

◆ ft32_frame_this_id()

static void ft32_frame_this_id ( struct frame_info this_frame,
void **  this_prologue_cache,
struct frame_id this_id 
)
static

◆ ft32_gdbarch_init()

static struct gdbarch* ft32_gdbarch_init ( struct gdbarch_info  info,
struct gdbarch_list arches 
)
static

◆ ft32_pointer_to_address()

static CORE_ADDR ft32_pointer_to_address ( struct gdbarch gdbarch,
struct type type,
const gdb_byte buf 
)
static

◆ ft32_read_pc()

static CORE_ADDR ft32_read_pc ( struct regcache regcache)
static

Definition at line 390 of file ft32-tdep.c.

References ft32_frame_cache::pc, and regcache_cooked_read_unsigned().

Referenced by ft32_gdbarch_init().

◆ ft32_register_name()

static const char* ft32_register_name ( struct gdbarch gdbarch,
int  reg_nr 
)
static

Definition at line 97 of file ft32-tdep.c.

Referenced by ft32_gdbarch_init().

◆ ft32_register_type()

static struct type* ft32_register_type ( struct gdbarch gdbarch,
int  reg_nr 
)
static

◆ ft32_return_value()

static enum return_value_convention ft32_return_value ( struct gdbarch gdbarch,
struct value function,
struct type valtype,
struct regcache regcache,
gdb_byte readbuf,
const gdb_byte writebuf 
)
static

◆ ft32_skip_prologue()

static CORE_ADDR ft32_skip_prologue ( struct gdbarch gdbarch,
CORE_ADDR  pc 
)
static

◆ ft32_store_return_value()

static void ft32_store_return_value ( struct type type,
struct regcache regcache,
const gdb_byte valbuf 
)
static

◆ ft32_unwind_pc()

static CORE_ADDR ft32_unwind_pc ( struct gdbarch gdbarch,
struct frame_info next_frame 
)
static

Definition at line 518 of file ft32-tdep.c.

References frame_unwind_register_unsigned().

Referenced by ft32_gdbarch_init().

◆ ft32_unwind_sp()

static CORE_ADDR ft32_unwind_sp ( struct gdbarch gdbarch,
struct frame_info next_frame 
)
static

Definition at line 409 of file ft32-tdep.c.

References frame_unwind_register_unsigned().

Referenced by ft32_gdbarch_init().

◆ ft32_write_pc()

static void ft32_write_pc ( struct regcache regcache,
CORE_ADDR  val 
)
static

Definition at line 401 of file ft32-tdep.c.

References regcache_cooked_write_unsigned().

Referenced by ft32_gdbarch_init().

Variable Documentation

◆ ft32_break_insn

constexpr gdb_byte ft32_break_insn[] = { 0x02, 0x00, 0x34, 0x00 }

Definition at line 78 of file ft32-tdep.c.

◆ ft32_frame_base

const struct frame_base ft32_frame_base
static
Initial value:
=
{
}
static CORE_ADDR ft32_frame_base_address(struct frame_info *this_frame, void **this_cache)
Definition: ft32-tdep.c:574
static const struct frame_unwind ft32_frame_unwind
Definition: ft32-tdep.c:561

Definition at line 582 of file ft32-tdep.c.

Referenced by ft32_gdbarch_init().

◆ ft32_frame_unwind

const struct frame_unwind ft32_frame_unwind
static
Initial value:
=
{
NULL,
}
static void ft32_frame_this_id(struct frame_info *this_frame, void **this_prologue_cache, struct frame_id *this_id)
Definition: ft32-tdep.c:527
static struct value * ft32_frame_prev_register(struct frame_info *this_frame, void **this_prologue_cache, int regnum)
Definition: ft32-tdep.c:543
int default_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
Definition: frame-unwind.c:174
enum unwind_stop_reason default_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
Definition: frame-unwind.c:184

Definition at line 561 of file ft32-tdep.c.

Referenced by ft32_gdbarch_init().