GDB (xrefs)

Classes | Macros | Enumerations | Functions | Variables
/tmp/gdb-8.1/gdb/nds32-tdep.c File Reference
`#include "defs.h"`
`#include "frame.h"`
`#include "frame-unwind.h"`
`#include "frame-base.h"`
`#include "symtab.h"`
`#include "gdbtypes.h"`
`#include "gdbcore.h"`
`#include "value.h"`
`#include "reggroups.h"`
`#include "inferior.h"`
`#include "osabi.h"`
`#include "arch-utils.h"`
`#include "regcache.h"`
`#include "dis-asm.h"`
`#include "user-regs.h"`
`#include "elf-bfd.h"`
`#include "dwarf2-frame.h"`
`#include "remote.h"`
`#include "target-descriptions.h"`
`#include "nds32-tdep.h"`
`#include "elf/nds32.h"`
`#include "opcode/nds32.h"`
`#include <algorithm>`
`#include "features/nds32.c"`

Go to the source code of this file.

## Classes
struct | nds32_frame_cache

## Macros
#define | CHOP_BITS(insn, n) (insn & ~__MASK (n))
#define | N32_LSMW_ENABLE4(insn) (((insn) >> 6) & 0xf)
#define | N32_SMW_ADM N32_TYPE4 (LSMW, 0, 0, 0, 1, (N32_LSMW_ADM << 2) | N32_LSMW_LSMW)
#define | N32_LMW_BIM N32_TYPE4 (LSMW, 0, 0, 0, 0, (N32_LSMW_BIM << 2) | N32_LSMW_LSMW)
#define | N32_FLDI_SP N32_TYPE2 (LDC, 0, REG_SP, 0)
#define | NDS32_NUM_SAVED_REGS (NDS32_LP_REGNUM + 1)

## Enumerations
enum | { REG_UNAVAIL = (CORE_ADDR) -1 }
enum | { INVALID_OFFSET = (CORE_ADDR) -1 }
enum | { INSN_NORMAL, INSN_RESET_SP, INSN_RECOVER, INSN_RETURN, INSN_RECOVER_RETURN }

## Functions
static struct value * | value_of_nds32_reg (struct frame_info *frame, const void *baton)
static CORE_ADDR | nds32_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
typedef | BP_MANIPULATION (nds32_break_insn)
static void | nds32_init_reggroups (void)
static void | nds32_add_reggroups (struct gdbarch *gdbarch)
static int | nds32_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
static struct type * | nds32_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
static const char * | nds32_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
static enum register_status | nds32_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int regnum, gdb_byte *buf)
static void | nds32_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int regnum, const gdb_byte *buf)
static int | nds32_abi_use_fpr (int elf_abi)
static int | nds32_abi_split (int elf_abi)
static struct nds32_frame_cache * | nds32_alloc_frame_cache (void)
static void | nds32_push_multiple_words (struct nds32_frame_cache *cache, int rb, int re, int enable4)
static CORE_ADDR | nds32_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR limit_pc, struct nds32_frame_cache *cache)
static CORE_ADDR | nds32_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
static struct nds32_frame_cache * | nds32_frame_cache (struct frame_info *this_frame, void **this_cache)
static void | nds32_frame_this_id (struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
static struct value * | nds32_frame_prev_register (struct frame_info *this_frame, void **this_cache, int regnum)
static CORE_ADDR | nds32_frame_base_address (struct frame_info *this_frame, void **this_cache)
static void | nds32_pop_multiple_words (struct nds32_frame_cache *cache, int rb, int re, int enable4)
static int | nds32_analyze_epilogue_insn32 (int abi_use_fpr, uint32_t insn, struct nds32_frame_cache *cache)
static int | nds32_analyze_epilogue_insn16 (uint32_t insn, struct nds32_frame_cache *cache)
static int | nds32_analyze_epilogue (struct gdbarch *gdbarch, CORE_ADDR pc, struct nds32_frame_cache *cache)
static int | nds32_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr)
static int | nds32_epilogue_frame_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
static struct nds32_frame_cache * | nds32_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache)
static void | nds32_epilogue_frame_this_id (struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
static struct value * | nds32_epilogue_frame_prev_register (struct frame_info *this_frame, void **this_cache, int regnum)
static struct frame_id | nds32_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
static CORE_ADDR | nds32_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
static CORE_ADDR | nds32_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
static int | nds32_check_calling_use_fpr (struct type *type)
static int | nds32_type_align (struct type *type)
static CORE_ADDR | nds32_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 void | nds32_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, gdb_byte *valbuf)
static void | nds32_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
static enum return_value_convention | nds32_return_value (struct gdbarch *gdbarch, struct value *func_type, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
static int | nds32_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
static int | nds32_validate_tdesc_p (const struct target_desc *tdesc, struct tdesc_arch_data *tdesc_data, int *fpu_freg, int *use_pseudo_fsrs)
static struct gdbarch * | nds32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
void | _initialize_nds32_tdep (void)

## Variables
static const char *const | nds32_register_names []
static const char *const | nds32_fdr_register_names []
static const char *const | nds32_fsr_register_names []
const int | num_fdr_map [] = { 4, 8, 16, 32 }
const int | num_fsr_map [] = { 8, 16, 32, 32 }
struct {
const char * name
const char * alias
} | nds32_register_aliases []
constexpr gdb_byte | nds32_break_insn [] = { 0xEA, 0x00 }
static struct reggroup * | nds32_cr_reggroup
static struct reggroup * | nds32_ir_reggroup
static struct reggroup * | nds32_mr_reggroup
static struct reggroup * | nds32_dr_reggroup
static struct reggroup * | nds32_pfr_reggroup
static struct reggroup * | nds32_hspr_reggroup
static struct reggroup * | nds32_dmar_reggroup
static struct reggroup * | nds32_racr_reggroup
static struct reggroup * | nds32_idr_reggroup
static struct reggroup * | nds32_secur_reggroup
static const struct frame_unwind | nds32_frame_unwind
static const struct frame_base | nds32_frame_base
static const struct frame_unwind | nds32_epilogue_frame_unwind

## Macro Definition Documentation

## ◆ CHOP_BITS

#define CHOP_BITS | ( |  | insn,
|  |  | n
| ) |  | (insn & ~__MASK (n))

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

