38 size_t insn_len = loongarch_insn_length (0);
39 gdb_byte buf[insn_len];
54 if ((insn & 0xfc000000) == 0x4c000000
55 || (insn & 0xfc000000) == 0x50000000
56 || (insn & 0xfc000000) == 0x54000000)
66 if ((insn & 0xfc000000) == 0x58000000
67 || (insn & 0xfc000000) == 0x5c000000
68 || (insn & 0xfc000000) == 0x60000000
69 || (insn & 0xfc000000) == 0x64000000
70 || (insn & 0xfc000000) == 0x68000000
71 || (insn & 0xfc000000) == 0x6c000000
72 || (insn & 0xfc000000) == 0x40000000
73 || (insn & 0xfc000000) == 0x44000000)
86 return (is_uncond || is_cond);
94 if ((insn & 0xff000000) == 0x20000000
95 || (insn & 0xff000000) == 0x22000000)
105 if ((insn & 0xff000000) == 0x21000000
106 || (insn & 0xff000000) == 0x23000000)
119 CORE_ADDR cur_pc = start_pc, prologue_end = 0;
123 int32_t reg_used[32] = {1, 0};
125 while (cur_pc < limit_pc)
128 size_t insn_len = loongarch_insn_length (insn);
129 int32_t rd = loongarch_decode_imm (
"0:5", insn, 0);
130 int32_t rj = loongarch_decode_imm (
"5:5", insn, 0);
131 int32_t rk = loongarch_decode_imm (
"10:5", insn, 0);
132 int32_t si12 = loongarch_decode_imm (
"10:12", insn, 1);
133 int32_t si20 = loongarch_decode_imm (
"5:20", insn, 1);
135 if ((insn & 0xffc00000) == 0x02c00000
136 && rd == sp && rj == sp && si12 < 0)
138 prologue_end = cur_pc + insn_len;
140 else if ((insn & 0xffc00000) == 0x02c00000
141 && rd == fp && rj == sp && si12 > 0)
143 prologue_end = cur_pc + insn_len;
145 else if ((insn & 0xffc00000) == 0x29c00000
148 prologue_end = cur_pc + insn_len;
150 else if ((insn & 0xff000000) == 0x27000000
153 prologue_end = cur_pc + insn_len;
155 else if ((insn & 0xfe000000) == 0x14000000)
160 else if ((insn & 0xffc00000) == 0x03800000)
168 else if ((insn & 0xffff8000) == 0x00108000
169 && rd == sp && rj == sp)
171 if (reg_used[rk] == 1 &&
reg_value[rk] < 0)
173 prologue_end = cur_pc + insn_len;
185 if (prologue_end == 0)
186 prologue_end = cur_pc;
203 CORE_ADDR post_prologue_pc
205 if (post_prologue_pc != 0)
206 return std::max (pc, post_prologue_pc);
231 size_t insn_len = loongarch_insn_length (insn);
232 CORE_ADDR next_pc = cur_pc + insn_len;
234 if ((insn & 0xfc000000) == 0x4c000000)
237 loongarch_decode_imm (
"5:5", insn, 0));
238 next_pc = rj + loongarch_decode_imm (
"10:16<<2", insn, 1);
240 else if ((insn & 0xfc000000) == 0x50000000
241 || (insn & 0xfc000000) == 0x54000000)
243 next_pc = cur_pc + loongarch_decode_imm (
"0:10|10:16<<2", insn, 1);
245 else if ((insn & 0xfc000000) == 0x58000000)
248 loongarch_decode_imm (
"5:5", insn, 0));
250 loongarch_decode_imm (
"0:5", insn, 0));
252 next_pc = cur_pc + loongarch_decode_imm (
"10:16<<2", insn, 1);
254 else if ((insn & 0xfc000000) == 0x5c000000)
257 loongarch_decode_imm (
"5:5", insn, 0));
259 loongarch_decode_imm (
"0:5", insn, 0));
261 next_pc = cur_pc + loongarch_decode_imm (
"10:16<<2", insn, 1);
263 else if ((insn & 0xfc000000) == 0x60000000)
266 loongarch_decode_imm (
"5:5", insn, 0));
268 loongarch_decode_imm (
"0:5", insn, 0));
270 next_pc = cur_pc + loongarch_decode_imm (
"10:16<<2", insn, 1);
272 else if ((insn & 0xfc000000) == 0x64000000)
275 loongarch_decode_imm (
"5:5", insn, 0));
277 loongarch_decode_imm (
"0:5", insn, 0));
279 next_pc = cur_pc + loongarch_decode_imm (
"10:16<<2", insn, 1);
281 else if ((insn & 0xfc000000) == 0x68000000)
283 ULONGEST rj = regcache_raw_get_unsigned (
regcache,
284 loongarch_decode_imm (
"5:5", insn, 0));
285 ULONGEST rd = regcache_raw_get_unsigned (
regcache,
286 loongarch_decode_imm (
"0:5", insn, 0));
288 next_pc = cur_pc + loongarch_decode_imm (
"10:16<<2", insn, 1);
290 else if ((insn & 0xfc000000) == 0x6c000000)
292 ULONGEST rj = regcache_raw_get_unsigned (
regcache,
293 loongarch_decode_imm (
"5:5", insn, 0));
294 ULONGEST rd = regcache_raw_get_unsigned (
regcache,
295 loongarch_decode_imm (
"0:5", insn, 0));
297 next_pc = cur_pc + loongarch_decode_imm (
"10:16<<2", insn, 1);
299 else if ((insn & 0xfc000000) == 0x40000000)
302 loongarch_decode_imm (
"5:5", insn, 0));
304 next_pc = cur_pc + loongarch_decode_imm (
"0:5|10:16<<2", insn, 1);
306 else if ((insn & 0xfc000000) == 0x44000000)
309 loongarch_decode_imm (
"5:5", insn, 0));
311 next_pc = cur_pc + loongarch_decode_imm (
"0:5|10:16<<2", insn, 1);
313 else if ((insn & 0xffff8000) == 0x002b0000)
325static std::vector<CORE_ADDR>
329 std::vector<CORE_ADDR> next_pcs;
331 size_t insn_len = loongarch_insn_length (insn);
332 const int atomic_sequence_length = 16;
333 bool found_atomic_sequence_endpoint =
false;
340 for (
int insn_count = 0; insn_count < atomic_sequence_length; ++insn_count)
354 next_pcs.push_back (next_pc);
359 found_atomic_sequence_endpoint =
true;
360 next_pc = cur_pc + insn_len;
361 next_pcs.push_back (next_pc);
367 if (!found_atomic_sequence_endpoint)
375static std::vector<CORE_ADDR>
379 std::vector<CORE_ADDR> next_pcs
382 if (!next_pcs.empty ())
403 return align_down (addr, 16);
414 if (*this_cache !=
nullptr)
444 void **prologue_cache,
int regnum)
453 "loongarch prologue",
500 size_t len,
int align, gdb_byte **addr)
502 align = align_up (align, 8);
506 CORE_ADDR align_addr = (CORE_ADDR) (*addr);
507 align_addr = align_up (align_addr, align);
508 *addr = (gdb_byte *) align_addr;
509 memcpy (*addr, val, len);
517 unsigned int *fixed_point_members,
518 unsigned int *floating_point_members,
519 bool *first_member_is_fixed_point)
529 if (field_type->
code () == TYPE_CODE_INT
530 || field_type->
code () == TYPE_CODE_BOOL
531 || field_type->
code () == TYPE_CODE_CHAR
532 || field_type->
code () == TYPE_CODE_RANGE
533 || field_type->
code () == TYPE_CODE_ENUM
534 || field_type->
code () == TYPE_CODE_PTR)
536 (*fixed_point_members)++;
538 if (*floating_point_members == 0)
539 *first_member_is_fixed_point =
true;
541 else if (field_type->
code () == TYPE_CODE_FLT)
542 (*floating_point_members)++;
543 else if (field_type->
code () == TYPE_CODE_STRUCT)
546 floating_point_members,
547 first_member_is_fixed_point);
548 else if (field_type->
code () == TYPE_CODE_COMPLEX)
549 (*floating_point_members) += 2;
557 struct value *function,
564 CORE_ADDR struct_addr)
569 unsigned int fixed_point_members;
570 unsigned int floating_point_members;
571 bool first_member_is_fixed_point;
572 gdb_byte buf[1024] = { 0 };
573 gdb_byte *addr = buf;
578 for (
int i = 0; i < nargs; i++)
580 struct value *arg = args[i];
581 const gdb_byte *val = arg->
contents ().data ();
594 case TYPE_CODE_RANGE:
622 if (len == 2 * regsize)
688 if (!varargs && far > 0)
696 case TYPE_CODE_STRUCT:
698 fixed_point_members = 0;
699 floating_point_members = 0;
700 first_member_is_fixed_point =
false;
702 &fixed_point_members,
703 &floating_point_members,
704 &first_member_is_fixed_point);
706 if (len > 0 && len <= regsize)
709 if (fixed_point_members > 0 && floating_point_members == 0)
720 else if (fixed_point_members == 0 && floating_point_members > 0)
726 if (floating_point_members == 1)
728 if (!varargs && far > 0)
741 else if (floating_point_members == 2)
743 if (!varargs && far >= 2)
759 else if (fixed_point_members > 0 && floating_point_members > 0)
764 if (floating_point_members == 1 && fixed_point_members > 1)
777 else if (floating_point_members == 1 && fixed_point_members == 1)
779 if (!varargs && far > 0 && gar > 0)
781 if (first_member_is_fixed_point ==
false)
802 else if (len > regsize && len <= 2 * regsize)
805 if (fixed_point_members > 0 && floating_point_members == 0)
830 else if (fixed_point_members == 0 && floating_point_members > 0)
842 if ((len == 16 && floating_point_members == 1)
843 || (len == 16 && floating_point_members == 3)
844 || (len == 12 && floating_point_members == 3)
845 || (len == 16 && floating_point_members == 4))
883 else if ((len == 16 && floating_point_members == 2)
884 || (len == 12 && floating_point_members == 2))
886 if (!varargs && far >= 2)
908 else if (fixed_point_members > 0 && floating_point_members > 0)
911 if (floating_point_members == 1 && fixed_point_members == 1)
922 if (!varargs && far > 0 && gar > 0)
924 if (first_member_is_fixed_point ==
false)
935 else if ((!varargs && far == 0 && gar >= 2) || (varargs && gar >= 2))
940 else if ((!varargs && far == 0 && gar == 1) || (varargs && gar == 1))
945 else if ((!varargs && far == 0 && gar == 0) || (varargs && gar == 0))
976 else if (len > 2 * regsize)
981 sp = align_down (sp - len, 16);
991 case TYPE_CODE_UNION:
993 if (len > 0 && len <= regsize)
1002 else if (len > regsize && len <= 2 * regsize)
1026 else if (len > 2 * regsize)
1031 sp = align_down (sp - len, 16);
1040 case TYPE_CODE_COMPLEX:
1045 if (target_len < regsize)
1053 if (!varargs && far >= 2)
1067 else if (target_len == regsize)
1082 if (!varargs && far >= 2)
1103 else if (target_len == 2 * regsize)
1109 sp = align_down (sp - len, 16);
1127 sp = align_down (sp, 16);
1141 int regnum,
int len, gdb_byte *readbuf,
1142 const gdb_byte *writebuf,
size_t offset)
1155 gdb_byte *readbuf,
const gdb_byte *writebuf)
1160 unsigned int fixed_point_members;
1161 unsigned int floating_point_members;
1162 bool first_member_is_fixed_point;
1168 if (len > 2 * regsize)
1174 case TYPE_CODE_BOOL:
1175 case TYPE_CODE_CHAR:
1176 case TYPE_CODE_RANGE:
1177 case TYPE_CODE_ENUM:
1186 gdb_byte buf[regsize];
1206 if (len == 2 * regsize)
1218 case TYPE_CODE_STRUCT:
1220 fixed_point_members = 0;
1221 floating_point_members = 0;
1222 first_member_is_fixed_point =
false;
1224 &fixed_point_members,
1225 &floating_point_members,
1226 &first_member_is_fixed_point);
1228 if (len > 0 && len <= regsize)
1231 if (fixed_point_members > 0 && floating_point_members == 0)
1237 else if (fixed_point_members == 0 && floating_point_members > 0)
1241 if (floating_point_members == 1)
1247 else if (floating_point_members == 2)
1254 else if (fixed_point_members > 0 && floating_point_members > 0)
1258 if (floating_point_members == 1 && fixed_point_members > 1)
1263 else if (floating_point_members == 1 && fixed_point_members == 1)
1266 if (first_member_is_fixed_point ==
false)
1280 else if (len > regsize && len <= 2 * regsize)
1283 if (fixed_point_members > 0 && floating_point_members == 0)
1290 else if (fixed_point_members == 0 && floating_point_members > 0)
1296 if ((len == 16 && floating_point_members == 1)
1297 || (len == 16 && floating_point_members == 3)
1298 || (len == 12 && floating_point_members == 3)
1299 || (len == 16 && floating_point_members == 4))
1307 else if ((len == 16 && floating_point_members == 2)
1308 || (len == 12 && floating_point_members == 2))
1315 else if (fixed_point_members > 0 && floating_point_members > 0)
1318 if (floating_point_members == 1 && fixed_point_members == 1)
1321 if (first_member_is_fixed_point ==
false)
1343 case TYPE_CODE_UNION:
1344 if (len > 0 && len <= regsize)
1349 else if (len > regsize && len <= 2 * regsize)
1356 case TYPE_CODE_COMPLEX:
1390loongarch_features_from_bfd (const bfd *abfd)
1400 if (abfd !=
nullptr && bfd_get_flavour (abfd) == bfd_target_elf_flavour)
1402 unsigned char eclass = elf_elfheader (abfd)->e_ident[EI_CLASS];
1403 int e_flags = elf_elfheader (abfd)->e_flags;
1405 if (eclass == ELFCLASS32)
1407 else if (eclass == ELFCLASS64)
1410 internal_error (_(
"unknown ELF header class %d"), eclass);
1412 if (EF_LOONGARCH_IS_SINGLE_FLOAT (e_flags))
1414 else if (EF_LOONGARCH_IS_DOUBLE_FLOAT (e_flags))
1430 = loongarch_features_from_bfd (info.abfd);
1436 if (features.
xlen == 0)
1437 features.
xlen = info.bfd_arch_info->bits_per_address == 32 ? 4 : 8;
1494 const struct target_desc *tdesc = info.target_desc;
1500 const struct tdesc_feature *feature_cpu
1502 if (feature_cpu ==
nullptr)
1508 bool valid_p =
true;
1509 for (
int i = 0; i < 32; i++)
1511 loongarch_r_normal_name[i] + 1);
1518 const struct tdesc_feature *feature_fpu
1520 if (feature_fpu ==
nullptr)
1528 loongarch_f_normal_name[i] + 1);
1531 loongarch_c_normal_name[i] + 1);
1537 info.byte_order_for_code = BFD_ENDIAN_LITTLE;
1543 = loongarch_features_from_bfd (info.abfd);
1548 if (abi_features.
xlen == 0)
1551 features.
xlen = (xlen_bitsize / 8);
1553 abi_features = features;
1555 if (abi_features.
fputype == 0)
1559 abi_features = features;
1571 = gdbarch_tdep<loongarch_gdbarch_tdep> (
arches->gdbarch);
1601 info.target_desc = tdesc;
1604 for (
int i = 0; i < ARRAY_SIZE (loongarch_r_lp64_name); ++i)
1605 if (loongarch_r_lp64_name[i][0] !=
'\0')
1609 for (
int i = 0; i < ARRAY_SIZE (loongarch_f_lp64_name); ++i)
1611 if (loongarch_f_lp64_name[i][0] !=
'\0')
void gdbarch_register(enum bfd_architecture bfd_architecture, gdbarch_init_ftype *init, gdbarch_dump_tdep_ftype *dump_tdep, gdbarch_supports_arch_info_ftype *supports_arch_info)
static std::vector< const char * > arches
int core_addr_lessthan(CORE_ADDR lhs, CORE_ADDR rhs)
struct gdbarch_list * gdbarch_list_lookup_by_info(struct gdbarch_list *arches, const struct gdbarch_info *info)
#define BP_MANIPULATION(BREAK_INSN)
bool find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr, const struct block **block)
enum register_status cooked_read_part(int regnum, int offset, int len, gdb_byte *buf)
void cooked_write(int regnum, const gdb_byte *buf)
void cooked_write_part(int regnum, int offset, int len, const gdb_byte *buf)
void write_memory(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
void memory_error(enum target_xfer_status err, CORE_ADDR memaddr)
static void store_signed_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, LONGEST val)
static void store_unsigned_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, ULONGEST val)
static LONGEST extract_signed_integer(gdb::array_view< const gdb_byte > buf, enum bfd_endian byte_order)
static ULONGEST extract_unsigned_integer(gdb::array_view< const gdb_byte > buf, enum bfd_endian byte_order)
@ RETURN_VALUE_REGISTER_CONVENTION
@ RETURN_VALUE_STRUCT_CONVENTION
void dwarf2_append_unwinders(struct gdbarch *gdbarch)
struct value * value_of_register(int regnum, frame_info_ptr frame)
int default_frame_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_prologue_cache)
enum unwind_stop_reason default_frame_unwind_stop_reason(frame_info_ptr this_frame, void **this_cache)
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
struct frame_id frame_id_build_unavailable_stack(CORE_ADDR code_addr)
frame_info_ptr get_current_frame(void)
CORE_ADDR get_frame_address_in_block(frame_info_ptr this_frame)
void set_gdbarch_long_long_bit(struct gdbarch *gdbarch, int long_long_bit)
void set_gdbarch_char_signed(struct gdbarch *gdbarch, int char_signed)
void set_gdbarch_breakpoint_kind_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_kind_from_pc_ftype *breakpoint_kind_from_pc)
const char * gdbarch_register_name(struct gdbarch *gdbarch, int regnr)
void set_gdbarch_software_single_step(struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step)
void set_gdbarch_frame_align(struct gdbarch *gdbarch, gdbarch_frame_align_ftype *frame_align)
void set_gdbarch_skip_prologue(struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue)
void set_gdbarch_int_bit(struct gdbarch *gdbarch, int int_bit)
void set_gdbarch_return_value(struct gdbarch *gdbarch, gdbarch_return_value_ftype *return_value)
int gdbarch_num_regs(struct gdbarch *gdbarch)
void set_gdbarch_double_bit(struct gdbarch *gdbarch, int double_bit)
void set_gdbarch_inner_than(struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than)
void set_gdbarch_sp_regnum(struct gdbarch *gdbarch, int sp_regnum)
void set_gdbarch_register_reggroup_p(struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p)
void set_gdbarch_long_double_format(struct gdbarch *gdbarch, const struct floatformat **long_double_format)
void set_gdbarch_pc_regnum(struct gdbarch *gdbarch, int pc_regnum)
void set_gdbarch_float_bit(struct gdbarch *gdbarch, int float_bit)
void set_gdbarch_short_bit(struct gdbarch *gdbarch, int short_bit)
void set_gdbarch_dwarf2_reg_to_regnum(struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum)
void set_gdbarch_long_bit(struct gdbarch *gdbarch, int long_bit)
void set_gdbarch_ptr_bit(struct gdbarch *gdbarch, int ptr_bit)
void set_gdbarch_num_regs(struct gdbarch *gdbarch, int num_regs)
void set_gdbarch_long_double_bit(struct gdbarch *gdbarch, int long_double_bit)
void set_gdbarch_sw_breakpoint_from_kind(struct gdbarch *gdbarch, gdbarch_sw_breakpoint_from_kind_ftype *sw_breakpoint_from_kind)
void set_gdbarch_push_dummy_call(struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call)
struct gdbarch * gdbarch_alloc(const struct gdbarch_info *info, gdbarch_tdep_up tdep)
std::unique_ptr< gdbarch_tdep_base > gdbarch_tdep_up
function_call_return_method
const struct floatformat * floatformats_ieee_quad[BFD_ENDIAN_UNKNOWN]
unsigned type_align(struct type *type)
struct type * check_typedef(struct type *type)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t err
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 int loongarch_register_reggroup_p(struct gdbarch *gdbarch, int regnum, const struct reggroup *group)
static void loongarch_frame_this_id(frame_info_ptr this_frame, void **prologue_cache, struct frame_id *this_id)
static void loongarch_xfer_reg(struct regcache *regcache, int regnum, int len, gdb_byte *readbuf, const gdb_byte *writebuf, size_t offset)
static struct value * loongarch_frame_prev_register(frame_info_ptr this_frame, void **prologue_cache, int regnum)
static bool loongarch_insn_is_branch(insn_t insn)
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 pass_in_far(struct regcache *regcache, unsigned int far, const gdb_byte *val)
static void pass_in_gar(struct regcache *regcache, unsigned int gar, const gdb_byte *val)
static constexpr gdb_byte loongarch_default_breakpoint[]
static std::vector< CORE_ADDR > loongarch_deal_with_atomic_sequence(struct regcache *regcache, CORE_ADDR cur_pc)
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 struct value * value_of_loongarch_user_reg(frame_info_ptr frame, const void *baton)
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 struct trad_frame_cache * loongarch_frame_cache(frame_info_ptr this_frame, void **this_cache)
static bool loongarch_insn_is_uncond_branch(insn_t insn)
void _initialize_loongarch_tdep()
static int loongarch_dwarf2_reg_to_regnum(struct gdbarch *gdbarch, int regnum)
static bool loongarch_insn_is_sc(insn_t insn)
static const struct target_desc * loongarch_find_default_target_description(const struct gdbarch_info info)
static CORE_ADDR loongarch_skip_prologue(struct gdbarch *gdbarch, CORE_ADDR pc)
static void pass_on_stack(struct regcache *regcache, const gdb_byte *val, size_t len, int align, gdb_byte **addr)
static CORE_ADDR loongarch_next_pc(struct regcache *regcache, CORE_ADDR cur_pc)
static bool loongarch_insn_is_ll(insn_t insn)
static bool loongarch_insn_is_cond_branch(insn_t insn)
static struct gdbarch * loongarch_gdbarch_init(struct gdbarch_info info, struct gdbarch_list *arches)
static const struct frame_unwind loongarch_frame_unwind
static insn_t loongarch_fetch_instruction(CORE_ADDR pc)
static CORE_ADDR loongarch_frame_align(struct gdbarch *gdbarch, CORE_ADDR addr)
static std::vector< CORE_ADDR > loongarch_software_single_step(struct regcache *regcache)
const target_desc * loongarch_lookup_target_description(const struct loongarch_gdbarch_features features)
@ LOONGARCH_LINUX_NUM_FPREGSET
@ LOONGARCH_LINUX_NUM_FCC
@ LOONGARCH_FIRST_FP_REGNUM
void gdbarch_init_osabi(struct gdbarch_info info, struct gdbarch *gdbarch)
CORE_ADDR regcache_read_pc(struct regcache *regcache)
int register_size(struct gdbarch *gdbarch, int regnum)
LONGEST regcache_raw_get_signed(struct regcache *regcache, int regnum)
void regcache_cooked_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
const reggroup *const general_reggroup
int default_register_reggroup_p(struct gdbarch *gdbarch, int regnum, const struct reggroup *group)
const reggroup *const float_reggroup
const reggroup *const save_reggroup
const reggroup *const all_reggroup
const reggroup *const restore_reggroup
struct type * type() const
struct loongarch_gdbarch_features abi_features
CORE_ADDR(* syscall_next_pc)(frame_info_ptr frame)
frame_info_ptr this_frame
struct type * target_type() const
struct field & field(int idx) const
unsigned int num_fields() const
gdb::array_view< const gdb_byte > contents()
struct type * type() const
CORE_ADDR skip_prologue_using_sal(struct gdbarch *gdbarch, CORE_ADDR func_addr)
tdesc_arch_data_up tdesc_data_alloc(void)
const struct tdesc_feature * tdesc_find_feature(const struct target_desc *target_desc, const char *name)
int tdesc_numbered_register(const struct tdesc_feature *feature, struct tdesc_arch_data *data, int regno, const char *name)
static const registry< gdbarch >::key< tdesc_arch_data > tdesc_data
void tdesc_use_registers(struct gdbarch *gdbarch, const struct target_desc *target_desc, tdesc_arch_data_up &&early_data, tdesc_unknown_register_ftype unk_reg_cb)
int tdesc_has_registers(const struct target_desc *target_desc)
int tdesc_register_bitsize(const struct tdesc_feature *feature, const char *name)
int tdesc_register_in_reggroup_p(struct gdbarch *gdbarch, int regno, const struct reggroup *reggroup)
std::unique_ptr< tdesc_arch_data, tdesc_arch_data_deleter > tdesc_arch_data_up
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
void trad_frame_set_reg_realreg(struct trad_frame_cache *this_trad_cache, int regnum, int realreg)
struct trad_frame_cache * trad_frame_cache_zalloc(frame_info_ptr this_frame)
void trad_frame_get_id(struct trad_frame_cache *this_trad_cache, struct frame_id *this_id)
void trad_frame_set_id(struct trad_frame_cache *this_trad_cache, struct frame_id this_id)
struct value * trad_frame_get_register(struct trad_frame_cache *this_trad_cache, frame_info_ptr this_frame, int regnum)
void user_reg_add(struct gdbarch *gdbarch, const char *name, user_reg_read_ftype *xread, const void *baton)