GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions | Variables
xtensa-tdep.c File Reference
#include "defs.h"
#include "frame.h"
#include "solib-svr4.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "gdbcore.h"
#include "value.h"
#include "osabi.h"
#include "regcache.h"
#include "reggroups.h"
#include "regset.h"
#include "dwarf2/frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
#include "arch-utils.h"
#include "gdbarch.h"
#include "command.h"
#include "gdbcmd.h"
#include "xtensa-isa.h"
#include "xtensa-tdep.h"
#include "xtensa-config.h"
#include <algorithm>

Go to the source code of this file.

Classes

struct  xtensa_windowed_frame_cache
 
struct  xtensa_c0reg
 
struct  xtensa_call0_frame_cache
 
struct  xtensa_frame_cache
 

Macros

#define DEBUGWARN(args...)
 
#define DEBUGINFO(args...)
 
#define DEBUGTRACE(args...)
 
#define DEBUGVERB(args...)
 
#define SP_ALIGNMENT   16
 
#define ARGS_NUM_REGS   6
 
#define REGISTER_SIZE   4
 
#define PS_CALLINC_SHIFT   16
 
#define PS_CALLINC_MASK   0x00030000
 
#define CALLINC(ps)   (((ps) & PS_CALLINC_MASK) >> PS_CALLINC_SHIFT)
 
#define WINSIZE(ra)   (4 * (( (ra) >> 30) & 0x3))
 
#define TX_PS   0x20
 
#define ARG_NOF(tdep)
 
#define ARG_1ST(tdep)
 
#define XTENSA_IS_ENTRY(gdbarch, op1)
 
#define XTENSA_ENTRY_LENGTH   3
 
#define PS_WOE   (1<<18)
 
#define PS_EXC   (1<<4)
 
#define XTENSA_MAX_REGISTER_SIZE   64
 
#define SAVE_REST_FLAGS
 
#define SAVE_REST_VALID
 
#define XTENSA_NUM_SAVED_AREGS   12
 
#define C0_MAXOPDS
 
#define C0_CLESV   12 /* Callee-saved registers are here and up. */
 
#define C0_SP   1 /* Register used as SP. */
 
#define C0_FP   15 /* Register used as FP. */
 
#define C0_RA   0 /* Register used as return address. */
 
#define C0_ARGS   2 /* Register used as first arg/retval. */
 
#define C0_NARGS   6 /* Number of A-regs for args/retvals. */
 
#define C0_CONST   -1 /* fr_reg value if register contains a constant. */
 
#define C0_INEXP   -2 /* fr_reg value if inexpressible as reg + offset. */
 
#define C0_NOSTK   -1 /* to_stk value if register has not been stored. */
 
#define XTENSA_ISA_BSZ   32 /* Instruction buffer size. */
 
#define XTENSA_ISA_BADPC   ((CORE_ADDR)0) /* Bad PC value. */
 
#define RETURN_FP   goto done
 
#define BIG_BREAKPOINT   { 0x00, 0x04, 0x00 }
 
#define LITTLE_BREAKPOINT   { 0x00, 0x40, 0x00 }
 
#define DENSITY_BIG_BREAKPOINT   { 0xd2, 0x0f }
 
#define DENSITY_LITTLE_BREAKPOINT   { 0x2d, 0xf0 }
 
#define RETURN_RET   goto done
 
#define XTENSA_MAX_WINDOW_INTERRUPT_HANDLER_LEN   200
 
#define XTENSA_DBREGN_SREG(n)   (0x0200+(n))
 
#define XTENSA_DBREGN_UREG(n)   (0x0300+(n))
 

Typedefs

typedef struct xtensa_windowed_frame_cache xtensa_windowed_frame_cache_t
 
typedef struct xtensa_c0reg xtensa_c0reg_t
 
typedef struct xtensa_call0_frame_cache xtensa_call0_frame_cache_t
 
typedef struct xtensa_frame_cache xtensa_frame_cache_t
 

Enumerations

enum  xtensa_insn_kind {
  c0opc_illegal , c0opc_uninteresting , c0opc_flow , c0opc_entry ,
  c0opc_break , c0opc_add , c0opc_addi , c0opc_and ,
  c0opc_sub , c0opc_mov , c0opc_movi , c0opc_l32r ,
  c0opc_s32i , c0opc_rwxsr , c0opc_l32e , c0opc_s32e ,
  c0opc_rfwo , c0opc_rfwu , c0opc_NrOf
}
 