Referenced by nds32_analyze_epilogue_insn16(), nds32_analyze_epilogue_insn32(), and nds32_analyze_prologue().

## ◆ N32_FLDI_SP

#define N32_FLDI_SP N32_TYPE2 (LDC, 0, REG_SP, 0)

Definition at line 55 of file nds32-tdep.c.

Referenced by nds32_analyze_epilogue_insn32().

## ◆ N32_LMW_BIM

#define N32_LMW_BIM N32_TYPE4 (LSMW, 0, 0, 0, 0, (N32_LSMW_BIM << 2) | N32_LSMW_LSMW)

Definition at line 53 of file nds32-tdep.c.

Referenced by nds32_analyze_epilogue_insn32().

## ◆ N32_LSMW_ENABLE4

#define N32_LSMW_ENABLE4 | ( |  | insn | ) | (((insn) >> 6) & 0xf)

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

Referenced by nds32_analyze_epilogue_insn32(), and nds32_analyze_prologue().

## ◆ N32_SMW_ADM

#define N32_SMW_ADM N32_TYPE4 (LSMW, 0, 0, 0, 1, (N32_LSMW_ADM << 2) | N32_LSMW_LSMW)

Definition at line 51 of file nds32-tdep.c.

Referenced by nds32_analyze_prologue().

## ◆ NDS32_NUM_SAVED_REGS

#define NDS32_NUM_SAVED_REGS (NDS32_LP_REGNUM + 1)

Definition at line 530 of file nds32-tdep.c.

Referenced by nds32_alloc_frame_cache(), nds32_epilogue_frame_cache(), and nds32_frame_cache().

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
REG_UNAVAIL |

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

## ◆ anonymous enum

anonymous enum

Enumerator
INVALID_OFFSET |

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

## ◆ anonymous enum

anonymous enum

Enumerator
INSN_NORMAL |
INSN_RESET_SP |
INSN_RECOVER |
INSN_RETURN |
INSN_RECOVER_RETURN |

Definition at line 65 of file nds32-tdep.c.

## Function Documentation

## ◆ _initialize_nds32_tdep()

void _initialize_nds32_tdep | ( | void |  | ) |

Definition at line 2174 of file nds32-tdep.c.

References initialize_tdesc_nds32(), nds32_gdbarch_init(), nds32_init_reggroups(), and register_gdbarch_init().

## ◆ BP_MANIPULATION()

typedef BP_MANIPULATION | ( | nds32_break_insn |  | ) |

Definition at line 285 of file nds32-tdep.c.

References gdbarch_tdep::fs0_regnum, gdbarch_tdep(), and NDS32_FD0_REGNUM.

## ◆ nds32_abi_split()

static int nds32_abi_split | ( | int | elf_abi | ) |
| static

Definition at line 525 of file nds32-tdep.c.

References gdbarch_tdep::elf_abi.

Referenced by nds32_push_dummy_call().

## ◆ nds32_abi_use_fpr()

static int nds32_abi_use_fpr | ( | int | elf_abi | ) |
| static

Definition at line 516 of file nds32-tdep.c.

References gdbarch_tdep::elf_abi.

Referenced by nds32_analyze_epilogue(), nds32_analyze_prologue(), nds32_extract_return_value(), nds32_push_dummy_call(), nds32_stack_frame_destroyed_p(), and nds32_store_return_value().

## ◆ nds32_add_reggroups()

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

Definition at line 344 of file nds32-tdep.c.

