GDB (xrefs)
|
#include "defs.h"
#include "frame.h"
#include "inferior.h"
#include "symtab.h"
#include "value.h"
#include "gdbcmd.h"
#include "language.h"
#include "gdbcore.h"
#include "symfile.h"
#include "objfiles.h"
#include "gdbtypes.h"
#include "target.h"
#include "arch-utils.h"
#include "regcache.h"
#include "osabi.h"
#include "riscv-tdep.h"
#include "reggroups.h"
#include "opcode/riscv.h"
#include "elf/riscv.h"
#include "elf-bfd.h"
#include "symcat.h"
#include "dis-asm.h"
#include "frame-unwind.h"
#include "frame-base.h"
#include "trad-frame.h"
#include "infcall.h"
#include "floatformat.h"
#include "remote.h"
#include "target-descriptions.h"
#include "dwarf2/frame.h"
#include "user-regs.h"
#include "valprint.h"
#include "gdbsupport/common-defs.h"
#include "opcode/riscv-opc.h"
#include "cli/cli-decode.h"
#include "observable.h"
#include "prologue-value.h"
#include "arch/riscv.h"
#include "riscv-ravenscar-thread.h"
#include "gdbsupport/gdb-safe-ctype.h"
Go to the source code of this file.
Classes | |
struct | riscv_unwind_cache |
class | riscv_pending_register_alias |
struct | riscv_register_feature |
struct | riscv_register_feature::register_info |
struct | riscv_xreg_feature |
struct | riscv_freg_feature |
struct | riscv_virtual_feature |
struct | riscv_csr_feature |
struct | riscv_vector_feature |
class | riscv_insn |
union | riscv_insn::riscv_insn_immediate |
struct | riscv_arg_info |
struct | riscv_arg_info::location |
struct | riscv_arg_reg |
struct | riscv_memory_offsets |
struct | riscv_call_info |
class | riscv_struct_info |
Macros | |
#define | SP_ALIGNMENT 16 |
#define | BIGGEST_ALIGNMENT 16 |
#define | DECLARE_INSN(INSN_NAME, INSN_MATCH, INSN_MASK) |
#define | riscv_breakpoints_debug_printf(fmt, ...) |
#define | riscv_infcall_debug_printf(fmt, ...) |
#define | RISCV_INFCALL_SCOPED_DEBUG_START_END(fmt, ...) |
#define | riscv_unwinder_debug_printf(fmt, ...) |
#define | riscv_gdbarch_debug_printf(fmt, ...) |
#define | DECLARE_CSR(NAME, VALUE, CLASS, DEFINE_VER, ABORT_VER) { RISCV_ ## VALUE ## _REGNUM, { # NAME } }, |
#define | DECLARE_CSR(name, num, class, define_ver, abort_ver) case RISCV_ ## num ## _REGNUM: |
Functions | |
static struct value * | value_of_riscv_user_reg (frame_info_ptr frame, const void *baton) |
static void | show_use_compressed_breakpoints (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
static void | show_riscv_debug_variable (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
int | riscv_isa_xlen (struct gdbarch *gdbarch) |
int | riscv_abi_xlen (struct gdbarch *gdbarch) |
int | riscv_isa_flen (struct gdbarch *gdbarch) |
int | riscv_abi_flen (struct gdbarch *gdbarch) |
bool | riscv_abi_embedded (struct gdbarch *gdbarch) |
static bool | riscv_has_fp_regs (struct gdbarch *gdbarch) |
static bool | riscv_has_fp_abi (struct gdbarch *gdbarch) |
static bool | riscv_is_fp_regno_p (int regno) |
static int | riscv_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr) |
static const gdb_byte * | riscv_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size) |
static const char * | riscv_register_name (struct gdbarch *gdbarch, int regnum) |
static enum register_status | riscv_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache, int regnum, gdb_byte *buf) |
static void | riscv_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int regnum, const gdb_byte *buf) |
static int | riscv_cannot_store_register (struct gdbarch *gdbarch, int regnum) |
static struct type * | riscv_fpreg_d_type (struct gdbarch *gdbarch) |
static struct type * | riscv_register_type (struct gdbarch *gdbarch, int regnum) |
static void | riscv_print_one_register_info (struct gdbarch *gdbarch, struct ui_file *file, frame_info_ptr frame, int regnum) |
static bool | riscv_is_regnum_a_named_csr (int regnum) |
static bool | riscv_is_unknown_csr (struct gdbarch *gdbarch, int regnum) |
static int | riscv_register_reggroup_p (struct gdbarch *gdbarch, int regnum, const struct reggroup *reggroup) |
static const char * | riscv_pseudo_register_name (struct gdbarch *gdbarch, int regnum) |
static struct type * | riscv_pseudo_register_type (struct gdbarch *gdbarch, int regnum) |
static int | riscv_pseudo_register_reggroup_p (struct gdbarch *gdbarch, int regnum, const struct reggroup *reggroup) |
static void | riscv_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, frame_info_ptr frame, int regnum, int print_all) |
static bool | is_insn_load_of_fp_from_sp (const struct riscv_insn &insn) |
static bool | is_insn_addi_of_sp_to_sp (const struct riscv_insn &insn) |
static bool | previous_insn_is_load_fp_from_stack (struct gdbarch *gdbarch, CORE_ADDR pc) |
static bool | previous_insn_is_add_imm_to_sp (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR *prev_pc) |
static bool | riscv_detect_end_of_function (struct gdbarch *gdbarch, CORE_ADDR pc, int *offset) |
static CORE_ADDR | riscv_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc, CORE_ADDR end_pc, struct riscv_unwind_cache *cache) |
static CORE_ADDR | riscv_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) |
static CORE_ADDR | riscv_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache) |
static ULONGEST | riscv_type_align (gdbarch *gdbarch, type *type) |
static int | riscv_arg_regs_available (struct riscv_arg_reg *reg) |
static bool | riscv_assign_reg_location (struct riscv_arg_info::location *loc, struct riscv_arg_reg *reg, int length, int offset) |
static void | riscv_assign_stack_location (struct riscv_arg_info::location *loc, struct riscv_memory_offsets *memory, int length, int align) |
static void | riscv_call_arg_scalar_int (struct riscv_arg_info *ainfo, struct riscv_call_info *cinfo) |
static void | riscv_call_arg_scalar_float (struct riscv_arg_info *ainfo, struct riscv_call_info *cinfo) |
static void | riscv_call_arg_complex_float (struct riscv_arg_info *ainfo, struct riscv_call_info *cinfo) |
static void | riscv_call_arg_struct (struct riscv_arg_info *ainfo, struct riscv_call_info *cinfo) |
static void | riscv_arg_location (struct gdbarch *gdbarch, struct riscv_arg_info *ainfo, struct riscv_call_info *cinfo, struct type *type, bool is_unnamed) |
static void | riscv_print_arg_location (ui_file *stream, struct gdbarch *gdbarch, struct riscv_arg_info *info, CORE_ADDR sp_refs, CORE_ADDR sp_args) |
static void | riscv_regcache_cooked_write (int regnum, const gdb_byte *data, int len, struct regcache *regcache, int flen) |
static CORE_ADDR | riscv_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 enum return_value_convention | riscv_return_value (struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, struct value **read_value, const gdb_byte *writebuf) |
static CORE_ADDR | riscv_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr) |
static struct riscv_unwind_cache * | riscv_frame_cache (frame_info_ptr this_frame, void **this_cache) |
static void | riscv_frame_this_id (frame_info_ptr this_frame, void **prologue_cache, struct frame_id *this_id) |
static struct value * | riscv_frame_prev_register (frame_info_ptr this_frame, void **prologue_cache, int regnum) |
static struct riscv_gdbarch_features | riscv_features_from_bfd (const bfd *abfd) |
static const struct target_desc * | riscv_find_default_target_description (const struct gdbarch_info info) |
static void | riscv_add_reggroups (struct gdbarch *gdbarch) |
static int | riscv_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg) |
static std::string | riscv_gcc_target_options (struct gdbarch *gdbarch) |
static int | riscv_tdesc_unknown_reg (struct gdbarch *gdbarch, tdesc_feature *feature, const char *reg_name, int possible_regnum) |
static const char * | riscv_gnu_triplet_regexp (struct gdbarch *gdbarch) |
static int | riscv_stap_is_single_operand (struct gdbarch *gdbarch, const char *s) |
static struct gdbarch * | riscv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) |
static CORE_ADDR | riscv_next_pc (struct regcache *regcache, CORE_ADDR pc) |
static bool | riscv_next_pc_atomic_sequence (struct regcache *regcache, CORE_ADDR pc, CORE_ADDR *next_pc) |
std::vector< CORE_ADDR > | riscv_software_single_step (struct regcache *regcache) |
static void | riscv_init_reggroups () |
void | riscv_supply_regset (const struct regset *regset, struct regcache *regcache, int regnum, const void *regs, size_t len) |
void | _initialize_riscv_tdep () |
Variables | |
static bool | riscv_debug_breakpoints = false |
static bool | riscv_debug_infcall = false |
static bool | riscv_debug_unwinder = false |
static bool | riscv_debug_gdbarch = false |
const char * | riscv_feature_name_csr = "org.gnu.gdb.riscv.csr" |
static const char * | riscv_feature_name_cpu = "org.gnu.gdb.riscv.cpu" |
static const char * | riscv_feature_name_fpu = "org.gnu.gdb.riscv.fpu" |
static const char * | riscv_feature_name_virtual = "org.gnu.gdb.riscv.virtual" |
static const char * | riscv_feature_name_vector = "org.gnu.gdb.riscv.vector" |
static char * | riscv_disassembler_options |
static const reggroup * | csr_reggroup = nullptr |
static const struct riscv_xreg_feature | riscv_xreg_feature |
static const struct riscv_freg_feature | riscv_freg_feature |
static const struct riscv_virtual_feature | riscv_virtual_feature |
static const struct riscv_csr_feature | riscv_csr_feature |
static const struct riscv_vector_feature | riscv_vector_feature |
static enum auto_boolean | use_compressed_breakpoints |
static struct cmd_list_element * | setriscvcmdlist = NULL |
static struct cmd_list_element * | showriscvcmdlist = NULL |
static struct cmd_list_element * | setdebugriscvcmdlist = NULL |
static struct cmd_list_element * | showdebugriscvcmdlist = NULL |
static const struct frame_unwind | riscv_frame_unwind |
static const char *const | stap_register_indirection_prefixes [] |
static const char *const | stap_register_indirection_suffixes [] |
#define BIGGEST_ALIGNMENT 16 |
Definition at line 65 of file riscv-tdep.c.
Referenced by riscv_type_align().
#define DECLARE_CSR | ( | name, | |
num, | |||
class, | |||
define_ver, | |||
abort_ver ) case RISCV_ ## num ## _REGNUM: |
#define DECLARE_CSR | ( | NAME, | |
VALUE, | |||
CLASS, | |||
DEFINE_VER, | |||
ABORT_VER ) { RISCV_ ## VALUE ## _REGNUM, { # NAME } }, |
#define DECLARE_INSN | ( | INSN_NAME, | |
INSN_MATCH, | |||
INSN_MASK ) |
Definition at line 69 of file riscv-tdep.c.
#define riscv_breakpoints_debug_printf | ( | fmt, | |
... ) |
Definition at line 84 of file riscv-tdep.c.
Referenced by riscv_breakpoint_kind_from_pc().
#define riscv_gdbarch_debug_printf | ( | fmt, | |
... ) |
Definition at line 124 of file riscv-tdep.c.
Referenced by riscv_gdbarch_init().
#define riscv_infcall_debug_printf | ( | fmt, | |
... ) |
Definition at line 96 of file riscv-tdep.c.
Referenced by riscv_push_dummy_call(), riscv_push_dummy_code(), and riscv_return_value().
#define RISCV_INFCALL_SCOPED_DEBUG_START_END | ( | fmt, | |
... ) |
Definition at line 102 of file riscv-tdep.c.
Referenced by riscv_push_dummy_call().
#define riscv_unwinder_debug_printf | ( | fmt, | |
... ) |
Definition at line 113 of file riscv-tdep.c.
Referenced by previous_insn_is_add_imm_to_sp(), previous_insn_is_load_fp_from_stack(), riscv_detect_end_of_function(), riscv_frame_cache(), and riscv_scan_prologue().
#define SP_ALIGNMENT 16 |
Definition at line 62 of file riscv-tdep.c.
Referenced by riscv_push_dummy_call().
void _initialize_riscv_tdep | ( | ) |
Definition at line 4547 of file riscv-tdep.c.
References add_setshow_auto_boolean_cmd(), add_setshow_boolean_cmd(), add_setshow_prefix_cmd(), AUTO_BOOLEAN_AUTO, class_maintenance, gdbarch_register(), no_class, riscv_debug_breakpoints, riscv_debug_gdbarch, riscv_debug_infcall, riscv_debug_unwinder, riscv_gdbarch_init(), riscv_init_reggroups(), setdebuglist, setdebugriscvcmdlist, setlist, setriscvcmdlist, show_riscv_debug_variable(), show_use_compressed_breakpoints(), showdebuglist, showdebugriscvcmdlist, showlist, showriscvcmdlist, and use_compressed_breakpoints.
|
static |
Definition at line 2018 of file riscv-tdep.c.
References riscv_insn::ADDI, riscv_insn::ADDIW, riscv_insn::rd(), RISCV_SP_REGNUM, and riscv_insn::rs1().
Referenced by previous_insn_is_add_imm_to_sp(), riscv_detect_end_of_function(), and riscv_scan_prologue().
|
static |
Definition at line 2002 of file riscv-tdep.c.
References riscv_insn::LD, riscv_insn::LW, riscv_insn::rd(), RISCV_FP_REGNUM, RISCV_SP_REGNUM, and riscv_insn::rs1().
Referenced by previous_insn_is_load_fp_from_stack(), and riscv_detect_end_of_function().
|
static |
Definition at line 2074 of file riscv-tdep.c.
References riscv_insn::decode(), is_insn_addi_of_sp_to_sp(), riscv_insn::length(), and riscv_unwinder_debug_printf.
Referenced by riscv_detect_end_of_function().
|
static |
Definition at line 2038 of file riscv-tdep.c.
References riscv_insn::decode(), is_insn_load_of_fp_from_sp(), riscv_insn::length(), and riscv_unwinder_debug_printf.
Referenced by riscv_detect_end_of_function().
bool riscv_abi_embedded | ( | struct gdbarch * | gdbarch | ) |
Definition at line 801 of file riscv-tdep.c.
References riscv_gdbarch_tdep::abi_features, and riscv_gdbarch_features::embedded.
Referenced by riscv_call_info::riscv_call_info().
int riscv_abi_flen | ( | struct gdbarch * | gdbarch | ) |
Definition at line 792 of file riscv-tdep.c.
References riscv_gdbarch_tdep::abi_features, and riscv_gdbarch_features::flen.
Referenced by riscv_call_info::riscv_call_info(), and riscv_gcc_target_options().
int riscv_abi_xlen | ( | struct gdbarch * | gdbarch | ) |
Definition at line 774 of file riscv-tdep.c.
References riscv_gdbarch_tdep::abi_features, and riscv_gdbarch_features::xlen.
Referenced by riscv_call_info::riscv_call_info(), and riscv_gcc_target_options().
|
static |
Definition at line 3888 of file riscv-tdep.c.
References csr_reggroup, and reggroup_add().
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 3134 of file riscv-tdep.c.
References riscv_arg_info::align, riscv_arg_info::argloc, builtin_type::builtin_long, builtin_type::builtin_long_long, builtin_type(), riscv_arg_info::location::c_length, type::code(), riscv_arg_info::contents, riscv_arg_info::is_unnamed, type::length(), riscv_arg_info::length, riscv_call_arg_complex_float(), riscv_call_arg_scalar_float(), riscv_call_arg_scalar_int(), riscv_call_arg_struct(), type, riscv_arg_info::type, type_align(), TYPE_HAS_DYNAMIC_LENGTH, and riscv_call_info::xlen.
Referenced by riscv_push_dummy_call(), and riscv_return_value().
|
static |
Definition at line 2684 of file riscv-tdep.c.
References riscv_arg_reg::last_regnum, and riscv_arg_reg::next_regnum.
Referenced by riscv_call_arg_complex_float(), and riscv_call_arg_struct().
|
static |
Definition at line 2702 of file riscv-tdep.c.
References riscv_arg_info::location::in_reg, riscv_arg_reg::last_regnum, loc, and riscv_arg_reg::next_regnum.
Referenced by riscv_call_arg_complex_float(), riscv_call_arg_scalar_float(), riscv_call_arg_scalar_int(), and riscv_call_arg_struct().
|
static |
Definition at line 2728 of file riscv-tdep.c.
References loc, and riscv_arg_info::location::on_stack.
Referenced by riscv_call_arg_scalar_int().
|
static |
Definition at line 836 of file riscv-tdep.c.
References AUTO_BOOLEAN_AUTO, AUTO_BOOLEAN_TRUE, bp, paddress(), riscv_breakpoints_debug_printf, riscv_debug_breakpoints, target_read_code(), and use_compressed_breakpoints.
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 2835 of file riscv-tdep.c.
References riscv_arg_info::argloc, riscv_call_info::flen, riscv_call_info::float_regs, riscv_arg_info::is_unnamed, riscv_arg_info::length, riscv_arg_regs_available(), riscv_assign_reg_location(), and riscv_call_arg_scalar_int().
Referenced by riscv_arg_location().
|
static |
Definition at line 2816 of file riscv-tdep.c.
References riscv_arg_info::argloc, riscv_call_info::flen, riscv_call_info::float_regs, riscv_arg_info::is_unnamed, riscv_arg_info::length, riscv_assign_reg_location(), and riscv_call_arg_scalar_int().
Referenced by riscv_arg_location().
|
static |
Definition at line 2759 of file riscv-tdep.c.
References riscv_arg_info::align, riscv_arg_info::argloc, riscv_arg_info::location::by_ref, riscv_arg_info::location::c_length, riscv_call_info::int_regs, riscv_arg_info::is_unnamed, riscv_arg_info::length, riscv_arg_info::location::loc_data, riscv_arg_info::location::loc_type, riscv_call_info::memory, riscv_arg_reg::next_regnum, riscv_arg_info::location::offset, riscv_memory_offsets::ref_offset, riscv_assign_reg_location(), riscv_assign_stack_location(), riscv_arg_info::type, TYPE_HAS_DYNAMIC_LENGTH, and riscv_call_info::xlen.
Referenced by riscv_arg_location(), riscv_call_arg_complex_float(), riscv_call_arg_scalar_float(), and riscv_call_arg_struct().
|
static |
Definition at line 2982 of file riscv-tdep.c.
References riscv_struct_info::analyse(), riscv_arg_info::argloc, type::code(), riscv_struct_info::field_offset(), riscv_struct_info::field_type(), riscv_call_info::flen, riscv_call_info::float_regs, riscv_call_info::int_regs, is_integral_type(), riscv_arg_info::is_unnamed, type::length(), riscv_struct_info::number_of_fields(), riscv_arg_regs_available(), riscv_assign_reg_location(), riscv_call_arg_scalar_int(), riscv_arg_info::type, and riscv_call_info::xlen.
Referenced by riscv_arg_location().
|
static |
Definition at line 1038 of file riscv-tdep.c.
References regnum, and RISCV_ZERO_REGNUM.
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 2139 of file riscv-tdep.c.
References riscv_insn::decode(), riscv_insn::imm_signed(), is_insn_addi_of_sp_to_sp(), is_insn_load_of_fp_from_sp(), riscv_insn::JALR, riscv_insn::length(), previous_insn_is_add_imm_to_sp(), previous_insn_is_load_fp_from_stack(), RISCV_RA_REGNUM, riscv_unwinder_debug_printf, RISCV_ZERO_REGNUM, riscv_insn::rs1(), and riscv_insn::rs2().
Referenced by riscv_scan_prologue().
|
static |
Definition at line 3896 of file riscv-tdep.c.
References RISCV_DWARF_FIRST_CSR, RISCV_DWARF_LAST_CSR, RISCV_DWARF_REGNUM_F0, RISCV_DWARF_REGNUM_F31, RISCV_DWARF_REGNUM_V0, RISCV_DWARF_REGNUM_V31, RISCV_DWARF_REGNUM_X0, RISCV_DWARF_REGNUM_X31, RISCV_FIRST_CSR_REGNUM, RISCV_FIRST_FP_REGNUM, RISCV_V0_REGNUM, and RISCV_ZERO_REGNUM.
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 3822 of file riscv-tdep.c.
References riscv_gdbarch_features::embedded, riscv_gdbarch_features::flen, and riscv_gdbarch_features::xlen.
Referenced by riscv_find_default_target_description(), and riscv_gdbarch_init().
|
static |
Definition at line 3868 of file riscv-tdep.c.
References riscv_features_from_bfd(), riscv_lookup_target_description(), and riscv_gdbarch_features::xlen.
Referenced by riscv_gdbarch_init().
Definition at line 1046 of file riscv-tdep.c.
References append_composite_type_field(), arch_composite_type(), builtin_type(), f(), riscv_gdbarch_tdep::riscv_fpreg_d_type, type::set_is_vector(), and type::set_name().
Referenced by riscv_register_type().
|
static |
Definition at line 3701 of file riscv-tdep.c.
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 3710 of file riscv-tdep.c.
References trad_frame_saved_reg::addr, riscv_unwind_cache::frame_base, riscv_unwind_cache::frame_base_offset, riscv_unwind_cache::frame_base_reg, frame_id_build(), FRAME_OBSTACK_ZALLOC, gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_pc_regnum(), gdbarch_register_name(), gdbarch_sp_regnum(), get_frame_arch(), get_frame_func(), get_frame_pc(), get_frame_register_unsigned(), trad_frame_saved_reg::is_addr(), riscv_unwind_cache::regs, RISCV_RA_REGNUM, riscv_scan_prologue(), riscv_unwinder_debug_printf, trad_frame_saved_reg::set_addr(), trad_frame_saved_reg::set_unknown(), trad_frame_saved_reg::set_value(), riscv_unwind_cache::this_id, and trad_frame_alloc_saved_regs().
Referenced by riscv_frame_prev_register(), and riscv_frame_this_id().
|
static |
Definition at line 3791 of file riscv-tdep.c.
References regnum, riscv_unwind_cache::regs, riscv_frame_cache(), and trad_frame_get_prev_register().
|
static |
Definition at line 3770 of file riscv-tdep.c.
References riscv_frame_cache(), and riscv_unwind_cache::this_id.
|
static |
Definition at line 3919 of file riscv-tdep.c.
References riscv_abi_flen(), riscv_abi_xlen(), riscv_isa_flen(), and riscv_isa_xlen().
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 4082 of file riscv-tdep.c.
References riscv_gdbarch_tdep::abi_features, alias, arches, riscv_xreg_feature::check(), riscv_freg_feature::check(), riscv_virtual_feature::check(), riscv_csr_feature::check(), riscv_vector_feature::check(), core_addr_lessthan(), dwarf2_append_unwinders(), riscv_gdbarch_tdep::fflags_regnum, riscv_gdbarch_features::flen, floatformats_ieee_quad, frame_unwind_append_unwinder(), riscv_gdbarch_tdep::frm_regnum, gdbarch_alloc(), gdbarch_init_osabi(), gdbarch_list_lookup_by_info(), gdbarch_num_regs(), registry< T >::get(), riscv_gdbarch_features::has_fcsr_reg, riscv_gdbarch_features::has_fflags_reg, riscv_gdbarch_features::has_frm_reg, riscv_gdbarch_tdep::isa_features, ON_STACK, register_riscv_ravenscar_ops(), riscv_add_reggroups(), riscv_breakpoint_kind_from_pc(), riscv_cannot_store_register(), riscv_disassembler_options, riscv_dwarf_reg_to_regnum(), riscv_features_from_bfd(), riscv_find_default_target_description(), riscv_frame_align(), riscv_frame_unwind, riscv_gcc_target_options(), riscv_gdbarch_debug_printf, riscv_gnu_triplet_regexp(), riscv_isa_xlen(), RISCV_LAST_REGNUM, RISCV_PC_REGNUM, riscv_print_registers_info(), riscv_pseudo_register_name(), riscv_pseudo_register_read(), riscv_pseudo_register_reggroup_p(), riscv_pseudo_register_type(), riscv_pseudo_register_write(), riscv_push_dummy_call(), riscv_push_dummy_code(), riscv_register_name(), riscv_register_reggroup_p(), riscv_register_type(), riscv_return_value(), riscv_skip_prologue(), RISCV_SP_REGNUM, riscv_stap_is_single_operand(), riscv_sw_breakpoint_from_kind(), riscv_tdesc_unknown_reg(), riscv_type_align(), set_gdbarch_breakpoint_kind_from_pc(), set_gdbarch_call_dummy_location(), set_gdbarch_cannot_store_register(), set_gdbarch_char_signed(), set_gdbarch_disassembler_options(), set_gdbarch_double_bit(), set_gdbarch_dwarf2_reg_to_regnum(), set_gdbarch_float_bit(), set_gdbarch_frame_align(), set_gdbarch_gcc_target_options(), set_gdbarch_gnu_triplet_regexp(), set_gdbarch_have_nonsteppable_watchpoint(), set_gdbarch_inner_than(), set_gdbarch_int_bit(), set_gdbarch_long_bit(), set_gdbarch_long_double_bit(), set_gdbarch_long_double_format(), set_gdbarch_long_long_bit(), set_gdbarch_num_pseudo_regs(), set_gdbarch_num_regs(), set_gdbarch_pc_regnum(), set_gdbarch_print_registers_info(), set_gdbarch_pseudo_register_read(), set_gdbarch_pseudo_register_write(), set_gdbarch_ptr_bit(), set_gdbarch_push_dummy_call(), set_gdbarch_push_dummy_code(), set_gdbarch_register_name(), set_gdbarch_register_reggroup_p(), set_gdbarch_register_type(), set_gdbarch_return_value_as_value(), set_gdbarch_short_bit(), set_gdbarch_skip_prologue(), set_gdbarch_sp_regnum(), set_gdbarch_stap_is_single_operand(), set_gdbarch_stap_register_indirection_prefixes(), set_gdbarch_stap_register_indirection_suffixes(), set_gdbarch_sw_breakpoint_from_kind(), set_gdbarch_type_align(), set_gdbarch_valid_disassembler_options(), set_tdesc_pseudo_register_name(), set_tdesc_pseudo_register_reggroup_p(), set_tdesc_pseudo_register_type(), stap_register_indirection_prefixes, stap_register_indirection_suffixes, tdesc_data, tdesc_data_alloc(), tdesc_found_register(), tdesc_has_registers(), tdesc_use_registers(), and riscv_gdbarch_features::xlen.
Referenced by _initialize_riscv_tdep().
|
static |
Definition at line 4042 of file riscv-tdep.c.
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 818 of file riscv-tdep.c.
References riscv_gdbarch_tdep::abi_features, and riscv_gdbarch_features::flen.
Referenced by riscv_call_info::riscv_call_info(), and riscv_push_dummy_call().
|
static |
Definition at line 810 of file riscv-tdep.c.
References riscv_isa_flen().
Referenced by riscv_register_name(), and riscv_register_reggroup_p().
|
static |
Definition at line 4476 of file riscv-tdep.c.
References csr_reggroup, reggroup_new(), and USER_REGGROUP.
Referenced by _initialize_riscv_tdep().
|
static |
Definition at line 827 of file riscv-tdep.c.
References RISCV_FIRST_FP_REGNUM, and RISCV_LAST_FP_REGNUM.
Referenced by riscv_push_dummy_call(), riscv_regcache_cooked_write(), riscv_register_reggroup_p(), and riscv_register_type().
|
static |
Definition at line 1348 of file riscv-tdep.c.
References regnum, RISCV_FIRST_CSR_REGNUM, and RISCV_LAST_CSR_REGNUM.
Referenced by riscv_register_reggroup_p().
|
static |
Definition at line 1369 of file riscv-tdep.c.
References regnum, riscv_gdbarch_tdep::unknown_csrs_count, and riscv_gdbarch_tdep::unknown_csrs_first_regnum.
Referenced by riscv_register_reggroup_p().
int riscv_isa_flen | ( | struct gdbarch * | gdbarch | ) |
Definition at line 783 of file riscv-tdep.c.
References riscv_gdbarch_features::flen, and riscv_gdbarch_tdep::isa_features.
Referenced by riscv_gcc_target_options(), riscv_has_fp_regs(), riscv_iterate_over_regset_sections(), riscv_linux_iterate_over_regset_sections(), riscv_linux_sigframe_init(), and riscv_register_type().
int riscv_isa_xlen | ( | struct gdbarch * | gdbarch | ) |
Definition at line 765 of file riscv-tdep.c.
References riscv_gdbarch_tdep::isa_features, and riscv_gdbarch_features::xlen.
Referenced by riscv_insn::decode(), riscv_fbsd_init_abi(), riscv_fbsd_iterate_over_regset_sections(), riscv_fbsd_sigframe_init(), riscv_gcc_target_options(), riscv_gdbarch_init(), riscv_iterate_over_regset_sections(), riscv_linux_init_abi(), riscv_linux_iterate_over_regset_sections(), riscv_linux_sigframe_init(), riscv_ravenscar_ops::riscv_ravenscar_ops(), and riscv_register_type().
|
static |
Definition at line 4331 of file riscv-tdep.c.
References reg_buffer::arch(), riscv_insn::BEQ, riscv_insn::BGE, riscv_insn::BGEU, riscv_insn::BLT, riscv_insn::BLTU, riscv_insn::BNE, readable_regcache::cooked_read(), riscv_insn::decode(), riscv_insn::ECALL, get_current_frame(), riscv_insn::imm_signed(), riscv_insn::JAL, riscv_insn::JALR, riscv_insn::length(), riscv_insn::rs1(), riscv_insn::rs2(), and riscv_gdbarch_tdep::syscall_next_pc.
Referenced by riscv_software_single_step().
|
static |
Definition at line 4411 of file riscv-tdep.c.
References reg_buffer::arch(), riscv_insn::BNE, riscv_insn::decode(), riscv_insn::imm_signed(), riscv_insn::length(), riscv_insn::LR, and riscv_insn::SC.
Referenced by riscv_software_single_step().
|
static |
Definition at line 3200 of file riscv-tdep.c.
References riscv_arg_info::location::by_ref, gdb_printf(), gdbarch_register_name(), riscv_arg_info::location::in_reg, riscv_arg_info::location::on_stack, and TYPE_SAFE_NAME.
Referenced by riscv_push_dummy_call(), and riscv_return_value().
|
static |
Definition at line 1136 of file riscv-tdep.c.
References type::code(), common_val_print(), value::contents_for_printing(), current_language, value::entirely_available(), type::field(), gdb_printf(), gdb_puts(), gdbarch_register_name(), get_formatted_print_options(), get_user_print_options(), type::is_vector(), type::length(), riscv_register_feature::name(), type::num_fields(), value::optimized_out(), print_hex_chars(), print_spaces(), register_size(), regnum, RISCV_PRIV_REGNUM, size, field::type(), value::type(), type_byte_order(), value_as_long(), and value_of_register().
Referenced by riscv_print_registers_info().
|
static |
Definition at line 1505 of file riscv-tdep.c.
References all_reggroup, gdbarch_num_cooked_regs(), gdbarch_register_name(), gdbarch_register_reggroup_p(), general_reggroup, regnum, riscv_print_one_register_info(), and RISCV_ZERO_REGNUM.
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 1465 of file riscv-tdep.c.
References riscv_gdbarch_tdep::fflags_regnum, riscv_gdbarch_tdep::frm_regnum, and regnum.
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 974 of file riscv-tdep.c.
References riscv_gdbarch_tdep::fflags_regnum, riscv_gdbarch_tdep::frm_regnum, readable_regcache::raw_read_part(), register_size(), regnum, and status.
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 1494 of file riscv-tdep.c.
References regnum, and riscv_register_reggroup_p().
Referenced by riscv_gdbarch_init().
Definition at line 1480 of file riscv-tdep.c.
References builtin_type::builtin_int32, builtin_type(), riscv_gdbarch_tdep::fflags_regnum, riscv_gdbarch_tdep::frm_regnum, and regnum.
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 1010 of file riscv-tdep.c.
References riscv_gdbarch_tdep::fflags_regnum, riscv_gdbarch_tdep::frm_regnum, readable_regcache::raw_read(), regcache::raw_write(), register_size(), and regnum.
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 3297 of file riscv-tdep.c.
References riscv_memory_offsets::arg_offset, riscv_arg_info::location::by_ref, check_typedef(), type::code(), value::contents(), regcache::cooked_write(), riscv_call_info::flen, gdbarch_byte_order(), type::has_varargs(), riscv_arg_info::location::in_reg, riscv_call_info::int_regs, riscv_call_info::memory, riscv_arg_reg::next_regnum, type::num_fields(), riscv_arg_info::location::on_stack, riscv_memory_offsets::ref_offset, regcache_cooked_write_unsigned(), return_method_struct, RISCV_A0_REGNUM, riscv_arg_location(), riscv_debug_infcall, riscv_has_fp_abi(), riscv_infcall_debug_printf, RISCV_INFCALL_SCOPED_DEBUG_START_END, riscv_is_fp_regno_p(), riscv_print_arg_location(), RISCV_RA_REGNUM, riscv_regcache_cooked_write(), RISCV_SP_REGNUM, SP_ALIGNMENT, store_unsigned_integer(), string_file::string(), type::target_type(), value::type(), value_cast(), write_memory(), and riscv_call_info::xlen.
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 2458 of file riscv-tdep.c.
References paddress(), riscv_infcall_debug_printf, status, and target_write_memory().
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 3280 of file riscv-tdep.c.
References regcache::cooked_write(), regnum, and riscv_is_fp_regno_p().
Referenced by riscv_push_dummy_call(), and riscv_return_value().
|
static |
Definition at line 912 of file riscv-tdep.c.
References riscv_gdbarch_tdep::duplicate_fcsr_regnum, riscv_gdbarch_tdep::duplicate_fflags_regnum, riscv_gdbarch_tdep::duplicate_frm_regnum, riscv_register_feature::name(), riscv_xreg_feature::register_name(), riscv_freg_feature::register_name(), regnum, RISCV_FIRST_FP_REGNUM, riscv_has_fp_regs(), RISCV_LAST_FP_REGNUM, RISCV_ZERO_REGNUM, and tdesc_register_name().
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 1381 of file riscv-tdep.c.
References all_reggroup, csr_reggroup, default_register_reggroup_p(), riscv_gdbarch_tdep::fflags_regnum, float_reggroup, riscv_gdbarch_tdep::frm_regnum, gdbarch_num_regs(), gdbarch_register_name(), general_reggroup, regnum, restore_reggroup, RISCV_FIRST_FP_REGNUM, riscv_has_fp_regs(), riscv_is_fp_regno_p(), riscv_is_regnum_a_named_csr(), riscv_is_unknown_csr(), RISCV_LAST_CSR_REGNUM, RISCV_LAST_FP_REGNUM, RISCV_LAST_REGNUM, RISCV_PRIV_REGNUM, RISCV_V0_REGNUM, RISCV_V31_REGNUM, save_reggroup, system_reggroup, tdesc_register_in_reggroup_p(), and vector_reggroup.
Referenced by riscv_gdbarch_init(), and riscv_pseudo_register_reggroup_p().
Definition at line 1084 of file riscv-tdep.c.
References builtin_type::builtin_data_ptr, builtin_type::builtin_func_ptr, builtin_type(), type::code(), gdbarch_pc_regnum(), type::length(), type::name(), regnum, RISCV_FP_REGNUM, riscv_fpreg_d_type(), RISCV_GP_REGNUM, riscv_is_fp_regno_p(), riscv_isa_flen(), riscv_isa_xlen(), RISCV_RA_REGNUM, RISCV_SP_REGNUM, RISCV_TP_REGNUM, tdesc_register_type(), and type.
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 3490 of file riscv-tdep.c.
References value::allocate(), riscv_arg_info::location::by_ref, check_typedef(), value::contents(), value::contents_raw(), readable_regcache::cooked_read_part(), riscv_call_info::flen, riscv_arg_info::location::in_reg, is_fixed_point_type(), type::is_unsigned(), type::length(), riscv_arg_info::location::on_stack, gdb_mpz::read(), regcache_cooked_read_unsigned(), register_size(), regnum, RETURN_VALUE_ABI_PRESERVES_ADDRESS, RETURN_VALUE_REGISTER_CONVENTION, RISCV_A0_REGNUM, riscv_arg_location(), riscv_debug_infcall, riscv_infcall_debug_printf, riscv_print_arg_location(), riscv_regcache_cooked_write(), string_file::string(), value::type(), type_byte_order(), value_at_non_lval(), value_cast(), value_from_contents(), gdb_mpz::write(), and write_memory().
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 2210 of file riscv-tdep.c.
References riscv_insn::ADD, riscv_insn::ADDI, riscv_insn::ADDW, riscv_insn::AUIPC, riscv_insn::decode(), pv_area::fetch(), pv_area::find_reg(), riscv_unwind_cache::frame_base_offset, riscv_unwind_cache::frame_base_reg, gdbarch_addr_bit(), gdbarch_register_name(), riscv_insn::imm_signed(), is_insn_addi_of_sp_to_sp(), prologue_value::k, riscv_insn::LD, riscv_insn::length(), riscv_insn::LI, riscv_insn::LUI, riscv_insn::LW, riscv_insn::MV, pv_add(), pv_add_constant(), pv_constant(), pv_is_register(), pv_register(), riscv_insn::rd(), riscv_unwind_cache::regs, riscv_detect_end_of_function(), RISCV_FP_REGNUM, RISCV_NUM_INTEGER_REGS, RISCV_SP_REGNUM, riscv_unwinder_debug_printf, RISCV_ZERO_REGNUM, riscv_insn::rs1(), riscv_insn::rs2(), riscv_insn::SD, trad_frame_saved_reg::set_addr(), skip_prologue_using_sal(), pv_area::store(), and riscv_insn::SW.
Referenced by riscv_frame_cache(), and riscv_skip_prologue().
|
static |
Definition at line 2433 of file riscv-tdep.c.
References find_pc_partial_function(), riscv_scan_prologue(), and skip_prologue_using_sal().
Referenced by riscv_gdbarch_init().
std::vector< CORE_ADDR > riscv_software_single_step | ( | struct regcache * | regcache | ) |
Definition at line 4459 of file riscv-tdep.c.
References regcache_read_pc(), riscv_next_pc(), and riscv_next_pc_atomic_sequence().
Referenced by riscv_fbsd_init_abi(), and riscv_linux_init_abi().
|
static |
Definition at line 4051 of file riscv-tdep.c.
Referenced by riscv_gdbarch_init().
void riscv_supply_regset | ( | const struct regset * | regset, |
struct regcache * | regcache, | ||
int | regnum, | ||
const void * | regs, | ||
size_t | len ) |
Definition at line 4484 of file riscv-tdep.c.
References reg_buffer::arch(), riscv_gdbarch_tdep::fflags_regnum, riscv_gdbarch_tdep::frm_regnum, gdbarch_num_regs(), reg_buffer::get_register_status(), readable_regcache::raw_read(), reg_buffer::raw_supply_integer(), reg_buffer::raw_supply_zeroed(), regnum, RISCV_ZERO_REGNUM, and regcache::supply_regset().
|
static |
|
static |
Definition at line 3962 of file riscv-tdep.c.
References riscv_gdbarch_tdep::duplicate_fcsr_regnum, riscv_gdbarch_tdep::duplicate_fflags_regnum, riscv_gdbarch_tdep::duplicate_frm_regnum, riscv_register_feature::name(), tdesc_feature_name(), riscv_gdbarch_tdep::unknown_csrs_count, and riscv_gdbarch_tdep::unknown_csrs_first_regnum.
Referenced by riscv_gdbarch_init().
Definition at line 2506 of file riscv-tdep.c.
References BIGGEST_ALIGNMENT, check_typedef(), type::code(), type::is_vector(), and type::length().
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 753 of file riscv-tdep.c.
References gdb_printf(), and cmd_list_element::name.
Referenced by _initialize_riscv_tdep().
|
static |
Definition at line 731 of file riscv-tdep.c.
References gdb_printf().
Referenced by _initialize_riscv_tdep().
|
static |
Definition at line 168 of file riscv-tdep.c.
References value_of_register().
Referenced by riscv_pending_register_alias::create().
Definition at line 163 of file riscv-tdep.c.
Referenced by riscv_add_reggroups(), riscv_init_reggroups(), and riscv_register_reggroup_p().
|
static |
Definition at line 611 of file riscv-tdep.c.
|
static |
Definition at line 80 of file riscv-tdep.c.
Referenced by _initialize_riscv_tdep(), and riscv_breakpoint_kind_from_pc().
|
static |
Definition at line 120 of file riscv-tdep.c.
Referenced by _initialize_riscv_tdep().
|
static |
Definition at line 92 of file riscv-tdep.c.
Referenced by _initialize_riscv_tdep(), riscv_push_dummy_call(), and riscv_return_value().
|
static |
Definition at line 109 of file riscv-tdep.c.
Referenced by _initialize_riscv_tdep().
|
static |
Definition at line 136 of file riscv-tdep.c.
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 130 of file riscv-tdep.c.
const char* riscv_feature_name_csr = "org.gnu.gdb.riscv.csr" |
Definition at line 129 of file riscv-tdep.c.
Referenced by riscv_iterate_over_regset_sections().
|
static |
Definition at line 131 of file riscv-tdep.c.
|
static |
Definition at line 133 of file riscv-tdep.c.
|
static |
Definition at line 132 of file riscv-tdep.c.
|
static |
Definition at line 3805 of file riscv-tdep.c.
Referenced by riscv_gdbarch_init().
|
static |
Definition at line 515 of file riscv-tdep.c.
|
static |
Definition at line 720 of file riscv-tdep.c.
|
static |
Definition at line 555 of file riscv-tdep.c.
|
static |
Definition at line 391 of file riscv-tdep.c.
|
static |
Definition at line 747 of file riscv-tdep.c.
Referenced by _initialize_riscv_tdep().
|
static |
Definition at line 742 of file riscv-tdep.c.
Referenced by _initialize_riscv_tdep().
|
static |
Definition at line 748 of file riscv-tdep.c.
Referenced by _initialize_riscv_tdep().
|
static |
Definition at line 743 of file riscv-tdep.c.
Referenced by _initialize_riscv_tdep().
|
static |
Definition at line 4061 of file riscv-tdep.c.
Referenced by aarch64_linux_init_abi(), amd64_init_abi(), arm_linux_init_abi(), i386_elf_init_abi(), ia64_linux_init_abi(), ppc_linux_init_abi(), riscv_gdbarch_init(), s390_gdbarch_init(), and set_gdbarch_stap_register_indirection_prefixes().
|
static |
Definition at line 4069 of file riscv-tdep.c.
Referenced by aarch64_linux_init_abi(), amd64_init_abi(), arm_linux_init_abi(), i386_elf_init_abi(), ia64_linux_init_abi(), ppc_linux_init_abi(), riscv_gdbarch_init(), s390_gdbarch_init(), and set_gdbarch_stap_register_indirection_suffixes().
|
static |
Definition at line 726 of file riscv-tdep.c.
Referenced by _initialize_riscv_tdep(), and riscv_breakpoint_kind_from_pc().