enum  xtensa_exception_handler_t { xtWindowOverflow , xtWindowUnderflow , xtNoExceptionHandler }
 

Functions

static int windowing_enabled (struct gdbarch *gdbarch, unsigned int ps)
 
static int arreg_number (struct gdbarch *gdbarch, int a_regnum, ULONGEST wb)
 
static int areg_number (struct gdbarch *gdbarch, int ar_regnum, unsigned int wb)
 
static unsigned long xtensa_read_register (int regnum)
 
static void xtensa_write_register (int regnum, ULONGEST value)
 
static int extract_call_winsize (struct gdbarch *gdbarch, CORE_ADDR pc)
 
static int xtensa_find_register_by_name (struct gdbarch *gdbarch, const char *name)
 
static const char * xtensa_register_name (struct gdbarch *gdbarch, int regnum)
 
static struct typextensa_register_type (struct gdbarch *gdbarch, int regnum)
 
static int xtensa_reg_to_regnum (struct gdbarch *gdbarch, int regnum)
 
static void xtensa_register_write_masked (struct regcache *regcache, xtensa_register_t *reg, const gdb_byte *buffer)
 
static enum register_status xtensa_register_read_masked (readable_regcache *regcache, xtensa_register_t *reg, gdb_byte *buffer)
 
static enum register_status xtensa_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache, int regnum, gdb_byte *buffer)
 
static void xtensa_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int regnum, const gdb_byte *buffer)
 
static void xtensa_init_reggroups (void)
 
static void xtensa_add_reggroups (struct gdbarch *gdbarch)
 
static int xtensa_coprocessor_register_group (const struct reggroup *group)
 
static int xtensa_register_reggroup_p (struct gdbarch *gdbarch, int regnum, const struct reggroup *group)
 
static void xtensa_supply_gregset (const struct regset *regset, struct regcache *rc, int regnum, const void *gregs, size_t len)
 
static void xtensa_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
 
static struct xtensa_frame_cachextensa_alloc_frame_cache (int windowed)
 
static CORE_ADDR xtensa_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
 
static CORE_ADDR xtensa_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
 
static struct frame_id xtensa_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
 
static int xtensa_window_interrupt_insn (struct gdbarch *gdbarch, CORE_ADDR pc)
 
static unsigned int xtensa_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR current_pc)
 
static void call0_frame_cache (frame_info_ptr this_frame, xtensa_frame_cache_t *cache, CORE_ADDR pc)
 
static void xtensa_window_interrupt_frame_cache (frame_info_ptr this_frame, xtensa_frame_cache_t *cache, CORE_ADDR pc)
 
static struct xtensa_frame_cache * xtensa_frame_cache (frame_info_ptr this_frame, void **this_cache)
 
static void warning_once (void)
 
static void xtensa_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id)
 
static struct valuextensa_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum)
 
static CORE_ADDR xtensa_frame_base_address (frame_info_ptr this_frame, void **this_cache)
 
static void xtensa_extract_return_value (struct type *type, struct regcache *regcache, void *dst)
 
static void xtensa_store_return_value (struct type *type, struct regcache *regcache, const void *dst)
 
static enum return_value_convention xtensa_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
 
static CORE_ADDR xtensa_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 int xtensa_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
 
static const gdb_byte * xtensa_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
 
static int call0_ret (CORE_ADDR start_pc, CORE_ADDR finish_pc)
 
static int rwx_special_register (const char *opcname)
 
static xtensa_insn_kind call0_classify_opcode (xtensa_isa isa, xtensa_opcode opc)
 
static int call0_track_op (struct gdbarch *gdbarch, xtensa_c0reg_t dst[], xtensa_c0reg_t src[], xtensa_insn_kind opclass, int nods, unsigned odv[], CORE_ADDR pc, int spreg, xtensa_frame_cache_t *cache)
 
static CORE_ADDR call0_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR start, CORE_ADDR pc, int nregs, xtensa_frame_cache_t *cache)
 
static void execute_l32e (struct gdbarch *gdbarch, int at, int as, int offset, CORE_ADDR wb)
 
static void execute_s32e (struct gdbarch *gdbarch, int at, int as, int offset, CORE_ADDR wb)
 
