GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions | Variables
tilegx-tdep.c File Reference
#include "defs.h"
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
#include "dwarf2/frame.h"
#include "trad-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 "arch-utils.h"
#include "regcache.h"
#include "regset.h"
#include "osabi.h"
#include "linux-tdep.h"
#include "objfiles.h"
#include "solib-svr4.h"
#include "tilegx-tdep.h"
#include "opcode/tilegx.h"
#include <algorithm>
#include "gdbsupport/byte-vector.h"

Go to the source code of this file.

Classes

struct  tilegx_frame_cache
 
struct  tilegx_reverse_regs
 

Macros

#define INT_SWINT_1_SIGRETURN   (~0)
 

Enumerations

enum  reverse_state { REVERSE_STATE_REGISTER , REVERSE_STATE_VALUE , REVERSE_STATE_UNKNOWN }
 

Functions

static const char * tilegx_register_name (struct gdbarch *gdbarch, int regnum)
 
static struct typetilegx_register_type (struct gdbarch *gdbarch, int regnum)
 
static int tilegx_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int num)
 
static int tilegx_type_is_scalar (struct type *t)
 
static int tilegx_use_struct_convention (struct type *type)
 
static void tilegx_extract_return_value (struct type *type, struct regcache *regcache, gdb_byte *valbuf)
 
static void tilegx_store_return_value (struct type *type, struct regcache *regcache, const void *valbuf)
 
static enum return_value_convention tilegx_return_value (struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
 
static CORE_ADDR tilegx_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
 
static CORE_ADDR tilegx_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, function_call_return_method return_method, CORE_ADDR struct_addr)
 
static CORE_ADDR tilegx_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR start_addr, CORE_ADDR end_addr, struct tilegx_frame_cache *cache, frame_info_ptr next_frame)
 
static CORE_ADDR tilegx_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
 
static int tilegx_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
 
static int tilegx_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc)
 
static void tilegx_write_pc (struct regcache *regcache, CORE_ADDR pc)
 
typedef BP_MANIPULATION (tilegx_break_insn)
 
static struct valuetilegx_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum)
 
static void tilegx_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id)
 
static CORE_ADDR tilegx_frame_base_address (frame_info_ptr this_frame, void **this_cache)
 
static int tilegx_cannot_reference_register (struct gdbarch *gdbarch, int regno)
 
static struct gdbarchtilegx_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
void _initialize_tilegx_tdep ()
 

Variables

static const struct tilegx_reverse_regs template_reverse_regs [TILEGX_NUM_PHYS_REGS]
 
constexpr gdb_byte tilegx_break_insn []
 
static const struct frame_unwind tilegx_frame_unwind
 
static const struct frame_base tilegx_frame_base
 

Macro Definition Documentation

◆ INT_SWINT_1_SIGRETURN

#define INT_SWINT_1_SIGRETURN   (~0)

Definition at line 800 of file tilegx-tdep.c.

Referenced by tilegx_write_pc().

Enumeration Type Documentation

◆ reverse_state

Enumerator
REVERSE_STATE_REGISTER 
REVERSE_STATE_VALUE 
REVERSE_STATE_UNKNOWN 

Definition at line 57 of file tilegx-tdep.c.

Function Documentation

◆ _initialize_tilegx_tdep()

void _initialize_tilegx_tdep ( )

Definition at line 1025 of file tilegx-tdep.c.

References gdbarch_register(), and tilegx_gdbarch_init().

◆ BP_MANIPULATION()

typedef BP_MANIPULATION ( tilegx_break_insn )

◆ tilegx_analyze_prologue()

static CORE_ADDR tilegx_analyze_prologue ( struct gdbarch * gdbarch,
CORE_ADDR start_addr,
CORE_ADDR end_addr,
struct tilegx_frame_cache * cache,
frame_info_ptr next_frame )
static

◆ tilegx_cannot_reference_register()

static int tilegx_cannot_reference_register ( struct gdbarch * gdbarch,
int regno )
static

Definition at line 924 of file tilegx-tdep.c.

References TILEGX_FAULTNUM_REGNUM, TILEGX_NUM_EASY_REGS, and TILEGX_PC_REGNUM.

Referenced by tilegx_gdbarch_init().

◆ tilegx_dwarf2_reg_to_regnum()

static int tilegx_dwarf2_reg_to_regnum ( struct gdbarch * gdbarch,
int num )
static

Definition at line 176 of file tilegx-tdep.c.

Referenced by tilegx_gdbarch_init().

◆ tilegx_extract_return_value()

static void tilegx_extract_return_value ( struct type * type,
struct regcache * regcache,
gdb_byte * valbuf )
static

◆ tilegx_frame_align()

static CORE_ADDR tilegx_frame_align ( struct gdbarch * gdbarch,
CORE_ADDR addr )
static

Definition at line 266 of file tilegx-tdep.c.

Referenced by tilegx_gdbarch_init(), and tilegx_push_dummy_call().

◆ tilegx_frame_base_address()

static CORE_ADDR tilegx_frame_base_address ( frame_info_ptr this_frame,
void ** this_cache )
static

Definition at line 895 of file tilegx-tdep.c.

References tilegx_frame_cache::base.

◆ tilegx_frame_prev_register()

static struct value * tilegx_frame_prev_register ( frame_info_ptr this_frame,
void ** this_cache,
int regnum )
static

Definition at line 867 of file tilegx-tdep.c.

References regnum, and trad_frame_get_prev_register().

◆ tilegx_frame_this_id()

static void tilegx_frame_this_id ( frame_info_ptr this_frame,
void ** this_cache,
struct frame_id * this_id )
static