References all_reggroup, float_reggroup, general_reggroup, nds32_cr_reggroup, nds32_dmar_reggroup, nds32_dr_reggroup, nds32_hspr_reggroup, nds32_idr_reggroup, nds32_ir_reggroup, nds32_mr_reggroup, nds32_pfr_reggroup, nds32_racr_reggroup, nds32_secur_reggroup, reggroup_add(), restore_reggroup, save_reggroup, and system_reggroup.

Referenced by nds32_gdbarch_init().

## ◆ nds32_alloc_frame_cache()

static struct nds32_frame_cache* nds32_alloc_frame_cache | ( | void |  | ) |
| static

Definition at line 559 of file nds32-tdep.c.

References nds32_frame_cache::fp_offset, FRAME_OBSTACK_ZALLOC, INVALID_OFFSET, NDS32_NUM_SAVED_REGS, REG_UNAVAIL, and nds32_frame_cache::saved_regs.

Referenced by nds32_epilogue_frame_cache(), and nds32_frame_cache().

## ◆ nds32_analyze_epilogue()

static int nds32_analyze_epilogue | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | pc,
|  | struct nds32_frame_cache * | cache
| ) |  |
| static

Definition at line 1176 of file nds32-tdep.c.

References gdbarch_tdep::elf_abi, gdbarch_tdep(), INSN_NORMAL, INSN_RECOVER, INSN_RECOVER_RETURN, INSN_RETURN, nds32_abi_use_fpr(), nds32_analyze_epilogue_insn16(), nds32_analyze_epilogue_insn32(), gdbarch_tdep::pc, and read_memory_unsigned_integer().

Referenced by nds32_epilogue_frame_cache(), and nds32_stack_frame_destroyed_p().

## ◆ nds32_analyze_epilogue_insn16()

static int nds32_analyze_epilogue_insn16 | ( | uint32_t | insn,
|  | struct nds32_frame_cache * | cache
| ) |  |
| inline static

Definition at line 1128 of file nds32-tdep.c.

References CHOP_BITS, INSN_NORMAL, INSN_RECOVER, INSN_RECOVER_RETURN, INSN_RETURN, nds32_pop_multiple_words(), and nds32_frame_cache::sp_offset.

Referenced by nds32_analyze_epilogue(), and nds32_stack_frame_destroyed_p().

## ◆ nds32_analyze_epilogue_insn32()

static int nds32_analyze_epilogue_insn32 | ( | int | abi_use_fpr,
|  | uint32_t | insn,
|  | struct nds32_frame_cache * | cache
| ) |  |
| inline static

Definition at line 1071 of file nds32-tdep.c.

References ADD, CHOP_BITS, INSN_NORMAL, INSN_RECOVER, INSN_RESET_SP, INSN_RETURN, N32_FLDI_SP, N32_LMW_BIM, N32_LSMW_ENABLE4, nds32_pop_multiple_words(), offset, and nds32_frame_cache::sp_offset.

Referenced by nds32_analyze_epilogue(), and nds32_stack_frame_destroyed_p().

## ◆ nds32_analyze_prologue()

static CORE_ADDR nds32_analyze_prologue | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | pc,
|  | CORE_ADDR | limit_pc,
|  | struct nds32_frame_cache * | cache
| ) |  |
| static

Definition at line 616 of file nds32-tdep.c.

References ADD, CHOP_BITS, gdbarch_tdep::elf_abi, nds32_frame_cache::fp_offset, gdbarch_tdep(), N32_LSMW_ENABLE4, N32_SMW_ADM, nds32_abi_use_fpr(), nds32_push_multiple_words(), gdbarch_tdep::pc, read_memory_unsigned_integer(), and nds32_frame_cache::sp_offset.

Referenced by nds32_frame_cache(), and nds32_skip_prologue().

## ◆ nds32_check_calling_use_fpr()

static int nds32_check_calling_use_fpr | ( | struct type * | type | ) |
| static

Definition at line 1421 of file nds32-tdep.c.

References check_typedef(), type, TYPE_CODE, TYPE_CODE_FLT, TYPE_CODE_STRUCT, TYPE_FIELD_TYPE, and TYPE_NFIELDS.

Referenced by nds32_extract_return_value(), nds32_push_dummy_call(), and nds32_store_return_value().

## ◆ nds32_dummy_id()

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

Definition at line 1394 of file nds32-tdep.c.

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

Referenced by nds32_gdbarch_init().

## ◆ nds32_epilogue_frame_cache()

static struct nds32_frame_cache* nds32_epilogue_frame_cache | ( | struct frame_info * | this_frame,
|  | void ** | this_cache
| ) |  |
| static

Definition at line 1312 of file nds32-tdep.c.