static xtensa_exception_handler_t execute_code (struct gdbarch *gdbarch, CORE_ADDR current_pc, CORE_ADDR wb)
 
static CORE_ADDR xtensa_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
 
static void xtensa_verify_config (struct gdbarch *gdbarch)
 
static void xtensa_derive_tdep (xtensa_gdbarch_tdep *tdep)
 
static struct gdbarchxtensa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
static void xtensa_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
 
void _initialize_xtensa_tdep ()
 

Variables

static unsigned int xtensa_debug_level = 0
 
static const reggroupxtensa_ar_reggroup
 
static const reggroupxtensa_user_reggroup
 
static const reggroupxtensa_vectra_reggroup
 
static const reggroupxtensa_cp [XTENSA_MAX_COPROCESSOR]
 
static struct regset xtensa_gregset
 
xtensa_isa xtensa_default_isa
 
static int xtensa_session_once_reported = 1
 
static const struct frame_unwind xtensa_unwind
 
static const struct frame_base xtensa_frame_base
 
static CORE_ADDR a0_saved
 
static CORE_ADDR a7_saved
 
static CORE_ADDR a11_saved
 
static int a0_was_saved
 
static int a7_was_saved
 
static int a11_was_saved
 
xtensa_register_t xtensa_rmap []
 

Macro Definition Documentation

◆ ARG_1ST

#define ARG_1ST ( tdep)
Value:
(tdep->call_abi == CallAbiCall0Only \
? (tdep->a0_base + C0_ARGS) \
: (tdep->a0_base + 6))
#define C0_ARGS
@ CallAbiCall0Only

Definition at line 92 of file xtensa-tdep.c.

Referenced by xtensa_push_dummy_call().

◆ ARG_NOF

