GDB (xrefs)
|
#include "defs.h"
#include "arch-utils.h"
#include "dwarf2/frame.h"
#include "elf-bfd.h"
#include "frame-unwind.h"
#include "gdbcore.h"
#include "loongarch-tdep.h"
#include "reggroups.h"
#include "target.h"
#include "target-descriptions.h"
#include "trad-frame.h"
#include "user-regs.h"
Go to the source code of this file.
Functions | |
static insn_t | loongarch_fetch_instruction (CORE_ADDR pc) |
static bool | loongarch_insn_is_uncond_branch (insn_t insn) |
static bool | loongarch_insn_is_cond_branch (insn_t insn) |
static bool | loongarch_insn_is_branch (insn_t insn) |
static bool | loongarch_insn_is_ll (insn_t insn) |
static bool | loongarch_insn_is_sc (insn_t insn) |
static CORE_ADDR | loongarch_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc, CORE_ADDR limit_pc, frame_info_ptr this_frame, struct trad_frame_cache *this_cache) |
static CORE_ADDR | loongarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) |
static CORE_ADDR | loongarch_next_pc (struct regcache *regcache, CORE_ADDR cur_pc) |
static std::vector< CORE_ADDR > | loongarch_deal_with_atomic_sequence (struct regcache *regcache, CORE_ADDR cur_pc) |
static std::vector< CORE_ADDR > | loongarch_software_single_step (struct regcache *regcache) |
static struct value * | value_of_loongarch_user_reg (frame_info_ptr frame, const void *baton) |
static CORE_ADDR | loongarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr) |
static struct trad_frame_cache * | loongarch_frame_cache (frame_info_ptr this_frame, void **this_cache) |
static void | loongarch_frame_this_id (frame_info_ptr this_frame, void **prologue_cache, struct frame_id *this_id) |
static struct value * | loongarch_frame_prev_register (frame_info_ptr this_frame, void **prologue_cache, int regnum) |
static void | pass_in_gar (struct regcache *regcache, unsigned int gar, const gdb_byte *val) |
static void | pass_in_far (struct regcache *regcache, unsigned int far, const gdb_byte *val) |
static void | pass_on_stack (struct regcache *regcache, const gdb_byte *val, size_t len, int align, gdb_byte **addr) |
static void | compute_struct_member (struct type *type, unsigned int *fixed_point_members, unsigned int *floating_point_members, bool *first_member_is_fixed_point) |
static CORE_ADDR | loongarch_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 void | loongarch_xfer_reg (struct regcache *regcache, int regnum, int len, gdb_byte *readbuf, const gdb_byte *writebuf, size_t offset) |
static enum return_value_convention | loongarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) |
static int | loongarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int regnum) |
typedef | BP_MANIPULATION (loongarch_default_breakpoint) |
static const struct target_desc * | loongarch_find_default_target_description (const struct gdbarch_info info) |
static int | loongarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, const struct reggroup *group) |
static struct gdbarch * | loongarch_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) |
void | _initialize_loongarch_tdep () |
Variables | |
static const struct frame_unwind | loongarch_frame_unwind |
static constexpr gdb_byte | loongarch_default_breakpoint [] = {0x05, 0x00, 0x2a, 0x00} |
void _initialize_loongarch_tdep | ( | ) |
Definition at line 1659 of file loongarch-tdep.c.
References gdbarch_register(), and loongarch_gdbarch_init().
typedef BP_MANIPULATION | ( | loongarch_default_breakpoint | ) |
Definition at line 1384 of file loongarch-tdep.c.
References DOUBLE_FLOAT, loongarch_gdbarch_features::fputype, SINGLE_FLOAT, and loongarch_gdbarch_features::xlen.
|
static |
Definition at line 516 of file loongarch-tdep.c.
References check_typedef(), type::code(), compute_struct_member(), type::field(), field::is_static(), type::num_fields(), and field::type().
Referenced by compute_struct_member(), loongarch_push_dummy_call(), and loongarch_return_value().
|
static |
Definition at line 326 of file loongarch-tdep.c.
References loongarch_fetch_instruction(), loongarch_insn_is_cond_branch(), loongarch_insn_is_ll(), loongarch_insn_is_sc(), loongarch_insn_is_uncond_branch(), and loongarch_next_pc().
Referenced by loongarch_software_single_step().
|
static |
Definition at line 1373 of file loongarch-tdep.c.
References LOONGARCH_FIRST_FP_REGNUM, and regnum.
Referenced by loongarch_gdbarch_init().
|
static |
Definition at line 36 of file loongarch-tdep.c.
References err, extract_unsigned_integer(), memory_error(), target_read_memory(), and TARGET_XFER_E_IO.
Referenced by loongarch_deal_with_atomic_sequence(), loongarch_next_pc(), and loongarch_scan_prologue().
|
static |
Definition at line 1426 of file loongarch-tdep.c.
References DOUBLE_FLOAT, loongarch_gdbarch_features::fputype, loongarch_lookup_target_description(), and loongarch_gdbarch_features::xlen.
Referenced by loongarch_gdbarch_init().
|
static |
Definition at line 401 of file loongarch-tdep.c.
Referenced by loongarch_gdbarch_init().
|
static |
Definition at line 409 of file loongarch-tdep.c.
References frame_id_build_unavailable_stack(), get_frame_address_in_block(), LOONGARCH_PC_REGNUM, LOONGARCH_RA_REGNUM, trad_frame_cache::this_frame, trad_frame_cache_zalloc(), trad_frame_set_id(), and trad_frame_set_reg_realreg().
Referenced by loongarch_frame_prev_register(), and loongarch_frame_this_id().
|
static |
Definition at line 443 of file loongarch-tdep.c.
References loongarch_frame_cache(), regnum, trad_frame_cache::this_frame, and trad_frame_get_register().
|
static |
Definition at line 431 of file loongarch-tdep.c.
References loongarch_frame_cache(), trad_frame_cache::this_frame, trad_frame_cache::this_id, and trad_frame_get_id().
|
static |
Definition at line 1489 of file loongarch-tdep.c.
References loongarch_gdbarch_tdep::abi_features, arches, core_addr_lessthan(), DOUBLE_FLOAT, dwarf2_append_unwinders(), floatformats_ieee_quad, loongarch_gdbarch_features::fputype, frame_unwind_append_unwinder(), gdbarch_alloc(), gdbarch_init_osabi(), gdbarch_list_lookup_by_info(), registry< T >::get(), loongarch_dwarf2_reg_to_regnum(), loongarch_find_default_target_description(), LOONGARCH_FIRST_FP_REGNUM, loongarch_frame_align(), loongarch_frame_unwind, LOONGARCH_LINUX_NUM_FCC, LOONGARCH_LINUX_NUM_FPREGSET, LOONGARCH_PC_REGNUM, loongarch_push_dummy_call(), loongarch_register_reggroup_p(), loongarch_return_value(), loongarch_skip_prologue(), loongarch_software_single_step(), LOONGARCH_SP_REGNUM, regnum, set_gdbarch_breakpoint_kind_from_pc(), set_gdbarch_char_signed(), set_gdbarch_double_bit(), set_gdbarch_dwarf2_reg_to_regnum(), set_gdbarch_float_bit(), set_gdbarch_frame_align(), 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_regs(), set_gdbarch_pc_regnum(), set_gdbarch_ptr_bit(), set_gdbarch_push_dummy_call(), set_gdbarch_register_reggroup_p(), set_gdbarch_return_value(), set_gdbarch_short_bit(), set_gdbarch_skip_prologue(), set_gdbarch_software_single_step(), set_gdbarch_sp_regnum(), set_gdbarch_sw_breakpoint_from_kind(), tdesc_data, tdesc_data_alloc(), tdesc_find_feature(), tdesc_has_registers(), tdesc_numbered_register(), tdesc_register_bitsize(), tdesc_use_registers(), user_reg_add(), value_of_loongarch_user_reg(), and loongarch_gdbarch_features::xlen.
Referenced by _initialize_loongarch_tdep().
|
static |
Definition at line 81 of file loongarch-tdep.c.
References loongarch_insn_is_cond_branch(), and loongarch_insn_is_uncond_branch().
Referenced by loongarch_scan_prologue().
|
static |
Definition at line 64 of file loongarch-tdep.c.
Referenced by loongarch_deal_with_atomic_sequence(), and loongarch_insn_is_branch().
|
static |
Definition at line 92 of file loongarch-tdep.c.
Referenced by loongarch_deal_with_atomic_sequence().
|
static |
Definition at line 103 of file loongarch-tdep.c.
Referenced by loongarch_deal_with_atomic_sequence().
|
static |
Definition at line 52 of file loongarch-tdep.c.
Referenced by loongarch_deal_with_atomic_sequence(), and loongarch_insn_is_branch().
|
static |
Definition at line 226 of file loongarch-tdep.c.
References reg_buffer::arch(), get_current_frame(), loongarch_fetch_instruction(), regcache_raw_get_signed(), and loongarch_gdbarch_tdep::syscall_next_pc.
Referenced by loongarch_deal_with_atomic_sequence(), and loongarch_software_single_step().
|
static |
Definition at line 556 of file loongarch-tdep.c.
References check_typedef(), code, type::code(), compute_struct_member(), value::contents(), extract_signed_integer(), extract_unsigned_integer(), type::is_unsigned(), type::length(), LOONGARCH_ARG_REGNUM, LOONGARCH_RA_REGNUM, LOONGARCH_SP_REGNUM, pass_in_far(), pass_in_gar(), pass_on_stack(), regcache_cooked_write_unsigned(), register_size(), return_method_normal, type::target_type(), value::type(), type_align(), and write_memory().
Referenced by loongarch_gdbarch_init().
|
static |
Definition at line 1450 of file loongarch-tdep.c.
References all_reggroup, default_register_reggroup_p(), float_reggroup, gdbarch_num_regs(), gdbarch_register_name(), general_reggroup, LOONGARCH_BADV_REGNUM, LOONGARCH_FCSR_REGNUM, LOONGARCH_FIRST_FP_REGNUM, regnum, restore_reggroup, save_reggroup, and tdesc_register_in_reggroup_p().
Referenced by loongarch_gdbarch_init().
|
static |
Definition at line 1153 of file loongarch-tdep.c.
References code, type::code(), compute_struct_member(), extract_signed_integer(), extract_unsigned_integer(), type::is_unsigned(), type::length(), LOONGARCH_A0_REGNUM, LOONGARCH_FIRST_FP_REGNUM, loongarch_xfer_reg(), register_size(), RETURN_VALUE_REGISTER_CONVENTION, RETURN_VALUE_STRUCT_CONVENTION, store_signed_integer(), and store_unsigned_integer().
Referenced by loongarch_gdbarch_init().
|
static |
Definition at line 115 of file loongarch-tdep.c.
References loongarch_fetch_instruction(), LOONGARCH_FP_REGNUM, loongarch_insn_is_branch(), and LOONGARCH_SP_REGNUM.
Referenced by loongarch_skip_prologue().
|
static |
Definition at line 194 of file loongarch-tdep.c.
References find_pc_partial_function(), loongarch_scan_prologue(), and skip_prologue_using_sal().
Referenced by loongarch_gdbarch_init().
|
static |
Definition at line 376 of file loongarch-tdep.c.
References loongarch_deal_with_atomic_sequence(), loongarch_next_pc(), and regcache_read_pc().
Referenced by loongarch_gdbarch_init().
|
static |
Definition at line 1140 of file loongarch-tdep.c.
References readable_regcache::cooked_read_part(), regcache::cooked_write_part(), and regnum.
Referenced by loongarch_return_value().
|
static |
Definition at line 490 of file loongarch-tdep.c.
References regcache::cooked_write(), LOONGARCH_ARG_REGNUM, LOONGARCH_FIRST_FP_REGNUM, and regnum.
Referenced by loongarch_push_dummy_call().
|
static |
Definition at line 474 of file loongarch-tdep.c.
References regcache::cooked_write(), LOONGARCH_A0_REGNUM, LOONGARCH_ARG_REGNUM, and regnum.
Referenced by loongarch_push_dummy_call().
|
static |
Definition at line 499 of file loongarch-tdep.c.
Referenced by loongarch_push_dummy_call().
|
static |
Definition at line 393 of file loongarch-tdep.c.
References value_of_register().
Referenced by loongarch_gdbarch_init().
|
staticconstexpr |
Definition at line 1383 of file loongarch-tdep.c.
|
static |
Definition at line 452 of file loongarch-tdep.c.
Referenced by loongarch_gdbarch_init().