References get_frame_arch(), get_frame_func(), get_frame_pc(), get_frame_register_unsigned(), nds32_alloc_frame_cache(), nds32_analyze_epilogue(), NDS32_NUM_SAVED_REGS, NDS32_SP_REGNUM, nds32_frame_cache::pc, nds32_frame_cache::prev_sp, REG_UNAVAIL, nds32_frame_cache::saved_regs, and nds32_frame_cache::sp_offset.

Referenced by nds32_epilogue_frame_prev_register(), and nds32_epilogue_frame_this_id().

## ◆ nds32_epilogue_frame_prev_register()

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

Definition at line 1360 of file nds32-tdep.c.

References frame_unwind_got_constant(), frame_unwind_got_memory(), frame_unwind_got_register(), nds32_epilogue_frame_cache(), NDS32_LP_REGNUM, NDS32_PC_REGNUM, NDS32_SP_REGNUM, nds32_frame_cache::prev_sp, REG_UNAVAIL, regnum, and nds32_frame_cache::saved_regs.

## ◆ nds32_epilogue_frame_sniffer()

static int nds32_epilogue_frame_sniffer | ( | const struct frame_unwind * | self,
|  | struct frame_info * | this_frame,
|  | void ** | this_cache
| ) |  |
| static

Definition at line 1296 of file nds32-tdep.c.

References frame_relative_level(), get_frame_arch(), get_frame_pc(), and nds32_stack_frame_destroyed_p().

## ◆ nds32_epilogue_frame_this_id()

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

Definition at line 1344 of file nds32-tdep.c.

References frame_id_build(), nds32_epilogue_frame_cache(), nds32_frame_cache::pc, and nds32_frame_cache::prev_sp.

## ◆ nds32_extract_return_value()

static void nds32_extract_return_value | ( | struct gdbarch * | gdbarch,
|  | struct type * | type,
|  | struct regcache * | regcache,
|  | gdb_byte * | valbuf
| ) |  |
| static

Definition at line 1728 of file nds32-tdep.c.

References _, gdbarch_tdep::elf_abi, gdbarch_tdep::fs0_regnum, gdbarch_byte_order(), gdbarch_tdep(), internal_error(), nds32_abi_use_fpr(), nds32_check_calling_use_fpr(), NDS32_FD0_REGNUM, NDS32_R0_REGNUM, regcache_cooked_read(), regcache_cooked_read_unsigned(), store_unsigned_integer(), and TYPE_LENGTH.

Referenced by nds32_return_value().

## ◆ nds32_frame_align()

static CORE_ADDR nds32_frame_align | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | sp
| ) |  |
| static

Definition at line 276 of file nds32-tdep.c.

References align_down().

Referenced by nds32_gdbarch_init().

## ◆ nds32_frame_base_address()

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

Definition at line 1011 of file nds32-tdep.c.

References nds32_frame_cache::base, and nds32_frame_cache().

## ◆ nds32_frame_cache()

static struct nds32_frame_cache* nds32_frame_cache | ( | struct frame_info * | this_frame,
|  | void ** | this_cache
| ) |  |
| static

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

References nds32_frame_cache::base, nds32_frame_cache::fp_offset, get_frame_arch(), get_frame_func(), get_frame_pc(), get_frame_register_unsigned(), INVALID_OFFSET, nds32_alloc_frame_cache(), nds32_analyze_prologue(), NDS32_FP_REGNUM, NDS32_NUM_SAVED_REGS, NDS32_SP_REGNUM, nds32_frame_cache::pc, nds32_frame_cache::prev_sp, REG_UNAVAIL, nds32_frame_cache::saved_regs, and nds32_frame_cache::sp_offset.

Referenced by nds32_frame_base_address(), nds32_frame_prev_register(), and nds32_frame_this_id().

## ◆ nds32_frame_prev_register()

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

Definition at line 978 of file nds32-tdep.c.

References frame_unwind_got_constant(), frame_unwind_got_memory(), frame_unwind_got_register(), nds32_frame_cache(), NDS32_LP_REGNUM, NDS32_PC_REGNUM, NDS32_SP_REGNUM, nds32_frame_cache::prev_sp, REG_UNAVAIL, regnum, and nds32_frame_cache::saved_regs.

## ◆ nds32_frame_this_id()

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

Definition at line 963 of file nds32-tdep.c.

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

## ◆ nds32_gdbarch_init()

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

Definition at line 2024 of file nds32-tdep.c.