#define ARG_NOF ( tdep)
Value:
(tdep->call_abi \
#define ARGS_NUM_REGS
Definition xtensa-tdep.c:73
#define C0_NARGS

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

Referenced by xtensa_push_dummy_call().

◆ ARGS_NUM_REGS

#define ARGS_NUM_REGS   6

Definition at line 73 of file xtensa-tdep.c.

◆ BIG_BREAKPOINT

#define BIG_BREAKPOINT   { 0x00, 0x04, 0x00 }

Definition at line 1942 of file xtensa-tdep.c.

Referenced by xtensa_sw_breakpoint_from_kind().

◆ C0_ARGS

#define C0_ARGS   2 /* Register used as first arg/retval. */

Definition at line 912 of file xtensa-tdep.c.

Referenced by xtensa_extract_return_value(), and xtensa_store_return_value().

◆ C0_CLESV

#define C0_CLESV   12 /* Callee-saved registers are here and up. */

Definition at line 908 of file xtensa-tdep.c.

◆ C0_CONST

#define C0_CONST   -1 /* fr_reg value if register contains a constant. */

Definition at line 922 of file xtensa-tdep.c.

Referenced by call0_frame_cache(), and call0_track_op().

◆ C0_FP

#define C0_FP   15 /* Register used as FP. */

Definition at line 910 of file xtensa-tdep.c.

Referenced by call0_frame_cache().

◆ C0_INEXP

#define C0_INEXP   -2 /* fr_reg value if inexpressible as reg + offset. */

Definition at line 923 of file xtensa-tdep.c.

Referenced by call0_frame_cache(), call0_track_op(), and xtensa_alloc_frame_cache().

◆ C0_MAXOPDS

#define C0_MAXOPDS
Value:
3 /* Maximum number of operands for prologue
analysis. */

Definition at line 907 of file xtensa-tdep.c.

Referenced by call0_analyze_prologue().

◆ C0_NARGS

#define C0_NARGS   6 /* Number of A-regs for args/retvals. */

Definition at line 913 of file xtensa-tdep.c.

◆ C0_NOSTK

#define C0_NOSTK   -1 /* to_stk value if register has not been stored. */

◆ C0_RA

#define C0_RA   0 /* Register used as return address. */

Definition at line 911 of file xtensa-tdep.c.

Referenced by call0_frame_cache().

◆ C0_SP

#define C0_SP   1 /* Register used as SP. */

Definition at line 909 of file xtensa-tdep.c.

Referenced by call0_frame_cache().

◆ CALLINC

#define CALLINC ( ps)    (((ps) & PS_CALLINC_MASK) >> PS_CALLINC_SHIFT)

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

Referenced by xtensa_frame_cache().

◆ DEBUGINFO

#define DEBUGINFO ( args...)
Value:
if (xtensa_debug_level > 1) \
gdb_printf (gdb_stdlog, "(info ) " args)
#define gdb_stdlog
Definition utils.h:190
static unsigned int xtensa_debug_level
Definition xtensa-tdep.c:48

Definition at line 54 of file xtensa-tdep.c.

Referenced by xtensa_extract_return_value(), xtensa_push_dummy_call(), and xtensa_unwind_pc().

◆ DEBUGTRACE

#define DEBUGTRACE ( args...)

◆ DEBUGVERB

#define DEBUGVERB ( args...)
Value:
if (xtensa_debug_level > 3) \
gdb_printf (gdb_stdlog, "(verb ) " args)

Definition at line 62 of file xtensa-tdep.c.

Referenced by call0_analyze_prologue().

◆ DEBUGWARN

#define DEBUGWARN ( args...)
Value:
if (xtensa_debug_level > 0) \
gdb_printf (gdb_stdlog, "(warn ) " args)

Definition at line 50 of file xtensa-tdep.c.

◆ DENSITY_BIG_BREAKPOINT

#define DENSITY_BIG_BREAKPOINT   { 0xd2, 0x0f }

Definition at line 1944 of file xtensa-tdep.c.

Referenced by xtensa_sw_breakpoint_from_kind().

◆ DENSITY_LITTLE_BREAKPOINT

#define DENSITY_LITTLE_BREAKPOINT   { 0x2d, 0xf0 }

Definition at line 1945 of file xtensa-tdep.c.

Referenced by xtensa_sw_breakpoint_from_kind().

◆ LITTLE_BREAKPOINT

#define LITTLE_BREAKPOINT   { 0x00, 0x40, 0x00 }

Definition at line 1943 of file xtensa-tdep.c.

Referenced by xtensa_sw_breakpoint_from_kind().

◆ PS_CALLINC_MASK

#define PS_CALLINC_MASK   0x00030000

Definition at line 79 of file xtensa-tdep.c.

◆ PS_CALLINC_SHIFT

#define PS_CALLINC_SHIFT   16

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

Referenced by xtensa_frame_cache().

◆ PS_EXC

#define PS_EXC   (1<<4)

Definition at line 111 of file xtensa-tdep.c.

Referenced by windowing_enabled(), and xtensa_window_interrupt_frame_cache().

◆ PS_WOE

#define PS_WOE   (1<<18)

Definition at line 110 of file xtensa-tdep.c.

Referenced by windowing_enabled().

◆ REGISTER_SIZE

#define REGISTER_SIZE   4

Definition at line 74 of file xtensa-tdep.c.

Referenced by xtensa_push_dummy_call().

◆ RETURN_FP

#define RETURN_FP   goto done

◆ RETURN_RET

#define RETURN_RET   goto done

◆ SAVE_REST_FLAGS

#define SAVE_REST_FLAGS
Value:
#define XTENSA_REGISTER_FLAGS_VOLATILE
#define XTENSA_REGISTER_FLAGS_WRITABLE
#define XTENSA_REGISTER_FLAGS_READABLE

Definition at line 753 of file xtensa-tdep.c.

Referenced by xtensa_register_reggroup_p().

◆ SAVE_REST_VALID

#define SAVE_REST_VALID

◆ SP_ALIGNMENT

#define SP_ALIGNMENT   16

Definition at line 68 of file xtensa-tdep.c.

Referenced by xtensa_dummy_id(), and xtensa_push_dummy_call().

◆ TX_PS

#define TX_PS   0x20

Definition at line 86 of file xtensa-tdep.c.

Referenced by xtensa_frame_cache().

◆ WINSIZE

#define WINSIZE ( ra)    (4 * (( (ra) >> 30) & 0x3))

Definition at line 81 of file xtensa-tdep.c.

Referenced by xtensa_frame_cache(), and xtensa_window_interrupt_frame_cache().

◆ XTENSA_DBREGN_SREG

#define XTENSA_DBREGN_SREG ( n)    (0x0200+(n))

◆ XTENSA_DBREGN_UREG

#define XTENSA_DBREGN_UREG ( n)    (0x0300+(n))

◆ XTENSA_ENTRY_LENGTH

#define XTENSA_ENTRY_LENGTH   3

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

◆ XTENSA_IS_ENTRY

#define XTENSA_IS_ENTRY ( gdbarch,
op1 )
Value:
((gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) \
? ((op1) == 0x6c) : ((op1) == 0x36))
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
Definition gdbarch.c:1396

