GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions | Variables
/tmp/gdb-13.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 type_instance_flags 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, type_instance_flags type_flags)
 
static bool ft32_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, type_instance_flags *type_flags_ptr)
 
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 (frame_info_ptr this_frame, void **this_cache)
 
static void ft32_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id)
 
static struct valueft32_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum)
 
static CORE_ADDR ft32_frame_base_address (frame_info_ptr this_frame, void **this_cache)
 
static struct gdbarchft32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
void _initialize_ft32_tdep ()
 

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.

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 ( )

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

References ft32_gdbarch_init(), and gdbarch_register().

◆ 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 bool ft32_address_class_name_to_type_flags ( struct gdbarch gdbarch,
const char *  name,
type_instance_flags *  type_flags_ptr 
)
static

Definition at line 374 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 type_instance_flags 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,
type_instance_flags  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 436 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_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 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 ( frame_info_ptr  this_frame,
void **  this_cache 
)
static

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

References ft32_frame_cache::base.

◆ ft32_frame_cache()

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

◆ ft32_frame_prev_register()

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

◆ ft32_frame_this_id()

static void ft32_frame_this_id ( frame_info_ptr  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_register_name()

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

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

References gdb_static_assert().

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

Variable Documentation

◆ ft32_break_insn

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

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

◆ ft32_frame_base

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

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

Referenced by ft32_gdbarch_init().

◆ ft32_frame_unwind

const struct frame_unwind ft32_frame_unwind
static
Initial value:
=
{
"ft32 prologue",
NULL,
}
int default_frame_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_prologue_cache)
Definition: frame-unwind.c:217
enum unwind_stop_reason default_frame_unwind_stop_reason(frame_info_ptr this_frame, void **this_cache)
Definition: frame-unwind.c:227
@ NORMAL_FRAME
Definition: frame.h:179
static void ft32_frame_this_id(frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id)
Definition: ft32-tdep.c:492
static struct value * ft32_frame_prev_register(frame_info_ptr this_frame, void **this_prologue_cache, int regnum)
Definition: ft32-tdep.c:508

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

Referenced by ft32_gdbarch_init().