References gdbarch_info::abfd, alias, core_addr_lessthan(), dwarf2_append_unwinders(), gdbarch_tdep::elf_abi, gdbarch_tdep::fpu_freg, frame_base_set_default(), frame_unwind_append_unwinder(), gdbarch_tdep::fs0_regnum, gdbarch_list::gdbarch, gdbarch_alloc(), gdbarch_init_osabi(), gdbarch_list_lookup_by_info(), gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_register_name(), gdbarch_tdep(), name, nds32_add_reggroups(), nds32_dummy_id(), nds32_epilogue_frame_unwind, nds32_frame_align(), nds32_frame_base, nds32_frame_unwind, nds32_get_longjmp_target(), NDS32_NUM_REGS, NDS32_PC_REGNUM, nds32_pseudo_register_name(), nds32_pseudo_register_read(), nds32_pseudo_register_type(), nds32_pseudo_register_write(), nds32_push_dummy_call(), nds32_register_aliases, nds32_register_reggroup_p(), nds32_return_value(), nds32_skip_prologue(), NDS32_SP_REGNUM, nds32_stack_frame_destroyed_p(), nds32_unwind_pc(), nds32_unwind_sp(), nds32_validate_tdesc_p(), gdbarch_list::next, num_fdr_map, num_fsr_map, gdbarch_tdep::num_regs, regnum, set_gdbarch_breakpoint_kind_from_pc(), set_gdbarch_dummy_id(), set_gdbarch_dwarf2_reg_to_regnum(), set_gdbarch_frame_align(), set_gdbarch_get_longjmp_target(), set_gdbarch_inner_than(), set_gdbarch_num_pseudo_regs(), set_gdbarch_num_regs(), set_gdbarch_pc_regnum(), set_gdbarch_pseudo_register_read(), set_gdbarch_pseudo_register_write(), set_gdbarch_push_dummy_call(), set_gdbarch_register_reggroup_p(), set_gdbarch_return_value(), set_gdbarch_skip_prologue(), set_gdbarch_sp_regnum(), set_gdbarch_stack_frame_destroyed_p(), set_gdbarch_sw_breakpoint_from_kind(), set_gdbarch_unwind_pc(), set_gdbarch_unwind_sp(), set_gdbarch_wchar_bit(), set_gdbarch_wchar_signed(), set_tdesc_pseudo_register_name(), set_tdesc_pseudo_register_type(), gdbarch_info::target_desc, gdbarch_tdep::tdesc, tdesc_data, gdbarch_info::tdesc_data, tdesc_data_alloc(), tdesc_data_cleanup(), tdesc_has_registers(), tdesc_nds32, tdesc_use_registers(), gdbarch_tdep::use_pseudo_fsrs, user_reg_add(), user_reg_map_name_to_regnum(), value_of_nds32_reg(), and XCNEW.

Referenced by _initialize_nds32_tdep().

## ◆ nds32_get_longjmp_target()

static int nds32_get_longjmp_target | ( | struct frame_info * | frame,
|  | CORE_ADDR * | pc
| ) |  |
| static

Definition at line 1907 of file nds32-tdep.c.

References gdbarch::byte_order, extract_unsigned_integer(), gdbarch_byte_order(), get_frame_arch(), get_frame_register_unsigned(), NDS32_R0_REGNUM, and target_read_memory().

Referenced by nds32_gdbarch_init().

## ◆ nds32_init_reggroups()

static void nds32_init_reggroups | ( | void |  | ) |
| static

Definition at line 329 of file nds32-tdep.c.

References nds32_cr_reggroup, nds32_dmar_reggroup, nds32_dr_reggroup, nds32_hspr_reggroup, nds32_idr_reggroup, nds32_ir_reggroup, nds32_mr_reggroup, nds32_pfr_reggroup, nds32_racr_reggroup, nds32_secur_reggroup, reggroup_new(), and USER_REGGROUP.

Referenced by _initialize_nds32_tdep().

## ◆ nds32_pop_multiple_words()

static void nds32_pop_multiple_words | ( | struct nds32_frame_cache * | cache,
|  | int | rb,
|  | int | re,
|  | int | enable4
| ) |  |
| static

Definition at line 1029 of file nds32-tdep.c.

References NDS32_SP_REGNUM, nds32_frame_cache::saved_regs, and nds32_frame_cache::sp_offset.

Referenced by nds32_analyze_epilogue_insn16(), and nds32_analyze_epilogue_insn32().

## ◆ nds32_pseudo_register_name()

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

Definition at line 424 of file nds32-tdep.c.

References _, gdbarch_num_pseudo_regs(), gdbarch_num_regs(), nds32_fsr_register_names, regnum, and warning().

Referenced by nds32_gdbarch_init().

## ◆ nds32_pseudo_register_read()

static enum register_status nds32_pseudo_register_read | ( | struct gdbarch * | gdbarch,
|  | struct regcache * | regcache,
|  | int | regnum,
|  | gdb_byte * | buf
| ) |  |
| static

Definition at line 439 of file nds32-tdep.c.

References gdbarch_tdep::fpu_freg, gdb_assert, gdb_assert_not_reached, gdbarch_byte_order(), gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_tdep(), NDS32_FD0_REGNUM, offset, REG_VALID, regcache_raw_read(), regnum, status, and gdbarch_tdep::use_pseudo_fsrs.

Referenced by nds32_gdbarch_init().

## ◆ nds32_pseudo_register_type()

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

Definition at line 408 of file nds32-tdep.c.