Definition at line 881 of file tilegx-tdep.c.

References frame_id_build().

◆ tilegx_gdbarch_init()

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

Definition at line 936 of file tilegx-tdep.c.

References arches, core_addr_lessthan(), dwarf2_append_unwinders(), frame_base_set_default(), frame_unwind_append_unwinder(), gdbarch_alloc(), gdbarch_init_osabi(), gdbarch_list_lookup_by_info(), gdbarch_ptr_bit(), gdbarch::info(), set_gdbarch_addr_bit(), set_gdbarch_breakpoint_kind_from_pc(), set_gdbarch_cannot_fetch_register(), set_gdbarch_cannot_store_register(), set_gdbarch_double_bit(), set_gdbarch_dwarf2_reg_to_regnum(), set_gdbarch_float_bit(), set_gdbarch_frame_align(), set_gdbarch_get_longjmp_target(), 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_ptr_bit(), set_gdbarch_push_dummy_call(), set_gdbarch_register_name(), set_gdbarch_register_type(), set_gdbarch_return_value(), set_gdbarch_short_bit(), set_gdbarch_skip_prologue(), set_gdbarch_sp_regnum(), set_gdbarch_stack_frame_destroyed_p(), set_gdbarch_sw_breakpoint_from_kind(), set_gdbarch_write_pc(), tilegx_cannot_reference_register(), tilegx_dwarf2_reg_to_regnum(), tilegx_frame_align(), tilegx_frame_base, tilegx_frame_unwind, tilegx_get_longjmp_target(), TILEGX_NUM_REGS, TILEGX_PC_REGNUM, tilegx_push_dummy_call(), tilegx_register_name(), tilegx_register_type(), tilegx_return_value(), tilegx_skip_prologue(), TILEGX_SP_REGNUM, tilegx_stack_frame_destroyed_p(), and tilegx_write_pc().

Referenced by _initialize_tilegx_tdep().

◆ tilegx_get_longjmp_target()

static int tilegx_get_longjmp_target ( frame_info_ptr frame,
CORE_ADDR * pc )
static

◆ tilegx_push_dummy_call()

static CORE_ADDR tilegx_push_dummy_call ( struct gdbarch * gdbarch,
struct value * function,
struct regcache * regcache,
CORE_ADDR bp_addr,
int nargs,
struct value ** args,
CORE_ADDR sp,
function_call_return_method return_method,
CORE_ADDR struct_addr )
static

◆ tilegx_register_name()

static const char * tilegx_register_name ( struct gdbarch * gdbarch,
int regnum )
static

Definition at line 143 of file tilegx-tdep.c.

References gdb_static_assert(), regnum, and TILEGX_NUM_REGS.

Referenced by tilegx_gdbarch_init().

◆ tilegx_register_type()

static struct type * tilegx_register_type ( struct gdbarch * gdbarch,
int regnum )
static

◆ tilegx_return_value()

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

◆ tilegx_skip_prologue()

static CORE_ADDR tilegx_skip_prologue ( struct gdbarch * gdbarch,
CORE_ADDR start_pc )
static

◆ tilegx_stack_frame_destroyed_p()

static int tilegx_stack_frame_destroyed_p ( struct gdbarch * gdbarch,
CORE_ADDR pc )
static

Definition at line 758 of file tilegx-tdep.c.

References obj_section::addr(), and find_pc_partial_function().

Referenced by tilegx_gdbarch_init().

◆ tilegx_store_return_value()

static void tilegx_store_return_value ( struct type * type,
struct regcache * regcache,
const void * valbuf )
static

◆ tilegx_type_is_scalar()

static int tilegx_type_is_scalar ( struct type * t)
static

Definition at line 185 of file tilegx-tdep.c.

References type::code().

Referenced by tilegx_use_struct_convention().

◆ tilegx_use_struct_convention()

static int tilegx_use_struct_convention ( struct type * type)
static

◆ tilegx_write_pc()

static void tilegx_write_pc ( struct regcache * regcache,
CORE_ADDR pc )
static

Variable Documentation

◆ template_reverse_regs

const struct tilegx_reverse_regs template_reverse_regs[TILEGX_NUM_PHYS_REGS]
static

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

Referenced by tilegx_analyze_prologue().

◆ tilegx_break_insn

constexpr gdb_byte tilegx_break_insn[]
constexpr
Initial value:
=
{ 0x00, 0x50, 0x48, 0x51, 0xae, 0x44, 0x6a, 0x28 }

Definition at line 828 of file tilegx-tdep.c.

◆ tilegx_frame_base

const struct frame_base tilegx_frame_base
static
Initial value:
= {
}
static const struct frame_unwind tilegx_frame_unwind
static CORE_ADDR tilegx_frame_base_address(frame_info_ptr this_frame, void **this_cache)

Definition at line 914 of file tilegx-tdep.c.

Referenced by tilegx_gdbarch_init().

◆ tilegx_frame_unwind

const struct frame_unwind tilegx_frame_unwind
static
Initial value:
= {
"tilegx prologue",
NULL,
NULL
}
int default_frame_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_prologue_cache)
enum unwind_stop_reason default_frame_unwind_stop_reason(frame_info_ptr this_frame, void **this_cache)
@ NORMAL_FRAME
Definition frame.h:187
static void tilegx_frame_this_id(frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id)
static struct value * tilegx_frame_prev_register(frame_info_ptr this_frame, void **this_cache, int regnum)

Definition at line 903 of file tilegx-tdep.c.

Referenced by tilegx_gdbarch_init().