Definition at line 100 of file xtensa-tdep.c.

Referenced by xtensa_frame_cache().

◆ XTENSA_ISA_BADPC

#define XTENSA_ISA_BADPC   ((CORE_ADDR)0) /* Bad PC value. */

Definition at line 1095 of file xtensa-tdep.c.

Referenced by call0_analyze_prologue(), and call0_frame_cache().

◆ XTENSA_ISA_BSZ

#define XTENSA_ISA_BSZ   32 /* Instruction buffer size. */

◆ XTENSA_MAX_REGISTER_SIZE

#define XTENSA_MAX_REGISTER_SIZE   64

Definition at line 114 of file xtensa-tdep.c.

Referenced by xtensa_register_read_masked(), and xtensa_register_write_masked().

◆ XTENSA_MAX_WINDOW_INTERRUPT_HANDLER_LEN

#define XTENSA_MAX_WINDOW_INTERRUPT_HANDLER_LEN   200

Definition at line 2746 of file xtensa-tdep.c.

Referenced by execute_code().

◆ XTENSA_NUM_SAVED_AREGS

#define XTENSA_NUM_SAVED_AREGS   12

Typedef Documentation

◆ xtensa_c0reg_t

typedef struct xtensa_c0reg xtensa_c0reg_t

◆ xtensa_call0_frame_cache_t

◆ xtensa_frame_cache_t

◆ xtensa_windowed_frame_cache_t

Enumeration Type Documentation

◆ xtensa_exception_handler_t

Enumerator
xtWindowOverflow 
xtWindowUnderflow 
xtNoExceptionHandler 

Definition at line 2748 of file xtensa-tdep.c.

◆ xtensa_insn_kind

Enumerator
c0opc_illegal 
c0opc_uninteresting 
c0opc_flow 
c0opc_entry 
c0opc_break 
c0opc_add 
c0opc_addi 
c0opc_and 
c0opc_sub 
c0opc_mov 
c0opc_movi 
c0opc_l32r 
c0opc_s32i 
c0opc_rwxsr 
c0opc_l32e 
c0opc_s32e 
c0opc_rfwo 
c0opc_rfwu 
c0opc_NrOf 

Definition at line 2053 of file xtensa-tdep.c.

Function Documentation

◆ _initialize_xtensa_tdep()

void _initialize_xtensa_tdep ( )

◆ areg_number()

static int areg_number ( struct gdbarch * gdbarch,
int ar_regnum,
unsigned int wb )
static

◆ arreg_number()

static int arreg_number ( struct gdbarch * gdbarch,
int a_regnum,
ULONGEST wb )
static

◆ call0_analyze_prologue()

static CORE_ADDR call0_analyze_prologue ( struct gdbarch * gdbarch,
CORE_ADDR start,
CORE_ADDR pc,
int nregs,
xtensa_frame_cache_t * cache )
static

◆ call0_classify_opcode()

static xtensa_insn_kind call0_classify_opcode ( xtensa_isa isa,
xtensa_opcode opc )
static

◆ call0_frame_cache()

static void call0_frame_cache ( frame_info_ptr this_frame,
xtensa_frame_cache_t * cache,
CORE_ADDR pc )
static

◆ call0_ret()

static int call0_ret ( CORE_ADDR start_pc,
CORE_ADDR finish_pc )
static

Definition at line 1982 of file xtensa-tdep.c.

References RETURN_RET, target_read_memory(), xtensa_default_isa, and XTENSA_ISA_BSZ.

Referenced by xtensa_skip_prologue().

◆ call0_track_op()

static int call0_track_op ( struct gdbarch * gdbarch,
xtensa_c0reg_t dst[],
xtensa_c0reg_t src[],
xtensa_insn_kind opclass,
int nods,
unsigned odv[],
CORE_ADDR pc,
int spreg,
xtensa_frame_cache_t * cache )
static

◆ execute_code()

static xtensa_exception_handler_t execute_code ( struct gdbarch * gdbarch,
CORE_ADDR current_pc,
CORE_ADDR wb )
static

◆ execute_l32e()