References _, arch_float_type(), floatformats_ieee_single, gdbarch_num_pseudo_regs(), gdbarch_num_regs(), regnum, and warning().

Referenced by nds32_gdbarch_init().

## ◆ nds32_pseudo_register_write()

static void nds32_pseudo_register_write | ( | struct gdbarch * | gdbarch,
|  | struct regcache * | regcache,
|  | int | regnum,
|  | const gdb_byte * | buf
| ) |  |
| static

Definition at line 478 of file nds32-tdep.c.

References gdbarch_tdep::fpu_freg, gdb_assert, gdb_assert_not_reached, gdbarch_byte_order(), gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_tdep(), NDS32_FD0_REGNUM, offset, regcache_raw_read(), regcache_raw_write(), regnum, and gdbarch_tdep::use_pseudo_fsrs.

Referenced by nds32_gdbarch_init().

## ◆ nds32_push_dummy_call()

static CORE_ADDR nds32_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 1490 of file nds32-tdep.c.

References _, align_down(), align_up(), gdbarch_tdep::elf_abi, error(), extract_unsigned_integer(), gdbarch_tdep::fpu_freg, gdbarch_tdep::fs0_regnum, gdbarch_byte_order(), gdbarch_tdep(), internal_error(), nds32_abi_split(), nds32_abi_use_fpr(), nds32_check_calling_use_fpr(), NDS32_FD0_REGNUM, NDS32_LP_REGNUM, NDS32_R0_REGNUM, NDS32_SP_REGNUM, nds32_type_align(), regcache_cooked_write(), regcache_cooked_write_unsigned(), type, TYPE_LENGTH, TYPE_NFIELDS, TYPE_VARARGS, value_contents(), value_type(), and write_memory().

Referenced by nds32_gdbarch_init().

## ◆ nds32_push_multiple_words()

static void nds32_push_multiple_words | ( | struct nds32_frame_cache * | cache,
|  | int | rb,
|  | int | re,
|  | int | enable4
| ) |  |
| static

Definition at line 580 of file nds32-tdep.c.

References NDS32_SP_REGNUM, nds32_frame_cache::saved_regs, and nds32_frame_cache::sp_offset.

Referenced by nds32_analyze_prologue().

## ◆ nds32_register_reggroup_p()

static int nds32_register_reggroup_p | ( | struct gdbarch * | gdbarch,
|  | int | regnum,
|  | struct reggroup * | reggroup
| ) |  |
| static

Definition at line 370 of file nds32-tdep.c.

References all_reggroup, default_register_reggroup_p(), float_reggroup, gdbarch_register_name(), general_reggroup, NDS32_PC_REGNUM, reggroup_name(), regnum, restore_reggroup, save_reggroup, system_reggroup, and tdesc_register_in_reggroup_p().

Referenced by nds32_gdbarch_init().

## ◆ nds32_return_value()

static enum return_value_convention nds32_return_value | ( | struct gdbarch * | gdbarch,
|  | struct value * | func_type,
|  | struct type * | type,
|  | struct regcache * | regcache,
|  | gdb_byte * | readbuf,
|  | const gdb_byte * | writebuf
| ) |  |
| static

Definition at line 1885 of file nds32-tdep.c.

References nds32_extract_return_value(), nds32_store_return_value(), RETURN_VALUE_REGISTER_CONVENTION, RETURN_VALUE_STRUCT_CONVENTION, and TYPE_LENGTH.

Referenced by nds32_gdbarch_init().

## ◆ nds32_skip_prologue()

static CORE_ADDR nds32_skip_prologue | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | pc
| ) |  |
| static

Definition at line 878 of file nds32-tdep.c.

References find_pc_partial_function(), nds32_analyze_prologue(), gdbarch_tdep::pc, and skip_prologue_using_sal().

Referenced by nds32_gdbarch_init().

## ◆ nds32_stack_frame_destroyed_p()

static int nds32_stack_frame_destroyed_p | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | addr
| ) |  |
| static

Definition at line 1228 of file nds32-tdep.c.

References gdbarch_tdep::elf_abi, gdbarch_tdep(), INSN_NORMAL, INSN_RECOVER, INSN_RESET_SP, nds32_abi_use_fpr(), nds32_analyze_epilogue(), nds32_analyze_epilogue_insn16(), nds32_analyze_epilogue_insn32(), and read_memory_unsigned_integer().

Referenced by nds32_epilogue_frame_sniffer(), and nds32_gdbarch_init().

## ◆ nds32_store_return_value()

static void nds32_store_return_value | ( | struct gdbarch * | gdbarch,
|  | struct type * | type,
|  | struct regcache * | regcache,
|  | const gdb_byte * | valbuf
| ) |  |
| static

Definition at line 1818 of file nds32-tdep.c.

