GDB (xrefs)

Classes | Macros | Typedefs | Enumerations | Functions | Variables
/tmp/gdb-8.1/gdb/xtensa-tdep.c File Reference
`#include "defs.h"`
`#include "frame.h"`
`#include "solib-svr4.h"`
`#include "symtab.h"`
`#include "symfile.h"`
`#include "objfiles.h"`
`#include "gdbtypes.h"`
`#include "gdbcore.h"`
`#include "value.h"`
`#include "dis-asm.h"`
`#include "inferior.h"`
`#include "osabi.h"`
`#include "regcache.h"`
`#include "reggroups.h"`
`#include "regset.h"`
`#include "dummy-frame.h"`
`#include "dwarf2.h"`
`#include "dwarf2-frame.h"`
`#include "dwarf2loc.h"`
`#include "frame-base.h"`
`#include "frame-unwind.h"`
`#include "arch-utils.h"`
`#include "gdbarch.h"`
`#include "remote.h"`
`#include "serial.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(gdbarch)
#define | ARG_1ST(gdbarch)
#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 type * | xtensa_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 (struct regcache *regcache, xtensa_register_t *reg, gdb_byte *buffer)
static enum register_status | xtensa_pseudo_register_read (struct gdbarch *gdbarch, struct 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 (struct reggroup *group)
static int | xtensa_register_reggroup_p (struct gdbarch *gdbarch, int regnum, 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_cache * | xtensa_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, struct frame_info *next_frame)
static struct frame_id | xtensa_dummy_id (struct gdbarch *gdbarch, struct frame_info *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 (struct frame_info *this_frame, xtensa_frame_cache_t *cache, CORE_ADDR pc)
static void | xtensa_window_interrupt_frame_cache (struct frame_info *this_frame, xtensa_frame_cache_t *cache, CORE_ADDR pc)
static struct xtensa_frame_cache * | xtensa_frame_cache (struct frame_info *this_frame, void **this_cache)
static void | warning_once (void)
static void | xtensa_frame_this_id (struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
static struct value * | xtensa_frame_prev_register (struct frame_info *this_frame, void **this_cache, int regnum)
static CORE_ADDR | xtensa_frame_base_address (struct frame_info *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, int struct_return, 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 (struct gdbarch_tdep *tdep)
static struct gdbarch * | xtensa_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 (void)

## Variables
static unsigned int | xtensa_debug_level = 0
static struct reggroup * | xtensa_ar_reggroup
static struct reggroup * | xtensa_user_reggroup
static struct reggroup * | xtensa_vectra_reggroup
static struct reggroup * | xtensa_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
struct gdbarch_tdep | xtensa_tdep

## Macro Definition Documentation

## ◆ ARG_1ST

#define ARG_1ST | ( |  | gdbarch | ) |

Value:
(gdbarch_tdep (gdbarch)->call_abi == CallAbiCall0Only \
? (gdbarch_tdep (gdbarch)->a0_base + C0_ARGS) \
: (gdbarch_tdep (gdbarch)->a0_base + 6))
gdbarch
Definition: gdbarch.c:127
CallAbiCall0Only
Definition: xtensa-tdep.h:145
gdbarch_tdep
Definition: aarch64-tdep.h:55
gdbarch_tdep
struct gdbarch_tdep * gdbarch_tdep(struct gdbarch *gdbarch)
Definition: gdbarch.c:1491
C0_ARGS
#define C0_ARGS
Definition: xtensa-tdep.c:941
gdbarch_tdep::call_abi
call_abi_t call_abi
Definition: xtensa-tdep.h:168
gdbarch_tdep::a0_base
int a0_base
Definition: xtensa-tdep.h:197

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

Referenced by xtensa_push_dummy_call().

## ◆ ARG_NOF

#define ARG_NOF | ( |  | gdbarch | ) |

Value:
(gdbarch_tdep (gdbarch)->call_abi \
== CallAbiCall0Only ? C0_NARGS : (ARGS_NUM_REGS))
gdbarch
Definition: gdbarch.c:127
CallAbiCall0Only
Definition: xtensa-tdep.h:145
gdbarch_tdep
struct gdbarch_tdep * gdbarch_tdep(struct gdbarch *gdbarch)
Definition: gdbarch.c:1491
C0_NARGS
#define C0_NARGS
Definition: xtensa-tdep.c:942
gdbarch_tdep::call_abi
call_abi_t call_abi
Definition: xtensa-tdep.h:168
ARGS_NUM_REGS
#define ARGS_NUM_REGS
Definition: xtensa-tdep.c:82

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

Referenced by xtensa_push_dummy_call().

## ◆ ARGS_NUM_REGS

#define ARGS_NUM_REGS 6

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

## ◆ BIG_BREAKPOINT

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

Definition at line 1966 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 941 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 937 of file xtensa-tdep.c.

## ◆ C0_CONST

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

Definition at line 951 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 939 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 952 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 935 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 942 of file xtensa-tdep.c.

## ◆ C0_NOSTK

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

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

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

## ◆ C0_RA

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

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

Referenced by call0_frame_cache().

## ◆ C0_SP

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

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

Referenced by call0_frame_cache().

## ◆ CALLINC

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

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

Referenced by xtensa_frame_cache().

## ◆ DEBUGINFO

#define DEBUGINFO | ( |  | args... | ) |

Value:
if (xtensa_debug_level > 1) \
fprintf_unfiltered (gdb_stdlog, "(info ) " args)
xtensa_debug_level
static unsigned int xtensa_debug_level
Definition: xtensa-tdep.c:57
gdb_stdlog
#define gdb_stdlog
Definition: utils.h:349

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

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

## ◆ DEBUGTRACE

#define DEBUGTRACE | ( |  | args... | ) |

Value:
if (xtensa_debug_level > 2) \
fprintf_unfiltered (gdb_stdlog, "(trace) " args)
xtensa_debug_level
static unsigned int xtensa_debug_level
Definition: xtensa-tdep.c:57
gdb_stdlog
#define gdb_stdlog
Definition: utils.h:349

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

Referenced by call0_analyze_prologue(), call0_classify_opcode(), extract_call_winsize(), xtensa_alloc_frame_cache(), xtensa_extract_return_value(), xtensa_gdbarch_init(), xtensa_iterate_over_regset_sections(), xtensa_pseudo_register_read(), xtensa_pseudo_register_write(), xtensa_push_dummy_call(), xtensa_register_read_masked(), xtensa_register_write_masked(), xtensa_return_value(), xtensa_skip_prologue(), xtensa_store_return_value(), xtensa_supply_gregset(), and xtensa_unwind_pc().

## ◆ DEBUGVERB

#define DEBUGVERB | ( |  | args... | ) |

Value:
if (xtensa_debug_level > 3) \
fprintf_unfiltered (gdb_stdlog, "(verb ) " args)
xtensa_debug_level
static unsigned int xtensa_debug_level
Definition: xtensa-tdep.c:57
gdb_stdlog
#define gdb_stdlog
Definition: utils.h:349

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

Referenced by call0_analyze_prologue().

## ◆ DEBUGWARN

#define DEBUGWARN | ( |  | args... | ) |

Value:
if (xtensa_debug_level > 0) \
fprintf_unfiltered (gdb_stdlog, "(warn ) " args)
xtensa_debug_level
static unsigned int xtensa_debug_level
Definition: xtensa-tdep.c:57
gdb_stdlog
#define gdb_stdlog
Definition: utils.h:349

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

## ◆ DENSITY_BIG_BREAKPOINT

#define DENSITY_BIG_BREAKPOINT { 0xd2, 0x0f }

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

Referenced by xtensa_sw_breakpoint_from_kind().

## ◆ DENSITY_LITTLE_BREAKPOINT

#define DENSITY_LITTLE_BREAKPOINT { 0x2d, 0xf0 }

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

Referenced by xtensa_sw_breakpoint_from_kind().

## ◆ LITTLE_BREAKPOINT

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

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

Referenced by xtensa_sw_breakpoint_from_kind().

## ◆ PS_CALLINC_MASK

#define PS_CALLINC_MASK 0x00030000

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

Referenced by xtensa_frame_cache().

## ◆ PS_CALLINC_SHIFT

#define PS_CALLINC_SHIFT 16

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

Referenced by xtensa_frame_cache().

## ◆ PS_EXC

#define PS_EXC (1<<4)

Definition at line 120 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 119 of file xtensa-tdep.c.

Referenced by windowing_enabled().

## ◆ REGISTER_SIZE

#define REGISTER_SIZE 4

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

Referenced by xtensa_push_dummy_call().

## ◆ RETURN_FP

#define RETURN_FP goto done

Referenced by xtensa_scan_prologue().

## ◆ RETURN_RET

#define RETURN_RET goto done

Referenced by call0_ret().

## ◆ SAVE_REST_FLAGS

#define SAVE_REST_FLAGS

Value:
(XTENSA_REGISTER_FLAGS_READABLE \
| XTENSA_REGISTER_FLAGS_WRITABLE \
| XTENSA_REGISTER_FLAGS_VOLATILE)
XTENSA_REGISTER_FLAGS_VOLATILE
#define XTENSA_REGISTER_FLAGS_VOLATILE
Definition: xtensa-tdep.h:138
XTENSA_REGISTER_FLAGS_WRITABLE
#define XTENSA_REGISTER_FLAGS_WRITABLE
Definition: xtensa-tdep.h:137
XTENSA_REGISTER_FLAGS_READABLE
#define XTENSA_REGISTER_FLAGS_READABLE
Definition: xtensa-tdep.h:136

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

Referenced by xtensa_register_reggroup_p().

## ◆ SAVE_REST_VALID

#define SAVE_REST_VALID

Value:
(XTENSA_REGISTER_FLAGS_READABLE \
| XTENSA_REGISTER_FLAGS_WRITABLE)
XTENSA_REGISTER_FLAGS_WRITABLE
#define XTENSA_REGISTER_FLAGS_WRITABLE
Definition: xtensa-tdep.h:137
XTENSA_REGISTER_FLAGS_READABLE
#define XTENSA_REGISTER_FLAGS_READABLE
Definition: xtensa-tdep.h:136

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

Referenced by xtensa_register_reggroup_p().

## ◆ SP_ALIGNMENT

#define SP_ALIGNMENT 16

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

Referenced by xtensa_dummy_id(), and xtensa_push_dummy_call().

## ◆ TX_PS

#define TX_PS 0x20

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

Referenced by xtensa_frame_cache().

## ◆ WINSIZE

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

Definition at line 90 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))

Referenced by xtensa_derive_tdep().

## ◆ XTENSA_DBREGN_UREG

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

Referenced by xtensa_derive_tdep().

## ◆ XTENSA_ENTRY_LENGTH

#define XTENSA_ENTRY_LENGTH 3

Definition at line 113 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))
gdbarch
Definition: gdbarch.c:127
gdbarch_byte_order
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
Definition: gdbarch.c:1509

Definition at line 109 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 1123 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. */

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

Referenced by call0_analyze_prologue(), call0_ret(), execute_code(), and xtensa_scan_prologue().

## ◆ XTENSA_MAX_REGISTER_SIZE

#define XTENSA_MAX_REGISTER_SIZE 64

Definition at line 123 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 2766 of file xtensa-tdep.c.

Referenced by execute_code().

## ◆ XTENSA_NUM_SAVED_AREGS

#define XTENSA_NUM_SAVED_AREGS 12

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

Referenced by xtensa_alloc_frame_cache(), xtensa_frame_prev_register(), and xtensa_window_interrupt_frame_cache().

## Typedef Documentation

## ◆ xtensa_c0reg_t

typedef struct xtensa_c0reg xtensa_c0reg_t

## ◆ xtensa_call0_frame_cache_t

typedef struct xtensa_call0_frame_cache xtensa_call0_frame_cache_t

## ◆ xtensa_frame_cache_t

typedef struct xtensa_frame_cache xtensa_frame_cache_t

## ◆ xtensa_windowed_frame_cache_t

typedef struct xtensa_windowed_frame_cache xtensa_windowed_frame_cache_t

## Enumeration Type Documentation

## ◆ xtensa_exception_handler_t

enum xtensa_exception_handler_t

Enumerator
xtWindowOverflow |
xtWindowUnderflow |
xtNoExceptionHandler |

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

## ◆ xtensa_insn_kind

enum 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 2077 of file xtensa-tdep.c.

## Function Documentation

## ◆ _initialize_xtensa_tdep()

void _initialize_xtensa_tdep | ( | void |  | ) |

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

References _, add_setshow_zuinteger_cmd(), class_maintenance, gdbarch_register(), setdebuglist, showdebuglist, xtensa_debug_level, xtensa_dump_tdep(), xtensa_gdbarch_init(), and xtensa_init_reggroups().

## ◆ areg_number()

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

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

References gdbarch_tdep::ar_base, gdbarch_tdep(), and gdbarch_tdep::num_aregs.

Referenced by xtensa_frame_prev_register().

## ◆ arreg_number()

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

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

References gdbarch_tdep::a0_base, gdbarch_tdep::ar_base, gdbarch_tdep(), gdbarch_tdep::num_aregs, and WB_SHIFT.

Referenced by execute_code(), execute_l32e(), execute_s32e(), xtensa_extract_return_value(), xtensa_frame_cache(), xtensa_frame_prev_register(), xtensa_pseudo_register_read(), xtensa_pseudo_register_write(), xtensa_store_return_value(), and xtensa_window_interrupt_frame_cache().

## ◆ 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

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

References _, xtensa_frame_cache::c0, C0_MAXOPDS, xtensa_call0_frame_cache::c0_rt, c0opc_break, c0opc_entry, c0opc_flow, c0opc_illegal, c0opc_mov, c0opc_rwxsr, c0opc_uninteresting, xtensa_frame_cache::call0, call0_classify_opcode(), call0_track_op(), DEBUGTRACE, DEBUGVERB, symtab_and_line::end, error(), find_pc_line(), find_pc_partial_function(), gdb_assert, symtab_and_line::line, symtab_and_line::pc, target_read_memory(), UINT_MAX, xtensa_default_isa, XTENSA_ISA_BADPC, and XTENSA_ISA_BSZ.

Referenced by call0_frame_cache(), and xtensa_skip_prologue().

## ◆ call0_classify_opcode()

static xtensa_insn_kind call0_classify_opcode | ( | xtensa_isa | isa,
|  | xtensa_opcode | opc
| ) |  |
| static

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

References c0opc_add, c0opc_addi, c0opc_and, c0opc_break, c0opc_entry, c0opc_flow, c0opc_illegal, c0opc_l32e, c0opc_l32r, c0opc_mov, c0opc_movi, c0opc_rfwo, c0opc_rfwu, c0opc_rwxsr, c0opc_s32e, c0opc_s32i, c0opc_sub, c0opc_uninteresting, DEBUGTRACE, and rwx_special_register().

Referenced by call0_analyze_prologue(), and execute_code().

## ◆ call0_frame_cache()

static void call0_frame_cache | ( | struct frame_info * | this_frame,
|  | xtensa_frame_cache_t * | cache,
|  | CORE_ADDR | pc
| ) |  |
| static

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

References gdbarch_tdep::a0_base, gdbarch::byte_order, xtensa_frame_cache::c0, C0_CONST, C0_FP, xtensa_call0_frame_cache::c0_fp, xtensa_call0_frame_cache::c0_fpalign, xtensa_call0_frame_cache::c0_frmsz, xtensa_call0_frame_cache::c0_hasfp, C0_INEXP, C0_NOSTK, C0_NREGS, xtensa_call0_frame_cache::c0_old_sp, C0_RA, xtensa_call0_frame_cache::c0_rt, C0_SP, xtensa_call0_frame_cache::c0_sp_ofs, call0_analyze_prologue(), find_pc_partial_function(), fp_regnum, xtensa_call0_frame_cache::fp_regnum, xtensa_c0reg::fr_ofs, xtensa_c0reg::fr_reg, gdbarch_byte_order(), gdbarch_tdep(), get_frame_arch(), get_frame_register_unsigned(), xtensa_frame_cache::pc, xtensa_frame_cache::prev_sp, xtensa_frame_cache::ra, read_memory_integer(), xtensa_c0reg::to_stk, UINT_MAX, warning_once(), and XTENSA_ISA_BADPC.

Referenced by xtensa_frame_cache().

## ◆ call0_ret()

static int call0_ret | ( | CORE_ADDR | start_pc,
|  | CORE_ADDR | finish_pc
| ) |  |
| static

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

References gdb_assert, 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

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

References xtensa_frame_cache::c0, C0_CONST, xtensa_call0_frame_cache::c0_fpalign, C0_INEXP, C0_NOSTK, C0_NREGS, xtensa_call0_frame_cache::c0_old_sp, xtensa_call0_frame_cache::c0_sp_ofs, c0opc_add, c0opc_addi, c0opc_and, c0opc_l32e, c0opc_l32r, c0opc_mov, c0opc_movi, c0opc_rfwo, c0opc_rfwu, c0opc_s32e, c0opc_s32i, c0opc_sub, xtensa_c0reg::fr_ofs, xtensa_c0reg::fr_reg, gdb_assert, gdbarch_byte_order(), gdbarch_tdep(), gdbarch_tdep::litbase_regnum, read_memory_integer(), xtensa_c0reg::to_stk, and xtensa_read_register().

Referenced by call0_analyze_prologue().

## ◆ execute_code()

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

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

References a0_saved, a0_was_saved, a11_saved, a11_was_saved, a7_saved, a7_was_saved, arreg_number(), c0opc_break, c0opc_entry, c0opc_flow, c0opc_illegal, c0opc_l32e, c0opc_rfwo, c0opc_rfwu, c0opc_s32e, call0_classify_opcode(), execute_l32e(), execute_s32e(), func, gdb_assert, offset, target_read_memory(), xtensa_default_isa, XTENSA_ISA_BSZ, XTENSA_MAX_WINDOW_INTERRUPT_HANDLER_LEN, xtensa_write_register(), xtNoExceptionHandler, xtWindowOverflow, and xtWindowUnderflow.

Referenced by xtensa_window_interrupt_frame_cache().

## ◆ execute_l32e()

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

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

References a0_saved, a0_was_saved, a11_saved, a11_was_saved, a7_saved, a7_was_saved, arreg_number(), gdbarch_byte_order(), offset, read_memory_unsigned_integer(), xtensa_read_register(), and xtensa_write_register().

Referenced by execute_code().

## ◆ execute_s32e()

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

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

References arreg_number(), gdbarch_byte_order(), offset, write_memory_unsigned_integer(), and xtensa_read_register().

Referenced by execute_code().

## ◆ extract_call_winsize()

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

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

References DEBUGTRACE, extract_unsigned_integer(), gdbarch_byte_order(), gdbarch_tdep::pc, and read_memory().

Referenced by xtensa_extract_return_value(), and xtensa_store_return_value().

## ◆ rwx_special_register()

static int rwx_special_register | ( | const char * | opcname | ) |
| static

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

Referenced by call0_classify_opcode().

## ◆ warning_once()

static void warning_once | ( | void |  | ) |
| static

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

References _, warning(), and 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 126 of file xtensa-tdep.c.

References CallAbiCall0Only, cleanup_check::ps, PS_EXC, and PS_WOE.

Referenced by xtensa_frame_cache().

## ◆ xtensa_add_reggroups()

static void xtensa_add_reggroups | ( | struct gdbarch * | gdbarch | ) |
| static

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

References all_reggroup, float_reggroup, general_reggroup, reggroup_add(), restore_reggroup, save_reggroup, system_reggroup, vector_reggroup, xtensa_ar_reggroup, xtensa_cp, XTENSA_MAX_COPROCESSOR, xtensa_user_reggroup, and xtensa_vectra_reggroup.

Referenced by xtensa_gdbarch_init().

## ◆ xtensa_alloc_frame_cache()

static struct xtensa_frame_cache* xtensa_alloc_frame_cache | ( | int | windowed | ) |
| static

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

References xtensa_windowed_frame_cache::aregs, xtensa_frame_cache::base, xtensa_frame_cache::c0, xtensa_call0_frame_cache::c0_fp, xtensa_call0_frame_cache::c0_fpalign, xtensa_call0_frame_cache::c0_frmsz, xtensa_call0_frame_cache::c0_hasfp, C0_INEXP, C0_NOSTK, C0_NREGS, xtensa_call0_frame_cache::c0_old_sp, xtensa_call0_frame_cache::c0_rt, xtensa_call0_frame_cache::c0_sp_ofs, xtensa_frame_cache::call0, xtensa_windowed_frame_cache::callsize, DEBUGTRACE, xtensa_call0_frame_cache::fp_regnum, xtensa_c0reg::fr_ofs, xtensa_c0reg::fr_reg, FRAME_OBSTACK_ZALLOC, xtensa_frame_cache::pc, xtensa_frame_cache::prev_sp, xtensa_frame_cache::ps, xtensa_frame_cache::ra, xtensa_c0reg::to_stk, xtensa_windowed_frame_cache::wb, xtensa_frame_cache::wd, xtensa_windowed_frame_cache::ws, and XTENSA_NUM_SAVED_AREGS.

Referenced by xtensa_frame_cache(), and xtensa_skip_prologue().

## ◆ xtensa_breakpoint_kind_from_pc()

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

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

Referenced by xtensa_gdbarch_init().

## ◆ xtensa_coprocessor_register_group()

static int xtensa_coprocessor_register_group | ( | struct reggroup * | group | ) |
| static

Definition at line 771 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 | ( | struct gdbarch_tdep * | tdep | ) |
| static

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

References gdbarch_tdep::a0_base, gdbarch_tdep::ar_base, xtensa_register_t::byte_size, gdbarch_tdep::cpenable_regnum, gdbarch_tdep::debugcause_regnum, gdbarch_tdep::exccause_regnum, gdbarch_tdep::excvaddr_regnum, xtensa_register_t::flags, gdbarch_tdep::interrupt2_regnum, gdbarch_tdep::interrupt_regnum, gdbarch_tdep::lbeg_regnum, gdbarch_tdep::lcount_regnum, gdbarch_tdep::lend_regnum, gdbarch_tdep::litbase_regnum, xtensa_register_t::mask, gdbarch_tdep::max_register_raw_size, gdbarch_tdep::max_register_virtual_size, gdbarch_tdep::num_nopriv_regs, gdbarch_tdep::num_pseudo_regs, gdbarch_tdep::num_regs, gdbarch_tdep::pc_regnum, gdbarch_tdep::ps_regnum, gdbarch_tdep::regmap, rmap, gdbarch_tdep::sar_regnum, xtensa_register_t::target_number, gdbarch_tdep::threadptr_regnum, gdbarch_tdep::wb_regnum, gdbarch_tdep::ws_regnum, XTENSA_DBREGN_SREG, XTENSA_DBREGN_UREG, and XTENSA_REGISTER_FLAGS_PRIVILEGED.

Referenced by xtensa_gdbarch_init().

## ◆ xtensa_dummy_id()

static struct frame_id xtensa_dummy_id | ( | struct gdbarch * | gdbarch,
|  | struct frame_info * | this_frame
| ) |  |
| static

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

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

Referenced by xtensa_gdbarch_init().

## ◆ xtensa_dump_tdep()

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

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

References _, and error().

Referenced by _initialize_xtensa_tdep().

## ◆ xtensa_extract_return_value()

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

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

References _, gdbarch_tdep::a0_base, regcache::arch(), arreg_number(), C0_ARGS, CallAbiCall0Only, DEBUGINFO, DEBUGTRACE, extract_call_winsize(), gdb_assert, gdbarch_byte_order(), gdbarch_pc_regnum(), gdbarch_tdep(), internal_error(), offset, regcache_raw_read(), regcache_raw_read_part(), regcache_raw_read_unsigned(), and TYPE_LENGTH.

Referenced by xtensa_return_value().

## ◆ xtensa_find_register_by_name()

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

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

References gdbarch_num_pseudo_regs(), gdbarch_num_regs(), name, and regmap.

Referenced by xtensa_window_interrupt_frame_cache().

## ◆ xtensa_frame_align()

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

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

Referenced by xtensa_gdbarch_init().

## ◆ xtensa_frame_base_address()

static CORE_ADDR xtensa_frame_base_address | ( | struct frame_info * | this_frame,
|  | void ** | this_cache
| ) |  |
| static

Definition at line 1533 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 | ( | struct frame_info * | this_frame,
|  | void ** | this_cache
| ) |  |
| static

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

References xtensa_windowed_frame_cache::aregs, arreg_number(), xtensa_frame_cache::base, gdbarch::byte_order, xtensa_frame_cache::c0, call0_frame_cache(), CALLINC, xtensa_windowed_frame_cache::callsize, fp_regnum, xtensa_call0_frame_cache::fp_regnum, gdbarch_byte_order(), gdbarch_pc_regnum(), gdbarch_ps_regnum(), get_frame_arch(), get_frame_func(), get_frame_register_unsigned(), gdbarch_tdep::num_aregs, xtensa_frame_cache::pc, xtensa_frame_cache::prev_sp, cleanup_check::ps, xtensa_frame_cache::ps, PS_CALLINC_MASK, PS_CALLINC_SHIFT, gdbarch::ps_regnum, xtensa_frame_cache::ra, read_memory_integer(), regnum, safe_read_memory_integer(), TX_PS, xtensa_windowed_frame_cache::wb, xtensa_frame_cache::wd, windowing_enabled(), WINSIZE, xtensa_windowed_frame_cache::ws, xtensa_alloc_frame_cache(), XTENSA_IS_ENTRY, xtensa_read_register(), xtensa_scan_prologue(), xtensa_window_interrupt_frame_cache(), and xtensa_window_interrupt_insn().

Referenced by xtensa_frame_base_address(), xtensa_frame_prev_register(), and xtensa_frame_this_id().

## ◆ xtensa_frame_prev_register()

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

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

References gdbarch_tdep::a0_base, gdbarch_tdep::ar_base, areg_number(), xtensa_windowed_frame_cache::aregs, arreg_number(), xtensa_frame_cache::c0, xtensa_call0_frame_cache::c0_fp, C0_NOSTK, C0_NREGS, xtensa_call0_frame_cache::c0_rt, xtensa_frame_cache::call0, xtensa_call0_frame_cache::fp_regnum, xtensa_c0reg::fr_ofs, frame_unwind_got_constant(), frame_unwind_got_memory(), frame_unwind_got_register(), gdbarch_pc_regnum(), gdbarch_ps_regnum(), gdbarch_tdep(), get_frame_arch(), if(), xtensa_frame_cache::prev_sp, xtensa_frame_cache::ps, xtensa_frame_cache::ra, regnum, xtensa_c0reg::to_stk, xtensa_windowed_frame_cache::wb, gdbarch_tdep::wb_regnum, xtensa_frame_cache::wd, xtensa_windowed_frame_cache::ws, gdbarch_tdep::ws_regnum, xtensa_frame_cache(), and XTENSA_NUM_SAVED_AREGS.

## ◆ xtensa_frame_this_id()

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

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

References frame_id_build(), xtensa_frame_cache::pc, xtensa_frame_cache::prev_sp, and xtensa_frame_cache().

## ◆ xtensa_gdbarch_init()

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

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

References gdbarch_tdep::a0_base, gdbarch_info::byte_order, core_addr_lessthan(), DEBUGTRACE, dwarf2_append_unwinders(), frame_base_set_default(), frame_unwind_append_unwinder(), gdbarch_alloc(), gdbarch_init_osabi(), gdbarch_tdep::num_pseudo_regs, gdbarch_tdep::num_regs, gdbarch_tdep::pc_regnum, 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(), TARGET_CHAR_BIT, gdbarch::tdep, 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_session_once_reported, xtensa_skip_prologue(), xtensa_sw_breakpoint_from_kind(), xtensa_tdep, xtensa_unwind, xtensa_unwind_pc(), and xtensa_verify_config().

Referenced by _initialize_xtensa_tdep().

## ◆ xtensa_init_reggroups()

static void xtensa_init_reggroups | ( | void |  | ) |
| static

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

References reggroup_new(), USER_REGGROUP, xstrprintf(), xtensa_ar_reggroup, xtensa_cp, XTENSA_MAX_COPROCESSOR, xtensa_user_reggroup, and xtensa_vectra_reggroup.

Referenced by _initialize_xtensa_tdep().

## ◆ 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 901 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,
|  | struct regcache * | regcache,
|  | int | regnum,
|  | gdb_byte * | buffer
| ) |  |
| static

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

References _, arreg_number(), CallAbiCall0Only, DEBUGTRACE, flags, gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_tdep(), internal_error(), REG_VALID, regcache_raw_read(), regcache_raw_read_unsigned(), gdbarch_tdep::regmap, regnum, status, gdbarch_tdep::target_flags, warning(), xtensa_register_name(), xtensa_register_read_masked(), xtRegisterTypeMapped, xtRegisterTypeTieRegfile, xtRegisterTypeTieState, xtRegisterTypeUnknown, xtRegisterTypeUnmapped, xtTargetFlagsNonVisibleRegs, and xtTargetFlagsUseFetchStore.

Referenced by xtensa_gdbarch_init().

## ◆ xtensa_pseudo_register_write()

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

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

References _, arreg_number(), DEBUGTRACE, flags, gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_tdep(), internal_error(), regcache_raw_read_unsigned(), regcache_raw_write(), gdbarch_tdep::regmap, regnum, gdbarch_tdep::target_flags, warning(), xtensa_register_name(), xtensa_register_write_masked(), xtRegisterTypeMapped, xtRegisterTypeTieRegfile, xtRegisterTypeTieState, xtRegisterTypeUnknown, xtRegisterTypeUnmapped, xtTargetFlagsNonVisibleRegs, and xtTargetFlagsUseFetchStore.

Referenced by xtensa_gdbarch_init().

## ◆ 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,
|  | int | struct_return,
|  | CORE_ADDR | struct_addr
| ) |  |
| static

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

References align_down(), ARG_1ST, ARG_NOF, builtin_type::builtin_long, builtin_type(), gdbarch::byte_order, CallAbiCall0Only, check_typedef(), DEBUGINFO, DEBUGTRACE, extract_unsigned_integer(), fprintf_unfiltered(), gdb_stdlog, gdbarch_byte_order(), gdbarch_ps_regnum(), host_address_to_string, gdb.printer.bound_registers::long, offset, cleanup_check::ps, read_memory(), regcache_cooked_write(), regcache_cooked_write_unsigned(), regcache_raw_read(), regcache_raw_read_unsigned(), REGISTER_SIZE, size, SP_ALIGNMENT, store_unsigned_integer(), TARGET_CHAR_BIT, TYPE_CODE, TYPE_CODE_BOOL, TYPE_CODE_CHAR, TYPE_CODE_ENUM, TYPE_CODE_FLT, TYPE_CODE_INT, TYPE_CODE_RANGE, TYPE_CODE_STRUCT, TYPE_LENGTH, value_cast(), value_contents(), value_type(), write_memory(), and xtensa_debug_level.

Referenced by xtensa_gdbarch_init().

## ◆ xtensa_read_register()

static unsigned long xtensa_read_register | ( | int | regnum | ) |
| static

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

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

Referenced by call0_track_op(), execute_l32e(), execute_s32e(), xtensa_frame_cache(), and xtensa_window_interrupt_frame_cache().

## ◆ xtensa_reg_to_regnum()

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

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

References gdbarch_tdep::a0_base, gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_tdep(), gdbarch_tdep::regmap, regnum, and xtensa_register_t::target_number.

Referenced by xtensa_gdbarch_init().

## ◆ xtensa_register_name()

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

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

References _, gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_tdep(), internal_error(), xtensa_register_t::name, gdbarch_tdep::regmap, and regnum.

Referenced by xtensa_gdbarch_init(), xtensa_pseudo_register_read(), and xtensa_pseudo_register_write().

## ◆ xtensa_register_read_masked()

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

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

References _, regcache::arch(), DEBUGTRACE, error(), gdbarch_byte_order(), reg::name, REG_VALID, regcache_cooked_read_unsigned(), size, status, and XTENSA_MAX_REGISTER_SIZE.

Referenced by xtensa_pseudo_register_read().

## ◆ xtensa_register_reggroup_p()

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

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

References all_reggroup, float_reggroup, gdbarch_num_regs(), gdbarch_tdep(), general_reggroup, gdbarch_tdep::regmap, regnum, restore_reggroup, save_reggroup, SAVE_REST_FLAGS, SAVE_REST_VALID, system_reggroup, vector_reggroup, xtensa_ar_reggroup, xtensa_coprocessor_register_group(), xtensa_user_reggroup, xtensa_vectra_reggroup, xtRegisterGroupAddrReg, xtRegisterGroupCP0, xtRegisterGroupFloat, xtRegisterGroupGeneral, xtRegisterGroupState, xtRegisterGroupUser, xtRegisterGroupVectra, xtRegisterTypeUnknown, and xtRegisterTypeUnmapped.

Referenced by xtensa_gdbarch_init().

## ◆ xtensa_register_type()

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

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

References _, gdbarch_tdep::a0_base, gdbarch_tdep::ar_base, arch_integer_type(), builtin_type::builtin_data_ptr, builtin_type::builtin_int, builtin_type(), builtin_type::builtin_uint128, builtin_type::builtin_uint16, builtin_type::builtin_uint32, builtin_type::builtin_uint64, builtin_type::builtin_uint8, gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_pc_regnum(), gdbarch_tdep(), internal_error(), name, ctype_cache::next, gdbarch_tdep::num_aregs, gdbarch_tdep::regmap, regnum, ctype_cache::size, size, gdbarch_tdep::type_entries, ctype_cache::virtual_type, xfree(), XNEW, and xstrprintf().

Referenced by xtensa_gdbarch_init().

## ◆ xtensa_register_write_masked()

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

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

References _, regcache::arch(), DEBUGTRACE, error(), gdbarch_byte_order(), arm-linux::m, regcache_cooked_read_unsigned(), regcache_cooked_write_unsigned(), size, and XTENSA_MAX_REGISTER_SIZE.

Referenced by xtensa_pseudo_register_write().

## ◆ 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

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

References DEBUGTRACE, gdb_assert, RETURN_VALUE_REGISTER_CONVENTION, RETURN_VALUE_STRUCT_CONVENTION, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_LENGTH, xtensa_extract_return_value(), and xtensa_store_return_value().

Referenced by xtensa_gdbarch_init().

## ◆ xtensa_scan_prologue()

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

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

References gdbarch_tdep::a0_base, find_pc_partial_function(), fp_regnum, gdb_assert, gdbarch_tdep(), RETURN_FP, target_read_memory(), xtensa_default_isa, and XTENSA_ISA_BSZ.

Referenced by xtensa_frame_cache(), and xtensa_window_interrupt_frame_cache().

## ◆ xtensa_skip_prologue()

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

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

References call0_analyze_prologue(), call0_ret(), CallAbiCall0Only, DEBUGTRACE, symtab_and_line::end, find_pc_line(), find_pc_partial_function(), symtab_and_line::line, and xtensa_alloc_frame_cache().

Referenced by xtensa_gdbarch_init().

## ◆ xtensa_store_return_value()

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

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

References _, gdbarch_tdep::a0_base, regcache::arch(), arreg_number(), C0_ARGS, CallAbiCall0Only, DEBUGTRACE, extract_call_winsize(), gdbarch_byte_order(), gdbarch_pc_regnum(), gdbarch_tdep(), internal_error(), offset, regcache_raw_read_unsigned(), regcache_raw_write(), regcache_raw_write_part(), and TYPE_LENGTH.

Referenced by xtensa_return_value().

## ◆ xtensa_supply_gregset()

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

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

References xtensa_elf_gregset_t::ar, gdbarch_tdep::ar_base, regcache::arch(), DEBUGTRACE, gdbarch_pc_regnum(), gdbarch_ps_regnum(), gdbarch_tdep(), xtensa_elf_gregset_t::lbeg, xtensa_elf_gregset_t::lcount, xtensa_elf_gregset_t::lend, gdbarch_tdep::num_aregs, xtensa_elf_gregset_t::pc, xtensa_elf_gregset_t::ps, regcache_raw_supply(), regnum, xtensa_elf_gregset_t::sar, xtensa_elf_gregset_t::windowbase, and xtensa_elf_gregset_t::windowstart.

## ◆ xtensa_sw_breakpoint_from_kind()

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

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

References big_breakpoint, BIG_BREAKPOINT, DENSITY_BIG_BREAKPOINT, DENSITY_LITTLE_BREAKPOINT, gdbarch_byte_order(), little_breakpoint, LITTLE_BREAKPOINT, and size.

Referenced by xtensa_gdbarch_init().

## ◆ xtensa_unwind_pc()

static CORE_ADDR xtensa_unwind_pc | ( | struct gdbarch * | gdbarch,
|  | struct frame_info * | next_frame
| ) |  |
| static

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

References DEBUGINFO, DEBUGTRACE, extract_typed_address(), frame_unwind_register(), gdbarch_pc_regnum(), host_address_to_string, and xtensa_frame_cache::pc.

Referenced by xtensa_gdbarch_init().

## ◆ xtensa_verify_config()

static void xtensa_verify_config | ( | struct gdbarch * | gdbarch | ) |
| static

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

References _, gdbarch_tdep::a0_base, gdbarch_tdep::ar_base, gdbarch_tdep(), internal_error(), gdbarch_tdep::isa_use_exceptions, gdbarch_tdep::isa_use_windowed_registers, cleanup_check::log(), gdbarch_tdep::num_aregs, gdbarch_tdep::pc_regnum, gdbarch_tdep::ps_regnum, gdbarch_tdep::wb_regnum, and gdbarch_tdep::ws_regnum.

Referenced by xtensa_gdbarch_init().

## ◆ xtensa_window_interrupt_frame_cache()

static void xtensa_window_interrupt_frame_cache | ( | struct frame_info * | this_frame,
|  | xtensa_frame_cache_t * | cache,
|  | CORE_ADDR | pc
| ) |  |
| static

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

References _, xtensa_windowed_frame_cache::aregs, arreg_number(), xtensa_frame_cache::base, xtensa_frame_cache::call0, xtensa_windowed_frame_cache::callsize, error(), execute_code(), gdbarch_ps_regnum(), get_frame_arch(), get_frame_func(), get_frame_register_unsigned(), if(), xtensa_frame_cache::pc, xtensa_frame_cache::prev_sp, cleanup_check::ps, xtensa_frame_cache::ps, PS_EXC, xtensa_frame_cache::ra, regnum, xtensa_windowed_frame_cache::wb, xtensa_frame_cache::wd, WINSIZE, xtensa_windowed_frame_cache::ws, xtensa_find_register_by_name(), XTENSA_NUM_SAVED_AREGS, xtensa_read_register(), xtensa_scan_prologue(), xtNoExceptionHandler, and xtWindowOverflow.

Referenced by xtensa_frame_cache().

## ◆ xtensa_window_interrupt_insn()

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

Definition at line 1091 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 177 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 2716 of file xtensa-tdep.c.

Referenced by execute_code(), and execute_l32e().

## ◆ a0_was_saved

int a0_was_saved
| static

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

Referenced by execute_code(), and execute_l32e().

## ◆ a11_saved

CORE_ADDR a11_saved
| static

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

Referenced by execute_code(), and execute_l32e().

## ◆ a11_was_saved

int a11_was_saved
| static

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

Referenced by execute_code(), and execute_l32e().

## ◆ a7_saved

CORE_ADDR a7_saved
| static

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

Referenced by execute_code(), and execute_l32e().

## ◆ a7_was_saved

int a7_was_saved
| static

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

Referenced by execute_code(), and execute_l32e().

## ◆ xtensa_ar_reggroup

struct reggroup* xtensa_ar_reggroup
| static

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

Referenced by xtensa_add_reggroups(), xtensa_init_reggroups(), and xtensa_register_reggroup_p().

## ◆ xtensa_cp

struct reggroup* xtensa_cp[XTENSA_MAX_COPROCESSOR]
| static

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

Referenced by xtensa_add_reggroups(), xtensa_coprocessor_register_group(), and xtensa_init_reggroups().

## ◆ xtensa_debug_level

unsigned int xtensa_debug_level = 0
| static

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

Referenced by _initialize_xtensa_tdep(), and xtensa_push_dummy_call().

## ◆ xtensa_default_isa

xtensa_isa xtensa_default_isa

Referenced by call0_analyze_prologue(), call0_ret(), execute_code(), xtensa_gdbarch_init(), and xtensa_scan_prologue().

## ◆ xtensa_frame_base

const struct frame_base xtensa_frame_base
| static

Initial value:
=
{
&xtensa_unwind,
xtensa_frame_base_address,
xtensa_frame_base_address,
xtensa_frame_base_address
}
xtensa_frame_base_address
static CORE_ADDR xtensa_frame_base_address(struct frame_info *this_frame, void **this_cache)
Definition: xtensa-tdep.c:1533
xtensa_unwind
static const struct frame_unwind xtensa_unwind
Definition: xtensa-tdep.c:1522

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

Referenced by xtensa_gdbarch_init().

## ◆ xtensa_gregset

struct regset xtensa_gregset
| static

Initial value:
=
{
NULL,
xtensa_supply_gregset
}
xtensa_supply_gregset
static void xtensa_supply_gregset(const struct regset *regset, struct regcache *rc, int regnum, const void *gregs, size_t len)
Definition: xtensa-tdep.c:839

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

Referenced by xtensa_iterate_over_regset_sections().

## ◆ xtensa_session_once_reported

int xtensa_session_once_reported = 1
| static

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

Referenced by warning_once(), and xtensa_gdbarch_init().

## ◆ xtensa_tdep

struct gdbarch_tdep xtensa_tdep

Referenced by xtensa_gdbarch_init().

## ◆ xtensa_unwind

const struct frame_unwind xtensa_unwind
| static

Initial value:
=
{
NORMAL_FRAME,
default_frame_unwind_stop_reason,
xtensa_frame_this_id,
xtensa_frame_prev_register,
NULL,
default_frame_sniffer
}
NORMAL_FRAME
Definition: frame.h:244
default_frame_sniffer
int default_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
Definition: frame-unwind.c:174
xtensa_frame_prev_register
static struct value * xtensa_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
Definition: xtensa-tdep.c:1432
xtensa_frame_this_id
static void xtensa_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
Definition: xtensa-tdep.c:1418
default_frame_unwind_stop_reason
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 1522 of file xtensa-tdep.c.

Referenced by xtensa_gdbarch_init().

## ◆ xtensa_user_reggroup

struct reggroup* xtensa_user_reggroup
| static

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

Referenced by xtensa_add_reggroups(), xtensa_init_reggroups(), and xtensa_register_reggroup_p().

## ◆ xtensa_vectra_reggroup

struct reggroup* xtensa_vectra_reggroup
| static

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

Referenced by xtensa_add_reggroups(), xtensa_init_reggroups(), and xtensa_register_reggroup_p().