static void execute_l32e ( struct gdbarch * gdbarch,
int at,
int as,
int offset,
CORE_ADDR wb )
static

◆ execute_s32e()

static void execute_s32e ( struct gdbarch * gdbarch,
int at,
int as,
int offset,
CORE_ADDR wb )
static

◆ extract_call_winsize()

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

◆ rwx_special_register()

static int rwx_special_register ( const char * opcname)
static

Definition at line 2079 of file xtensa-tdep.c.

Referenced by call0_classify_opcode().

◆ warning_once()

static void warning_once ( void )
static

Definition at line 1380 of file xtensa-tdep.c.

References xtensa_session_once_reported.

Referenced by call0_frame_cache().

◆ windowing_enabled()

static int windowing_enabled ( struct gdbarch * gdbarch,
unsigned int ps )
static

Definition at line 117 of file xtensa-tdep.c.

References xtensa_gdbarch_tdep::call_abi, CallAbiCall0Only, PS_EXC, and PS_WOE.

Referenced by xtensa_frame_cache().

◆ xtensa_add_reggroups()

static void xtensa_add_reggroups ( struct gdbarch * gdbarch)
static

◆ xtensa_alloc_frame_cache()

static struct xtensa_frame_cache * xtensa_alloc_frame_cache ( int windowed)
static

◆ xtensa_breakpoint_kind_from_pc()

static int xtensa_breakpoint_kind_from_pc ( struct gdbarch * gdbarch,
CORE_ADDR * pcptr )
static

Definition at line 1928 of file xtensa-tdep.c.

References xtensa_gdbarch_tdep::isa_use_density_instructions.

Referenced by xtensa_gdbarch_init().

◆ xtensa_coprocessor_register_group()

static int xtensa_coprocessor_register_group ( const struct reggroup * group)
static

Definition at line 742 of file xtensa-tdep.c.

References xtensa_cp, and XTENSA_MAX_COPROCESSOR.

Referenced by xtensa_register_reggroup_p().

◆ xtensa_derive_tdep()

static void xtensa_derive_tdep ( xtensa_gdbarch_tdep * tdep)
static

◆ xtensa_dummy_id()

static struct frame_id xtensa_dummy_id ( struct gdbarch * gdbarch,
frame_info_ptr this_frame )
static

◆ xtensa_dump_tdep()

static void xtensa_dump_tdep ( struct gdbarch * gdbarch,
struct ui_file * file )
static

Definition at line 3248 of file xtensa-tdep.c.

Referenced by _initialize_xtensa_tdep().

◆ xtensa_extract_return_value()

static void xtensa_extract_return_value ( struct type * type,
struct regcache * regcache,
void * dst )
static

◆ xtensa_find_register_by_name()

static int xtensa_find_register_by_name ( struct gdbarch * gdbarch,
const char * name )
static

◆ xtensa_frame_align()

static CORE_ADDR xtensa_frame_align ( struct gdbarch * gdbarch,
CORE_ADDR address )
static

Definition at line 1019 of file xtensa-tdep.c.

Referenced by xtensa_gdbarch_init().

◆ xtensa_frame_base_address()

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

Definition at line 1509 of file xtensa-tdep.c.

References xtensa_frame_cache::base, and xtensa_frame_cache().

◆ xtensa_frame_cache()

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

◆ xtensa_frame_prev_register()

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

◆ xtensa_frame_this_id()

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

◆ xtensa_gdbarch_init()

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

Definition at line 3151 of file xtensa-tdep.c.