References _, gdbarch_tdep::elf_abi, extract_unsigned_integer(), gdbarch_tdep::fs0_regnum, gdbarch_byte_order(), gdbarch_tdep(), internal_error(), nds32_abi_use_fpr(), nds32_check_calling_use_fpr(), NDS32_FD0_REGNUM, NDS32_R0_REGNUM, regcache_cooked_write(), regcache_cooked_write_unsigned(), and TYPE_LENGTH.

Referenced by nds32_return_value().

## ◆ nds32_type_align()

static int nds32_type_align | ( | struct type * | type | ) |
| static

Definition at line 1445 of file nds32-tdep.c.

References _, check_typedef(), internal_error(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_BOOL, TYPE_CODE_CHAR, TYPE_CODE_COMPLEX, TYPE_CODE_ENUM, TYPE_CODE_FLT, TYPE_CODE_INT, TYPE_CODE_PTR, TYPE_CODE_RANGE, TYPE_CODE_REF, TYPE_CODE_SET, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_FIELD_TYPE, TYPE_LENGTH, TYPE_NFIELDS, and TYPE_TARGET_TYPE.

Referenced by nds32_push_dummy_call().

## ◆ nds32_unwind_pc()

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

Definition at line 1404 of file nds32-tdep.c.

References frame_unwind_register_unsigned(), and NDS32_PC_REGNUM.

Referenced by nds32_gdbarch_init().

## ◆ nds32_unwind_sp()

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

Definition at line 1412 of file nds32-tdep.c.

References frame_unwind_register_unsigned(), and NDS32_SP_REGNUM.

Referenced by nds32_gdbarch_init().

## ◆ nds32_validate_tdesc_p()

static int nds32_validate_tdesc_p | ( | const struct target_desc * | tdesc,
|  | struct tdesc_arch_data * | tdesc_data,
|  | int * | fpu_freg,
|  | int * | use_pseudo_fsrs
| ) |  |
| static

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

References NDS32_FD0_REGNUM, nds32_fdr_register_names, NDS32_FP_REGNUM, nds32_fsr_register_names, NDS32_PC_REGNUM, NDS32_R0_REGNUM, nds32_register_names, NDS32_TA_REGNUM, num_fdr_map, num_fsr_map, tdesc_data, tdesc_find_feature(), tdesc_numbered_register(), and tdesc_unnumbered_register().

Referenced by nds32_gdbarch_init().

## ◆ value_of_nds32_reg()

static struct value* value_of_nds32_reg | ( | struct frame_info * | frame,
|  | const void * | baton
| ) |  |
| static

Definition at line 268 of file nds32-tdep.c.

References value_of_register().

Referenced by nds32_gdbarch_init().

## Variable Documentation

## ◆ alias

const char* alias

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

Referenced by add_deprecated_target_alias(), add_using_directive(), alias_command(), deprecated_cmd_warning(), gdbpy_parameter(), gdbscm_parameter_value(), lookup_cmd_composition(), maintenance_do_deprecate(), and nds32_gdbarch_init().

## ◆ name

const char* name

Definition at line 113 of file nds32-tdep.c.

Referenced by nds32_gdbarch_init().

## ◆ nds32_break_insn

constexpr gdb_byte nds32_break_insn[] = { 0xEA, 0x00 }

Definition at line 283 of file nds32-tdep.c.

## ◆ nds32_cr_reggroup

struct reggroup* nds32_cr_reggroup
| static

Definition at line 317 of file nds32-tdep.c.

Referenced by nds32_add_reggroups(), and nds32_init_reggroups().

## ◆ nds32_dmar_reggroup

struct reggroup* nds32_dmar_reggroup
| static

Definition at line 323 of file nds32-tdep.c.

Referenced by nds32_add_reggroups(), and nds32_init_reggroups().

## ◆ nds32_dr_reggroup

struct reggroup* nds32_dr_reggroup
| static

Definition at line 320 of file nds32-tdep.c.

Referenced by nds32_add_reggroups(), and nds32_init_reggroups().

## ◆ nds32_epilogue_frame_unwind

const struct frame_unwind nds32_epilogue_frame_unwind
| static

Initial value:
=
{
NORMAL_FRAME,
default_frame_unwind_stop_reason,
nds32_epilogue_frame_this_id,
nds32_epilogue_frame_prev_register,
NULL,
nds32_epilogue_frame_sniffer
}
nds32_epilogue_frame_sniffer
static int nds32_epilogue_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
Definition: nds32-tdep.c:1296
nds32_epilogue_frame_this_id
static void nds32_epilogue_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
Definition: nds32-tdep.c:1344
NORMAL_FRAME
Definition: frame.h:244
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
nds32_epilogue_frame_prev_register
static struct value * nds32_epilogue_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
Definition: nds32-tdep.c:1360

Definition at line 1381 of file nds32-tdep.c.

Referenced by nds32_gdbarch_init().

## ◆ nds32_fdr_register_names

const char* const nds32_fdr_register_names[]
| static

Initial value:
=
{
"fd0", "fd1", "fd2", "fd3", "fd4", "fd5", "fd6", "fd7",
"fd8", "fd9", "fd10", "fd11", "fd12", "fd13", "fd14", "fd15",
"fd16", "fd17", "fd18", "fd19", "fd20", "fd21", "fd22", "fd23",
"fd24", "fd25", "fd26", "fd27", "fd28", "fd29", "fd30", "fd31"
}

Definition at line 90 of file nds32-tdep.c.

Referenced by nds32_validate_tdesc_p().

## ◆ nds32_frame_base

const struct frame_base nds32_frame_base
| static

Initial value:
=
{
&nds32_frame_unwind,
nds32_frame_base_address,
nds32_frame_base_address,
nds32_frame_base_address
}
nds32_frame_base_address
static CORE_ADDR nds32_frame_base_address(struct frame_info *this_frame, void **this_cache)
Definition: nds32-tdep.c:1011
nds32_frame_unwind
static const struct frame_unwind nds32_frame_unwind
Definition: nds32-tdep.c:998

Definition at line 1018 of file nds32-tdep.c.

Referenced by nds32_gdbarch_init().

## ◆ nds32_frame_unwind

const struct frame_unwind nds32_frame_unwind
| static

Initial value:
=
{
NORMAL_FRAME,
default_frame_unwind_stop_reason,
nds32_frame_this_id,
nds32_frame_prev_register,
NULL,
default_frame_sniffer,
}
nds32_frame_prev_register
static struct value * nds32_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
Definition: nds32-tdep.c:978
nds32_frame_this_id
static void nds32_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
Definition: nds32-tdep.c:963
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
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 998 of file nds32-tdep.c.

Referenced by nds32_gdbarch_init().

## ◆ nds32_fsr_register_names

const char* const nds32_fsr_register_names[]
| static

Initial value:
=
{
"fs0", "fs1", "fs2", "fs3", "fs4", "fs5", "fs6", "fs7",
"fs8", "fs9", "fs10", "fs11", "fs12", "fs13", "fs14", "fs15",
"fs16", "fs17", "fs18", "fs19", "fs20", "fs21", "fs22", "fs23",
"fs24", "fs25", "fs26", "fs27", "fs28", "fs29", "fs30", "fs31"
}

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

Referenced by nds32_pseudo_register_name(), and nds32_validate_tdesc_p().

## ◆ nds32_hspr_reggroup

struct reggroup* nds32_hspr_reggroup
| static

Definition at line 322 of file nds32-tdep.c.

Referenced by nds32_add_reggroups(), and nds32_init_reggroups().

## ◆ nds32_idr_reggroup

struct reggroup* nds32_idr_reggroup
| static

Definition at line 325 of file nds32-tdep.c.

Referenced by nds32_add_reggroups(), and nds32_init_reggroups().

## ◆ nds32_ir_reggroup

struct reggroup* nds32_ir_reggroup
| static

Definition at line 318 of file nds32-tdep.c.

Referenced by nds32_add_reggroups(), and nds32_init_reggroups().

## ◆ nds32_mr_reggroup

struct reggroup* nds32_mr_reggroup
| static

Definition at line 319 of file nds32-tdep.c.

Referenced by nds32_add_reggroups(), and nds32_init_reggroups().

## ◆ nds32_pfr_reggroup

struct reggroup* nds32_pfr_reggroup
| static

Definition at line 321 of file nds32-tdep.c.

Referenced by nds32_add_reggroups(), and nds32_init_reggroups().

## ◆ nds32_racr_reggroup

struct reggroup* nds32_racr_reggroup
| static

Definition at line 324 of file nds32-tdep.c.

Referenced by nds32_add_reggroups(), and nds32_init_reggroups().

## ◆ nds32_register_aliases

const { ... } nds32_register_aliases[]

Referenced by nds32_gdbarch_init().

## ◆ nds32_register_names

const char* const nds32_register_names[]
| static

Initial value:
=
{
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
"r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
"r24", "r25", "r26", "r27", "fp", "gp", "lp", "sp",
"pc",
}

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

Referenced by nds32_validate_tdesc_p().

## ◆ nds32_secur_reggroup

struct reggroup* nds32_secur_reggroup
| static

Definition at line 326 of file nds32-tdep.c.

Referenced by nds32_add_reggroups(), and nds32_init_reggroups().

## ◆ num_fdr_map

const int num_fdr_map[] = { 4, 8, 16, 32 }

Definition at line 107 of file nds32-tdep.c.

Referenced by nds32_gdbarch_init(), and nds32_validate_tdesc_p().

## ◆ num_fsr_map

const int num_fsr_map[] = { 8, 16, 32, 32 }

Definition at line 108 of file nds32-tdep.c.

Referenced by nds32_gdbarch_init(), and nds32_validate_tdesc_p().