References xtensa_gdbarch_tdep::a0_base, core_addr_lessthan(), DEBUGTRACE, dwarf2_append_unwinders(), frame_base_set_default(), frame_unwind_append_unwinder(), gdbarch_alloc(), gdbarch_init_osabi(), gdbarch::info(), xtensa_gdbarch_tdep::num_pseudo_regs, xtensa_gdbarch_tdep::num_regs, xtensa_gdbarch_tdep::pc_regnum, xtensa_gdbarch_tdep::ps_regnum, set_gdbarch_believe_pcc_promotion(), set_gdbarch_breakpoint_kind_from_pc(), set_gdbarch_decr_pc_after_break(), set_gdbarch_dummy_id(), set_gdbarch_dwarf2_reg_to_regnum(), set_gdbarch_frame_align(), set_gdbarch_frame_args_skip(), set_gdbarch_have_nonsteppable_watchpoint(), set_gdbarch_inner_than(), set_gdbarch_iterate_over_regset_sections(), set_gdbarch_num_pseudo_regs(), set_gdbarch_num_regs(), set_gdbarch_pc_regnum(), set_gdbarch_ps_regnum(), set_gdbarch_pseudo_register_read(), set_gdbarch_pseudo_register_write(), set_gdbarch_push_dummy_call(), set_gdbarch_register_name(), set_gdbarch_register_reggroup_p(), set_gdbarch_register_type(), set_gdbarch_return_value(), set_gdbarch_skip_prologue(), set_gdbarch_sp_regnum(), set_gdbarch_stab_reg_to_regnum(), set_gdbarch_sw_breakpoint_from_kind(), set_gdbarch_unwind_pc(), set_gdbarch_wchar_bit(), set_gdbarch_wchar_signed(), set_solib_svr4_fetch_link_map_offsets(), svr4_ilp32_fetch_link_map_offsets(), xtensa_add_reggroups(), xtensa_breakpoint_kind_from_pc(), xtensa_default_isa, xtensa_derive_tdep(), xtensa_dummy_id(), xtensa_frame_align(), xtensa_frame_base, xtensa_iterate_over_regset_sections(), xtensa_pseudo_register_read(), xtensa_pseudo_register_write(), xtensa_push_dummy_call(), xtensa_reg_to_regnum(), xtensa_register_name(), xtensa_register_reggroup_p(), xtensa_register_type(), xtensa_return_value(), xtensa_rmap, xtensa_session_once_reported, xtensa_skip_prologue(), xtensa_sw_breakpoint_from_kind(), xtensa_unwind, xtensa_unwind_pc(), and xtensa_verify_config().

Referenced by _initialize_xtensa_tdep().

◆ xtensa_init_reggroups()

static void xtensa_init_reggroups ( void )
static

◆ xtensa_iterate_over_regset_sections()

static void xtensa_iterate_over_regset_sections ( struct gdbarch * gdbarch,
iterate_over_regset_sections_cb * cb,
void * cb_data,
const struct regcache * regcache )
static

Definition at line 873 of file xtensa-tdep.c.

References DEBUGTRACE, and xtensa_gregset.

Referenced by xtensa_gdbarch_init().

◆ xtensa_pseudo_register_read()

static enum register_status xtensa_pseudo_register_read ( struct gdbarch * gdbarch,
readable_regcache * regcache,
int regnum,
gdb_byte * buffer )
static

◆ xtensa_pseudo_register_write()

static void xtensa_pseudo_register_write ( struct gdbarch * gdbarch,
struct regcache * regcache,
int regnum,
const gdb_byte * buffer )
static

◆ xtensa_push_dummy_call()

static CORE_ADDR xtensa_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

◆ xtensa_read_register()

static unsigned long xtensa_read_register ( int regnum)
static

◆ xtensa_reg_to_regnum()

static int xtensa_reg_to_regnum ( struct gdbarch * gdbarch,
int regnum )
static

◆ xtensa_register_name()

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

◆ xtensa_register_read_masked()

static enum register_status xtensa_register_read_masked ( readable_regcache * regcache,
xtensa_register_t * reg,
gdb_byte * buffer )
static

◆ xtensa_register_reggroup_p()

static int xtensa_register_reggroup_p ( struct gdbarch * gdbarch,
int regnum,
const struct reggroup * group )
static

◆ xtensa_register_type()

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

◆ xtensa_register_write_masked()

static void xtensa_register_write_masked ( struct regcache * regcache,
xtensa_register_t * reg,
const gdb_byte * buffer )
static

◆ xtensa_return_value()

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

◆ xtensa_scan_prologue()

static unsigned int xtensa_scan_prologue ( struct gdbarch * gdbarch,
CORE_ADDR current_pc )
static

◆ xtensa_skip_prologue()

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

◆ xtensa_store_return_value()

static void xtensa_store_return_value ( struct type * type,
struct regcache * regcache,
const void * dst )
static

◆ xtensa_supply_gregset()

static void xtensa_supply_gregset ( const struct regset * regset,
struct regcache * rc,
int regnum,
const void * gregs,
size_t len )
static

◆ xtensa_sw_breakpoint_from_kind()

static const gdb_byte * xtensa_sw_breakpoint_from_kind ( struct gdbarch * gdbarch,
int kind,
int * size )
static

◆ xtensa_unwind_pc()

static CORE_ADDR xtensa_unwind_pc ( struct gdbarch * gdbarch,
frame_info_ptr next_frame )
static

◆ xtensa_verify_config()

static void xtensa_verify_config ( struct gdbarch * gdbarch)
static

◆ xtensa_window_interrupt_frame_cache()

static void xtensa_window_interrupt_frame_cache ( frame_info_ptr this_frame,
xtensa_frame_cache_t * cache,
CORE_ADDR pc )
static

◆ xtensa_window_interrupt_insn()

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

Definition at line 1063 of file xtensa-tdep.c.

References code, gdbarch_byte_order(), and read_memory_integer().

Referenced by xtensa_frame_cache().

◆ xtensa_write_register()

static void xtensa_write_register ( int regnum,
ULONGEST value )
static

Definition at line 170 of file xtensa-tdep.c.

References get_current_regcache(), regcache_raw_write_unsigned(), and regnum.

Referenced by execute_code(), and execute_l32e().

Variable Documentation

◆ a0_saved

CORE_ADDR a0_saved
static

Definition at line 2694 of file xtensa-tdep.c.

Referenced by execute_code(), and execute_l32e().

◆ a0_was_saved

int a0_was_saved
static

Definition at line 2697 of file xtensa-tdep.c.

Referenced by execute_code(), and execute_l32e().

◆ a11_saved

CORE_ADDR a11_saved
static

Definition at line 2696 of file xtensa-tdep.c.

Referenced by execute_code(), and execute_l32e().

◆ a11_was_saved

int a11_was_saved
static

Definition at line 2699 of file xtensa-tdep.c.

Referenced by execute_code(), and execute_l32e().

◆ a7_saved

CORE_ADDR a7_saved
static

Definition at line 2695 of file xtensa-tdep.c.

Referenced by execute_code(), and execute_l32e().

◆ a7_was_saved

int a7_was_saved
static

Definition at line 2698 of file xtensa-tdep.c.

Referenced by execute_code(), and execute_l32e().

◆ xtensa_ar_reggroup

const reggroup* xtensa_ar_reggroup
static

◆ xtensa_cp

const reggroup* xtensa_cp[XTENSA_MAX_COPROCESSOR]
static

◆ xtensa_debug_level

unsigned int xtensa_debug_level = 0
static

Definition at line 48 of file xtensa-tdep.c.

Referenced by _initialize_xtensa_tdep(), and xtensa_push_dummy_call().

◆ xtensa_default_isa

xtensa_isa xtensa_default_isa
extern

◆ xtensa_frame_base

const struct frame_base xtensa_frame_base
static
Initial value:
=
{
}
static const struct frame_unwind xtensa_unwind
static CORE_ADDR xtensa_frame_base_address(frame_info_ptr this_frame, void **this_cache)

Definition at line 1518 of file xtensa-tdep.c.

Referenced by xtensa_gdbarch_init().

◆ xtensa_gregset

struct regset xtensa_gregset
static
Initial value:
=
{
NULL,
}
static void xtensa_supply_gregset(const struct regset *regset, struct regcache *rc, int regnum, const void *gregs, size_t len)

Definition at line 863 of file xtensa-tdep.c.

Referenced by xtensa_iterate_over_regset_sections().

◆ xtensa_rmap

xtensa_register_t xtensa_rmap[]
extern

Definition at line 65 of file xtensa-config.c.

Referenced by xtensa_gdbarch_init().

◆ xtensa_session_once_reported

int xtensa_session_once_reported = 1
static

Definition at line 1374 of file xtensa-tdep.c.

Referenced by warning_once(), and xtensa_gdbarch_init().

◆ xtensa_unwind

const struct frame_unwind xtensa_unwind
static
Initial value:
=
{
"xtensa prologue",
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 xtensa_frame_this_id(frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id)
static struct value * xtensa_frame_prev_register(frame_info_ptr this_frame, void **this_cache, int regnum)

Definition at line 1497 of file xtensa-tdep.c.

Referenced by xtensa_gdbarch_init().

◆ xtensa_user_reggroup

const reggroup* xtensa_user_reggroup
static

◆ xtensa_vectra_reggroup

const reggroup* xtensa_vectra_reggroup
static