44#include "gdbsupport/selftest.h"
54#include "opcode/aarch64.h"
56#include <unordered_map>
65#define HA_MAX_NUM_FLDS 4
94 "x0",
"x1",
"x2",
"x3",
95 "x4",
"x5",
"x6",
"x7",
96 "x8",
"x9",
"x10",
"x11",
97 "x12",
"x13",
"x14",
"x15",
98 "x16",
"x17",
"x18",
"x19",
99 "x20",
"x21",
"x22",
"x23",
100 "x24",
"x25",
"x26",
"x27",
101 "x28",
"x29",
"x30",
"sp",
110 "v0",
"v1",
"v2",
"v3",
111 "v4",
"v5",
"v6",
"v7",
112 "v8",
"v9",
"v10",
"v11",
113 "v12",
"v13",
"v14",
"v15",
114 "v16",
"v17",
"v18",
"v19",
115 "v20",
"v21",
"v22",
"v23",
116 "v24",
"v25",
"v26",
"v27",
117 "v28",
"v29",
"v30",
"v31",
127 "z0",
"z1",
"z2",
"z3",
128 "z4",
"z5",
"z6",
"z7",
129 "z8",
"z9",
"z10",
"z11",
130 "z12",
"z13",
"z14",
"z15",
131 "z16",
"z17",
"z18",
"z19",
132 "z20",
"z21",
"z22",
"z23",
133 "z24",
"z25",
"z26",
"z27",
134 "z28",
"z29",
"z30",
"z31",
136 "p0",
"p1",
"p2",
"p3",
137 "p4",
"p5",
"p6",
"p7",
138 "p8",
"p9",
"p10",
"p11",
139 "p12",
"p13",
"p14",
"p15",
243class abstract_instruction_reader
247 virtual ULONGEST
read (CORE_ADDR memaddr,
int len,
248 enum bfd_endian byte_order) = 0;
253class instruction_reader :
public abstract_instruction_reader
256 ULONGEST
read (CORE_ADDR memaddr,
int len,
enum bfd_endian byte_order)
315 CORE_ADDR start, CORE_ADDR limit,
317 abstract_instruction_reader& reader)
325 bool seen_stack_set =
false;
334 for (; start < limit; start += 4)
339 insn = reader.read (start, 4, byte_order_for_code);
341 if (aarch64_decode_insn (insn, &inst, 1, NULL) != 0)
344 if (inst.opcode->iclass == addsub_imm
345 && (inst.opcode->op == OP_ADD
346 || strcmp (
"sub", inst.opcode->name) == 0))
348 unsigned rd = inst.operands[0].reg.regno;
349 unsigned rn = inst.operands[1].reg.regno;
351 gdb_assert (aarch64_num_of_operands (inst.opcode) == 3);
352 gdb_assert (inst.operands[0].type == AARCH64_OPND_Rd_SP);
353 gdb_assert (inst.operands[1].type == AARCH64_OPND_Rn_SP);
354 gdb_assert (inst.operands[2].type == AARCH64_OPND_AIMM);
356 if (inst.opcode->op == OP_ADD)
359 inst.operands[2].imm.value);
364 -inst.operands[2].imm.value);
369 seen_stack_set =
true;
371 else if (inst.opcode->iclass == addsub_ext
372 && strcmp (
"sub", inst.opcode->name) == 0)
374 unsigned rd = inst.operands[0].reg.regno;
375 unsigned rn = inst.operands[1].reg.regno;
376 unsigned rm = inst.operands[2].reg.regno;
378 gdb_assert (aarch64_num_of_operands (inst.opcode) == 3);
379 gdb_assert (inst.operands[0].type == AARCH64_OPND_Rd_SP);
380 gdb_assert (inst.operands[1].type == AARCH64_OPND_Rn_SP);
381 gdb_assert (inst.operands[2].type == AARCH64_OPND_Rm_EXT);
385 else if (inst.opcode->iclass == branch_imm)
390 else if (inst.opcode->iclass == condbranch)
395 else if (inst.opcode->iclass == branch_reg)
400 else if (inst.opcode->iclass == compbranch)
405 else if (inst.opcode->op == OP_MOVZ)
407 unsigned rd = inst.operands[0].reg.regno;
409 gdb_assert (aarch64_num_of_operands (inst.opcode) == 2);
410 gdb_assert (inst.operands[0].type == AARCH64_OPND_Rd);
411 gdb_assert (inst.operands[1].type == AARCH64_OPND_HALF);
412 gdb_assert (inst.operands[1].shifter.kind == AARCH64_MOD_LSL);
420 << inst.operands[1].shifter.amount);
422 else if (inst.opcode->iclass == log_shift
423 && strcmp (inst.opcode->name,
"orr") == 0)
425 unsigned rd = inst.operands[0].reg.regno;
426 unsigned rn = inst.operands[1].reg.regno;
427 unsigned rm = inst.operands[2].reg.regno;
429 gdb_assert (inst.operands[0].type == AARCH64_OPND_Rd);
430 gdb_assert (inst.operands[1].type == AARCH64_OPND_Rn);
431 gdb_assert (inst.operands[2].type == AARCH64_OPND_Rm_SFT);
433 if (inst.operands[2].shifter.amount == 0
439 "addr=%s opcode=0x%x (orr x register)",
440 core_addr_to_string_nz (start), insn);
445 else if (inst.opcode->op == OP_STUR)
447 unsigned rt = inst.operands[0].reg.regno;
448 unsigned rn = inst.operands[1].addr.base_regno;
449 int size = aarch64_get_qualifier_esize (inst.operands[0].qualifier);
451 gdb_assert (aarch64_num_of_operands (inst.opcode) == 2);
452 gdb_assert (inst.operands[0].type == AARCH64_OPND_Rt);
453 gdb_assert (inst.operands[1].type == AARCH64_OPND_ADDR_SIMM9);
454 gdb_assert (!inst.operands[1].addr.offset.is_reg);
462 seen_stack_set =
true;
464 else if ((inst.opcode->iclass == ldstpair_off
465 || (inst.opcode->iclass == ldstpair_indexed
466 && inst.operands[2].addr.preind))
467 && strcmp (
"stp", inst.opcode->name) == 0)
472 unsigned rn = inst.operands[2].addr.base_regno;
473 int32_t imm = inst.operands[2].addr.offset.imm;
474 int size = aarch64_get_qualifier_esize (inst.operands[0].qualifier);
476 gdb_assert (inst.operands[0].type == AARCH64_OPND_Rt
477 || inst.operands[0].type == AARCH64_OPND_Ft);
478 gdb_assert (inst.operands[1].type == AARCH64_OPND_Rt2
479 || inst.operands[1].type == AARCH64_OPND_Ft2);
480 gdb_assert (inst.operands[2].type == AARCH64_OPND_ADDR_SIMM7);
481 gdb_assert (!inst.operands[2].addr.offset.is_reg);
492 rt1 = inst.operands[0].reg.regno;
493 rt2 = inst.operands[1].reg.regno;
494 if (inst.operands[0].type == AARCH64_OPND_Ft)
503 if (inst.operands[2].addr.writeback)
509 seen_stack_set =
true;
511 else if ((inst.opcode->iclass == ldst_imm9
512 || (inst.opcode->iclass == ldst_pos
513 && (inst.opcode->op == OP_STR_POS
514 || inst.opcode->op == OP_STRF_POS)))
516 && strcmp (
"str", inst.opcode->name) == 0)
519 unsigned int rt = inst.operands[0].reg.regno;
520 int32_t imm = inst.operands[1].addr.offset.imm;
521 unsigned int rn = inst.operands[1].addr.base_regno;
522 int size = aarch64_get_qualifier_esize (inst.operands[0].qualifier);
523 gdb_assert (inst.operands[0].type == AARCH64_OPND_Rt
524 || inst.operands[0].type == AARCH64_OPND_Ft);
526 if (inst.operands[0].type == AARCH64_OPND_Ft)
530 if (inst.operands[1].addr.writeback)
535 seen_stack_set =
true;
537 else if (inst.opcode->iclass == testbranch)
542 else if (inst.opcode->iclass == ic_system)
545 = gdbarch_tdep<aarch64_gdbarch_tdep> (
gdbarch);
546 int ra_state_val = 0;
548 if (insn == 0xd503233f
549 || insn == 0xd503237f )
554 else if (insn == 0xd50323bf
555 || insn == 0xd50323ff )
566 " opcode=0x%x (iclass)",
567 core_addr_to_string_nz (start), insn);
571 if (tdep->
has_pauth () && cache !=
nullptr)
581 core_addr_to_string_nz (start), insn);
632 CORE_ADDR start, CORE_ADDR limit,
635 instruction_reader reader;
647class instruction_reader_test :
public abstract_instruction_reader
650 template<
size_t SIZE>
651 explicit instruction_reader_test (
const uint32_t (&insns)[
SIZE])
652 : m_insns (insns), m_insns_size (
SIZE)
655 ULONGEST
read (CORE_ADDR memaddr,
int len,
enum bfd_endian byte_order)
658 SELF_CHECK (len == 4);
659 SELF_CHECK (memaddr % 4 == 0);
660 SELF_CHECK (memaddr / 4 < m_insns_size);
662 return m_insns[memaddr / 4];
666 const uint32_t *m_insns;
671aarch64_analyze_prologue_test (
void)
675 info.bfd_arch_info = bfd_scan_arch (
"aarch64");
687 static const uint32_t insns[] = {
692 instruction_reader_test reader (insns);
695 SELF_CHECK (end == 4 * 2);
698 SELF_CHECK (cache.framesize == 272);
703 SELF_CHECK (cache.saved_regs[i].addr () == -272);
705 SELF_CHECK (cache.saved_regs[i].addr () == -264);
707 SELF_CHECK (cache.saved_regs[i].is_realreg ()
708 && cache.saved_regs[i].realreg () == i);
716 SELF_CHECK (cache.saved_regs[
regnum].is_realreg ()
724 static const uint32_t insns[] = {
732 instruction_reader_test reader (insns);
737 SELF_CHECK (end == 4 * 5);
740 SELF_CHECK (cache.framesize == 48);
745 SELF_CHECK (cache.saved_regs[i].addr () == -16);
747 SELF_CHECK (cache.saved_regs[i].addr () == -48);
749 SELF_CHECK (cache.saved_regs[i].is_realreg ()
750 && cache.saved_regs[i].realreg () == i);
760 SELF_CHECK (cache.saved_regs[
regnum].addr () == -24);
762 SELF_CHECK (cache.saved_regs[
regnum].is_realreg ()
769 static const uint32_t insns[] = {
777 instruction_reader_test reader (insns);
783 SELF_CHECK (end == (4 - 1) * 4);
785 SELF_CHECK (cache.framesize == 16);
791 static const uint32_t insns[] = {
800 instruction_reader_test reader (insns);
806 SELF_CHECK (end == (5 - 1) * 4);
808 SELF_CHECK (cache.framesize == 64);
814 static const uint32_t insns[] = {
823 instruction_reader_test reader (insns);
829 SELF_CHECK (end == (5 - 1) * 4);
831 SELF_CHECK (cache.framesize == 64);
837 static const uint32_t insns[] = {
846 instruction_reader_test reader (insns);
852 SELF_CHECK (end == (5 - 1) * 4);
854 SELF_CHECK (cache.framesize == 64);
860 static const uint32_t insns[] = {
867 instruction_reader_test reader (insns);
873 SELF_CHECK (end == (4 - 1) * 4);
875 SELF_CHECK (cache.framesize == 16);
881 static const uint32_t insns[] = {
888 instruction_reader_test reader (insns);
894 SELF_CHECK (end == 4 * 4);
896 SELF_CHECK (cache.framesize == 48);
901 SELF_CHECK (cache.saved_regs[i].addr () == -20);
903 SELF_CHECK (cache.saved_regs[i].addr () == -48);
905 SELF_CHECK (cache.saved_regs[i].addr () == -40);
907 SELF_CHECK (cache.saved_regs[i].is_realreg ()
908 && cache.saved_regs[i].realreg () == i);
914 SELF_CHECK (cache.saved_regs[
regnum].is_value ());
920 static const uint32_t insns[] = {
927 instruction_reader_test reader (insns);
933 SELF_CHECK (end == 4 * 4);
935 SELF_CHECK (cache.framesize == 48);
940 SELF_CHECK (cache.saved_regs[i].addr () == -20);
942 SELF_CHECK (cache.saved_regs[i].addr () == -48);
944 SELF_CHECK (cache.saved_regs[i].addr () == -40);
946 SELF_CHECK (cache.saved_regs[i].is_realreg ()
947 && cache.saved_regs[i].realreg () == i);
959 CORE_ADDR func_addr, func_end_addr, limit_pc;
969 CORE_ADDR post_prologue_pc
972 if (post_prologue_pc != 0)
973 return std::max (pc, post_prologue_pc);
988 = func_end_addr == 0 ? limit_pc : std::min (limit_pc, func_end_addr - 4);
1002 CORE_ADDR prologue_start;
1003 CORE_ADDR prologue_end;
1021 prologue_end = prev_pc;
1023 else if (sal.
end < prologue_end)
1026 prologue_end = sal.
end;
1029 prologue_end = std::min (prologue_end, prev_pc);
1034 CORE_ADDR frame_loc;
1055 CORE_ADDR unwound_fp;
1064 if (unwound_fp == 0)
1094 if (*this_cache != NULL)
1099 *this_cache = cache;
1105 catch (
const gdb_exception_error &ex)
1107 if (ex.error != NOT_AVAILABLE_ERROR)
1124 return UNWIND_UNAVAILABLE;
1130 return UNWIND_OUTERMOST;
1134 return UNWIND_OUTERMOST;
1136 return UNWIND_NO_REASON;
1144 void **this_cache,
struct frame_id *this_id)
1157static struct value *
1159 void **this_cache,
int prev_regnum)
1172 = gdbarch_tdep<aarch64_gdbarch_tdep> (
gdbarch);
1228 if (*this_cache != NULL)
1233 *this_cache = cache;
1242 catch (
const gdb_exception_error &ex)
1244 if (ex.error != NOT_AVAILABLE_ERROR)
1261 return UNWIND_UNAVAILABLE;
1263 return UNWIND_NO_REASON;
1270 void **this_cache,
struct frame_id *this_id)
1286 void **this_prologue_cache)
1288 CORE_ADDR addr_in_block;
1336static struct value *
1338 void **this_cache,
int regnum)
1352 internal_error (_(
"Unexpected register %d"),
regnum);
1388 reg->loc.exp.len = 1;
1409 if (op == DW_CFA_AARCH64_negate_ra_state)
1445 const uint32_t insn_len = 4;
1446 gdb_byte target_mem[4];
1451 scoped_restore restore_memory
1513 struct type **fundamental_type)
1515 if (
type ==
nullptr)
1521 case TYPE_CODE_DECFLOAT:
1525 if (*fundamental_type ==
nullptr)
1526 *fundamental_type =
type;
1527 else if (
type->
length () != (*fundamental_type)->length ()
1528 ||
type->
code () != (*fundamental_type)->code ())
1533 case TYPE_CODE_COMPLEX:
1539 if (*fundamental_type ==
nullptr)
1548 case TYPE_CODE_ARRAY:
1555 if (*fundamental_type ==
nullptr)
1556 *fundamental_type =
type;
1557 else if (
type->
length () != (*fundamental_type)->length ()
1558 ||
type->
code () != (*fundamental_type)->code ())
1577 case TYPE_CODE_STRUCT:
1578 case TYPE_CODE_UNION:
1591 (member, fundamental_type);
1592 if (sub_count == -1)
1599 int ftype_length = (*fundamental_type ==
nullptr)
1600 ? 0 : (*fundamental_type)->length ();
1634 struct type **fundamental_type)
1636 if (
type ==
nullptr)
1639 *fundamental_type =
nullptr;
1672 std::vector<stack_item_t>
si;
1687 const bfd_byte *buf = arg->
contents ().data ();
1699 if (byte_order == BFD_ENDIAN_BIG
1701 && (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION))
1724 int len,
const bfd_byte *buf)
1731 gdb_assert (len <=
sizeof (reg));
1736 memset (reg, 0,
sizeof (reg));
1739 memcpy (reg, buf, len);
1757 const bfd_byte *buf = arg->
contents ().data ();
1768 align = align_up (align, 8);
1779 info->si.push_back (item);
1782 if (info->nsaa & (align - 1))
1785 int pad = align - (info->nsaa & (align - 1));
1790 info->si.push_back (item);
1808 if (info->ngrn + nregs <= 8)
1811 info->ngrn += nregs;
1829 switch (arg_type->
code ())
1832 case TYPE_CODE_DECFLOAT:
1837 case TYPE_CODE_COMPLEX:
1839 const bfd_byte *buf = arg->
contents ().data ();
1850 case TYPE_CODE_ARRAY:
1856 case TYPE_CODE_STRUCT:
1857 case TYPE_CODE_UNION:
1858 for (
int i = 0; i < arg_type->
num_fields (); i++)
1884 struct value **args, CORE_ADDR sp,
1886 CORE_ADDR struct_addr)
1936 struct value *arg = args[argnum];
1937 struct type *arg_type, *fundamental_type;
1941 len = arg_type->
length ();
1948 if (info.nsrn + elements <= 8)
1954 gdb_assert_not_reached (
"Failed to push args");
1964 switch (arg_type->
code ())
1967 case TYPE_CODE_BOOL:
1968 case TYPE_CODE_CHAR:
1969 case TYPE_CODE_RANGE:
1970 case TYPE_CODE_ENUM:
1983 case TYPE_CODE_STRUCT:
1984 case TYPE_CODE_ARRAY:
1985 case TYPE_CODE_UNION:
1992 sp = align_down (sp - len, 16);
2015 sp -= 16 - (info.nsaa & 15);
2017 while (!info.si.empty ())
2022 if (si.
data != NULL)
2024 info.si.pop_back ();
2039 return sp & ~(CORE_ADDR) 15;
2197 gdb_assert (tdep->
has_sme ());
2198 gdb_assert (tdep->
sme_svq > 0);
2203 && regnum < tdep->sme_tile_slice_pseudo_base
2219 gdb_assert (tdep->
has_sme ());
2220 gdb_assert (tdep->
sme_svq > 0);
2234 size_t qualifier = offset / (tdep->
sme_svq * 32);
2239 int dts = offset % (tdep->
sme_svq * 32);
2249 encoding.
tile_index = (dts >> 1) & ((1 << qualifier) - 1);
2279 gdb_assert (tdep->
has_sme ());
2280 gdb_assert (tdep->
sme_svq > 0);
2319 error (_(
"Invalid qualifier index %s for tile slice pseudo register."),
2323 gdb_assert_not_reached (
"Unknown qualifier for ZA tile slice register");
2334 gdb_assert (tdep->
has_sme ());
2335 gdb_assert (tdep->
sme_svq > 0);
2339 struct type *inner_vectors_type;
2390 error (_(
"Invalid qualifier index %s for ZA tile pseudo register."),
2394 gdb_assert_not_reached (
"unknown qualifier for tile pseudo-register");
2513 info->symbols = NULL;
2535 struct type *fundamental_type;
2540 int len = fundamental_type->
length ();
2542 for (
int i = 0; i < elements; i++)
2547 gdb_assert (len <=
sizeof (buf));
2550 (
"read HFA or HVA return value element %d from %s",
2555 memcpy (valbuf, buf, len);
2559 else if (
type->
code () == TYPE_CODE_INT
2564 ||
type->
code () == TYPE_CODE_ENUM)
2614 struct type *fundamental_type;
2644 const gdb_byte *valbuf)
2649 struct type *fundamental_type;
2654 int len = fundamental_type->
length ();
2656 for (
int i = 0; i < elements; i++)
2661 gdb_assert (len <=
sizeof (tmpbuf));
2664 (
"write HFA or HVA return value element %d to %s",
2672 memcpy (tmpbuf, valbuf,
2678 else if (
type->
code () == TYPE_CODE_INT
2683 ||
type->
code () == TYPE_CODE_ENUM)
2722 memcpy (tmpbuf, valbuf,
2736 struct value **read_value,
const gdb_byte *writebuf)
2738 if (valtype->
code () == TYPE_CODE_STRUCT
2739 || valtype->
code () == TYPE_CODE_UNION
2740 || valtype->
code () == TYPE_CODE_ARRAY)
2753 if (read_value !=
nullptr)
2771 aarch64_extract_return_value (valtype,
regcache,
2772 (*read_value)->contents_raw ().data ());
2846static const std::string
2856 const char orientation = encoding.
horizontal ?
'h' :
'v';
2858 const char qualifiers[6] =
"bhsdq";
2860 return string_printf (
"za%d%c%c%d", encoding.
tile_index, orientation,
2866static const std::string
2875 const char qualifiers[6] =
"bhsdq";
2877 return (string_printf (
"za%d%c", encoding.
tile_index, qualifier));
2904 static const char *
const w_name[] =
2906 "w0",
"w1",
"w2",
"w3",
2907 "w4",
"w5",
"w6",
"w7",
2908 "w8",
"w9",
"w10",
"w11",
2909 "w12",
"w13",
"w14",
"w15",
2910 "w16",
"w17",
"w18",
"w19",
2911 "w20",
"w21",
"w22",
"w23",
2912 "w24",
"w25",
"w26",
"w27",
2913 "w28",
"w29",
"w30",
2916 static const char *
const q_name[] =
2918 "q0",
"q1",
"q2",
"q3",
2919 "q4",
"q5",
"q6",
"q7",
2920 "q8",
"q9",
"q10",
"q11",
2921 "q12",
"q13",
"q14",
"q15",
2922 "q16",
"q17",
"q18",
"q19",
2923 "q20",
"q21",
"q22",
"q23",
2924 "q24",
"q25",
"q26",
"q27",
2925 "q28",
"q29",
"q30",
"q31",
2928 static const char *
const d_name[] =
2930 "d0",
"d1",
"d2",
"d3",
2931 "d4",
"d5",
"d6",
"d7",
2932 "d8",
"d9",
"d10",
"d11",
2933 "d12",
"d13",
"d14",
"d15",
2934 "d16",
"d17",
"d18",
"d19",
2935 "d20",
"d21",
"d22",
"d23",
2936 "d24",
"d25",
"d26",
"d27",
2937 "d28",
"d29",
"d30",
"d31",
2940 static const char *
const s_name[] =
2942 "s0",
"s1",
"s2",
"s3",
2943 "s4",
"s5",
"s6",
"s7",
2944 "s8",
"s9",
"s10",
"s11",
2945 "s12",
"s13",
"s14",
"s15",
2946 "s16",
"s17",
"s18",
"s19",
2947 "s20",
"s21",
"s22",
"s23",
2948 "s24",
"s25",
"s26",
"s27",
2949 "s28",
"s29",
"s30",
"s31",
2952 static const char *
const h_name[] =
2954 "h0",
"h1",
"h2",
"h3",
2955 "h4",
"h5",
"h6",
"h7",
2956 "h8",
"h9",
"h10",
"h11",
2957 "h12",
"h13",
"h14",
"h15",
2958 "h16",
"h17",
"h18",
"h19",
2959 "h20",
"h21",
"h22",
"h23",
2960 "h24",
"h25",
"h26",
"h27",
2961 "h28",
"h29",
"h30",
"h31",
2964 static const char *
const b_name[] =
2966 "b0",
"b1",
"b2",
"b3",
2967 "b4",
"b5",
"b6",
"b7",
2968 "b8",
"b9",
"b10",
"b11",
2969 "b12",
"b13",
"b14",
"b15",
2970 "b16",
"b17",
"b18",
"b19",
2971 "b20",
"b21",
"b22",
"b23",
2972 "b24",
"b25",
"b26",
"b27",
2973 "b28",
"b29",
"b30",
"b31",
2999 static const char *
const sve_v_name[] =
3001 "v0",
"v1",
"v2",
"v3",
3002 "v4",
"v5",
"v6",
"v7",
3003 "v8",
"v9",
"v10",
"v11",
3004 "v12",
"v13",
"v14",
"v15",
3005 "v16",
"v17",
"v18",
"v19",
3006 "v20",
"v21",
"v22",
"v23",
3007 "v24",
"v25",
"v26",
"v27",
3008 "v28",
"v29",
"v30",
"v31",
3025 internal_error (_(
"aarch64_pseudo_register_name: bad register number %d"),
3067 internal_error (_(
"aarch64_pseudo_register_type: bad register number %d"),
3107static struct value *
3110 int regsize,
struct value *result_value)
3122 memcpy (result_value->
contents_raw ().data (), reg_buf, regsize);
3124 return result_value;
3137 gdb_assert (tdep->
has_sme ());
3138 gdb_assert (tdep->
sme_svq > 0);
3208static struct value *
3211 struct value *result)
3215 gdb_assert (tdep->
has_sme ());
3216 gdb_assert (tdep->
sme_svq > 0);
3227 gdb::byte_vector za (std::pow (svl, 2));
3233 const gdb_byte *source
3235 gdb_byte *destination
3238 memcpy (destination, source, offsets.
chunk_size);
3245static struct value *
3261 if (byte_order == BFD_ENDIAN_BIG)
3272 memcpy (result_value->
contents_raw ().data (), data, 4);
3274 return result_value;
3313 gdb_assert_not_reached (
"regnum out of bound");
3320 int regnum_offset,
int regsize,
const gdb_byte *buf)
3334 memcpy (reg_buf, buf, regsize);
3344 int regnum,
const gdb_byte *data)
3348 gdb_assert (tdep->
has_sme ());
3349 gdb_assert (tdep->
sme_svq > 0);
3360 gdb::byte_vector za (std::pow (svl, 2));
3366 gdb_byte *destination
3369 memcpy (destination, source, offsets.
chunk_size);
3380 int regnum,
const gdb_byte *buf)
3390 if (byte_order == BFD_ENDIAN_BIG)
3442 gdb_assert_not_reached (
"regnum out of bound");
3447static struct value *
3450 const int *reg_p = (
const int *) baton;
3459static std::vector<CORE_ADDR>
3464 const int insn_size = 4;
3465 const int atomic_sequence_length = 16;
3467 CORE_ADDR breaks[2] = { CORE_ADDR_MAX, CORE_ADDR_MAX };
3469 CORE_ADDR closing_insn = 0;
3471 ULONGEST insn_from_memory;
3473 byte_order_for_code,
3481 uint32_t insn = insn_from_memory;
3484 int bc_insn_count = 0;
3485 int last_breakpoint = 0;
3488 if (aarch64_decode_insn (insn, &inst, 1, NULL) != 0)
3492 if (inst.opcode->iclass != ldstexcl ||
bit (insn, 22) == 0)
3495 for (insn_count = 0; insn_count < atomic_sequence_length; ++insn_count)
3500 byte_order_for_code,
3508 insn = insn_from_memory;
3509 if (aarch64_decode_insn (insn, &inst, 1, NULL) != 0)
3512 if (inst.opcode->iclass == condbranch)
3514 gdb_assert (inst.operands[0].type == AARCH64_OPND_ADDR_PCREL19);
3516 if (bc_insn_count >= 1)
3520 breaks[1] =
loc + inst.operands[0].imm.value;
3527 if (inst.opcode->iclass == ldstexcl &&
bit (insn, 22) == 0)
3539 breaks[0] =
loc + insn_size;
3544 && (breaks[1] == breaks[0]
3545 || (breaks[1] >= pc && breaks[1] <= closing_insn)))
3546 last_breakpoint = 0;
3548 std::vector<CORE_ADDR> next_pcs;
3552 for (index = 0; index <= last_breakpoint; index++)
3553 next_pcs.push_back (breaks[index]);
3596 int64_t new_offset = data->insn_addr - dsd->
new_addr + offset;
3618 data->insn_addr + 4);
3663 const unsigned rn,
int is64,
3687 const unsigned rt,
unsigned bit,
3718 CORE_ADDR address = data->insn_addr + offset;
3739 const unsigned rt,
const int is64,
3744 CORE_ADDR address = data->insn_addr + offset;
3770 if (masked_insn ==
BLR)
3776 data->insn_addr + 4);
3782 if (masked_insn ==
RET || masked_insn ==
BR || masked_insn ==
BLR)
3803 CORE_ADDR from, CORE_ADDR to,
3809 ULONGEST insn_from_memory;
3815 uint32_t insn = insn_from_memory;
3817 if (aarch64_decode_insn (insn, &inst, 1, NULL) != 0)
3821 if (inst.opcode->iclass == ldstexcl &&
bit (insn, 22))
3827 std::unique_ptr<aarch64_displaced_step_copy_insn_closure>
dsc
3868 CORE_ADDR from, CORE_ADDR to,
3877 pc = from + (pc - to);
3897 else if (pc - to == 4)
3903 gdb_assert_not_reached (
"Unexpected PC value after displaced stepping");
3953 error (_(
"VQ is %" PRIu64
", maximum supported value is %d"), features.
vq,
3972 const struct tdesc_feature *feature_sve;
3979 if (feature_sve ==
nullptr)
3994 const struct tdesc_feature *feature_sme;
4001 if (feature_sme ==
nullptr)
4008 size_t svl = std::sqrt (svl_squared / 8);
4021 if (tdesc ==
nullptr)
4030 if (!features.
pauth)
4037 const struct tdesc_feature *tls_feature
4040 if (tls_feature !=
nullptr)
4078 CORE_ADDR func_start, func_end;
4084 ULONGEST insn_from_memory;
4089 uint32_t insn = insn_from_memory;
4092 if (aarch64_decode_insn (insn, &inst, 1,
nullptr) != 0)
4095 return streq (inst.opcode->name,
"ret");
4136 = gdbarch_tdep<aarch64_gdbarch_tdep> (regs->
arch ());
4141 CORE_ADDR cmask, dmask;
4160 if (regs->
cooked_read (dmask_regnum, &dmask) != REG_VALID)
4163 if (regs->
cooked_read (cmask_regnum, &cmask) != REG_VALID)
4179 std::vector<std::string> &names)
4183 gdb_assert (tdep->
has_sme ());
4213 const struct tdesc_feature *feature_core, *feature_fpu, *feature_sve;
4214 const struct tdesc_feature *feature_pauth;
4215 bool valid_p =
true;
4216 int i, num_regs = 0, num_pseudo_regs = 0;
4217 int first_pauth_regnum = -1, ra_sign_state_offset = -1;
4218 int first_mte_regnum = -1, first_tls_regnum = -1;
4223 internal_error (_(
"VQ out of bounds: %s (max %d)"),
4227 internal_error (_(
"Streaming vector quotient (svq) out of bounds: %s"
4233 best_arch !=
nullptr;
4237 = gdbarch_tdep<aarch64_gdbarch_tdep> (best_arch->gdbarch);
4238 if (tdep && tdep->
vq == vq && tdep->
sme_svq == svq)
4239 return best_arch->gdbarch;
4244 const struct target_desc *tdesc = info.target_desc;
4258 const struct tdesc_feature *feature_mte
4260 const struct tdesc_feature *feature_tls
4263 if (feature_core ==
nullptr)
4278 if (feature_fpu !=
nullptr)
4280 if (feature_sve !=
nullptr)
4281 error (_(
"Program contains both fpu and SVE features."));
4294 if (feature_sve !=
nullptr)
4304 num_pseudo_regs += 32;
4307 if (feature_fpu !=
nullptr || feature_sve !=
nullptr)
4309 num_pseudo_regs += 32;
4310 num_pseudo_regs += 32;
4311 num_pseudo_regs += 32;
4312 num_pseudo_regs += 32;
4313 num_pseudo_regs += 32;
4316 int first_sme_regnum = -1;
4317 int first_sme2_regnum = -1;
4318 int first_sme_pseudo_regnum = -1;
4319 const struct tdesc_feature *feature_sme
4321 if (feature_sme !=
nullptr)
4324 first_sme_regnum = num_regs;
4330 num_regs++,
"svcr");
4336 first_sme_pseudo_regnum = num_pseudo_regs;
4340 num_pseudo_regs += (svq << 5) * 5;
4347 const struct tdesc_feature *feature_sme2
4349 if (feature_sme2 !=
nullptr)
4352 first_sme2_regnum = num_regs;
4360 int tls_register_count = 0;
4361 if (feature_tls !=
nullptr)
4363 first_tls_regnum = num_regs;
4369 first_tls_regnum,
"tpidr");
4373 tls_register_count++;
4377 first_tls_regnum + tls_register_count,
4382 tls_register_count++;
4384 num_regs += tls_register_count;
4388 warning (_(
"Provided TLS register feature doesn't contain "
4389 "required tpidr register."));
4398 if (feature_pauth ==
nullptr)
4402 int pauth_masks = 0;
4403 if (feature_pauth != NULL)
4405 first_pauth_regnum = num_regs;
4406 ra_sign_state_offset = num_pseudo_regs;
4414 "pauth_dmask_high") == 0)
4423 for (i = 0; i < set_size; i++)
4425 first_pauth_regnum + i,
4429 num_pseudo_regs += 1;
4430 pauth_masks = set_size;
4434 if (feature_mte != NULL)
4436 first_mte_regnum = num_regs;
4441 first_mte_regnum + i,
4447 int first_w_regnum = num_pseudo_regs;
4448 num_pseudo_regs += 31;
4454 info.byte_order_for_code = BFD_ENDIAN_LITTLE;
4494 aarch64_breakpoint::kind_from_pc);
4496 aarch64_breakpoint::bp_from_kind);
4546 info.target_desc = tdesc;
4569 if (tdep->
jb_pc >= 0)
4698 gdb_printf (file, _(
"aarch64_dump_tdep: Lowest pc = 0x%s\n"),
4702 gdb_printf (file, _(
"aarch64_dump_tdep: sme_tile_type_q = %s\n"),
4704 gdb_printf (file, _(
"aarch64_dump_tdep: sme_tile_type_d = %s\n"),
4706 gdb_printf (file, _(
"aarch64_dump_tdep: sme_tile_type_s = %s\n"),
4708 gdb_printf (file, _(
"aarch64_dump_tdep: sme_tile_type_h = %s\n"),
4710 gdb_printf (file, _(
"aarch64_dump_tdep: sme_tile_type_n = %s\n"),
4712 gdb_printf (file, _(
"aarch64_dump_tdep: sme_tile_slice_type_q = %s\n"),
4714 gdb_printf (file, _(
"aarch64_dump_tdep: sme_tile_slice_type_d = %s\n"),
4716 gdb_printf (file, _(
"aarch64_dump_tdep: sme_tile_slice_type_s = %s\n"),
4718 gdb_printf (file, _(
"aarch64_dump_tdep: sme_tile_slice_type_h = %s\n"),
4720 gdb_printf (file, _(
"aarch64_dump_tdep: sme_tile_slice_type_b = %s\n"),
4722 gdb_printf (file, _(
"aarch64_dump_tdep: sme_reg_base = %s\n"),
4724 gdb_printf (file, _(
"aarch64_dump_tdep: sme_svg_regnum = %s\n"),
4726 gdb_printf (file, _(
"aarch64_dump_tdep: sme_svcr_regnum = %s\n"),
4728 gdb_printf (file, _(
"aarch64_dump_tdep: sme_za_regnum = %s\n"),
4730 gdb_printf (file, _(
"aarch64_dump_tdep: sme_pseudo_base = %s\n"),
4732 gdb_printf (file, _(
"aarch64_dump_tdep: sme_pseudo_count = %s\n"),
4734 gdb_printf (file, _(
"aarch64_dump_tdep: sme_tile_slice_pseudo_base = %s\n"),
4736 gdb_printf (file, _(
"aarch64_dump_tdep: sme_tile_slice_pseudo_count = %s\n"),
4738 gdb_printf (file, _(
"aarch64_dump_tdep: sme_tile_pseudo_base = %s\n"),
4740 gdb_printf (file, _(
"aarch64_dump_tdep: sme_svq = %s\n"),
4747static void aarch64_process_record_test (
void);
4760Set AArch64 debugging."), _(
"\
4761Show AArch64 debugging."), _(
"\
4762When on, AArch64 specific debugging is enabled."),
4768 selftests::register_test (
"aarch64-analyze-prologue",
4769 selftests::aarch64_analyze_prologue_test);
4770 selftests::register_test (
"aarch64-process-record",
4771 selftests::aarch64_process_record_test);
4777#define REG_ALLOC(REGS, LENGTH, RECORD_BUF) \
4780 unsigned int reg_len = LENGTH; \
4783 REGS = XNEWVEC (uint32_t, reg_len); \
4784 memcpy(®S[0], &RECORD_BUF[0], sizeof(uint32_t)*LENGTH); \
4789#define MEM_ALLOC(MEMS, LENGTH, RECORD_BUF) \
4792 unsigned int mem_len = LENGTH; \
4795 MEMS = XNEWVEC (struct aarch64_mem_r, mem_len); \
4796 memcpy(MEMS, &RECORD_BUF[0], \
4797 sizeof(struct aarch64_mem_r) * LENGTH); \
4834 uint8_t reg_rd, insn_bits24_27, insn_bits21_23;
4835 uint32_t record_buf[4];
4846 if (insn_bits24_27 == 0x0a)
4849 else if (insn_bits24_27 == 0x0b)
4854 record_buf[0] = reg_rd;
4861 if (insn_bits24_27 == 0x0b)
4864 record_buf[0] = reg_rd;
4867 else if (insn_bits24_27 == 0x0a)
4869 if (insn_bits21_23 == 0x00)
4872 record_buf[0] = reg_rd;
4880 else if (insn_bits21_23 == 0x02)
4887 else if (insn_bits21_23 == 0x04 || insn_bits21_23 == 0x06)
4892 record_buf[0] = reg_rd;
4910 uint8_t reg_rd, insn_bit23, insn_bits24_27, setflags;
4911 uint32_t record_buf[4];
4917 if (insn_bits24_27 == 0x00
4918 || insn_bits24_27 == 0x03
4919 || (insn_bits24_27 == 0x02 && insn_bit23))
4921 record_buf[0] = reg_rd;
4924 else if (insn_bits24_27 == 0x01)
4928 record_buf[0] = reg_rd;
4933 else if (insn_bits24_27 == 0x02 && !insn_bit23)
4937 record_buf[0] = reg_rd;
4957 = gdbarch_tdep<aarch64_gdbarch_tdep> (aarch64_insn_r->
gdbarch);
4958 uint8_t insn_bits24_27, insn_bits28_31, insn_bits22_23;
4959 uint32_t record_buf[4];
4965 if (insn_bits28_31 == 0x0d)
4968 if (insn_bits24_27 == 0x04)
4974 ULONGEST svc_number;
4985 else if (insn_bits24_27 == 0x05 && insn_bits22_23 == 0x00)
4987 uint32_t reg_rt, reg_crn;
4995 record_buf[0] = reg_rt;
4999 else if (reg_crn == 0x02 || reg_crn == 0x04)
5006 else if((insn_bits24_27 & 0x0e) == 0x06)
5016 else if ((insn_bits28_31 & 0x07) == 0x01 && (insn_bits24_27 & 0x0c) == 0x04)
5038 uint64_t addr_offset = 0;
5039 uint32_t record_buf[24];
5040 uint64_t record_buf_mem[24];
5041 uint32_t reg_rn, reg_rt;
5042 uint32_t reg_index = 0, mem_index = 0;
5043 uint8_t opcode_bits, size_bits;
5052 debug_printf (
"Process record: Advanced SIMD load/store\n");
5057 uint8_t sindex, scale, selem, esize, replicate = 0;
5058 scale = opcode_bits >> 2;
5059 selem = ((opcode_bits & 0x02) |
5064 if (size_bits & 0x01)
5068 if ((size_bits >> 1) & 0x01)
5070 if (size_bits & 0x01)
5072 if (!((opcode_bits >> 1) & 0x01))
5092 for (sindex = 0; sindex < selem; sindex++)
5095 reg_rt = (reg_rt + 1) % 32;
5099 for (sindex = 0; sindex < selem; sindex++)
5105 record_buf_mem[mem_index++] = esize / 8;
5106 record_buf_mem[mem_index++] = address + addr_offset;
5108 addr_offset = addr_offset + (esize / 8);
5109 reg_rt = (reg_rt + 1) % 32;
5116 uint8_t selem, esize, rpt, elements;
5117 uint8_t eindex, rindex;
5119 esize = 8 << size_bits;
5121 elements = 128 / esize;
5123 elements = 64 / esize;
5125 switch (opcode_bits)
5166 for (rindex = 0; rindex < rpt; rindex++)
5167 for (eindex = 0; eindex < elements; eindex++)
5169 uint8_t reg_tt, sindex;
5170 reg_tt = (reg_rt + rindex) % 32;
5171 for (sindex = 0; sindex < selem; sindex++)
5177 record_buf_mem[mem_index++] = esize / 8;
5178 record_buf_mem[mem_index++] = address + addr_offset;
5180 addr_offset = addr_offset + (esize / 8);
5181 reg_tt = (reg_tt + 1) % 32;
5187 record_buf[reg_index++] = reg_rn;
5203 uint8_t insn_bits24_27, insn_bits28_29, insn_bits10_11;
5204 uint8_t insn_bit23, insn_bit21;
5205 uint8_t opc, size_bits, ld_flag, vector_flag;
5206 uint32_t reg_rn, reg_rt, reg_rt2;
5207 uint64_t datasize, offset;
5208 uint32_t record_buf[8];
5209 uint64_t record_buf_mem[8];
5225 if (insn_bits24_27 == 0x08 && insn_bits28_29 == 0x00)
5228 debug_printf (
"Process record: load/store exclusive\n");
5232 record_buf[0] = reg_rt;
5236 record_buf[1] = reg_rt2;
5243 datasize = (8 << size_bits) * 2;
5245 datasize = (8 << size_bits);
5248 record_buf_mem[0] = datasize / 8;
5249 record_buf_mem[1] = address;
5260 else if ((insn_bits24_27 & 0x0b) == 0x08 && insn_bits28_29 == 0x01)
5263 debug_printf (
"Process record: load register (literal)\n");
5267 record_buf[0] = reg_rt;
5271 else if ((insn_bits24_27 & 0x0a) == 0x08 && insn_bits28_29 == 0x02)
5274 debug_printf (
"Process record: load/store pair\n");
5285 record_buf[0] = reg_rt;
5286 record_buf[1] = reg_rt2;
5295 size_bits = size_bits >> 1;
5296 datasize = 8 << (2 + size_bits);
5297 offset = (imm7_off & 0x40) ? (~imm7_off & 0x007f) + 1 : imm7_off;
5298 offset = offset << (2 + size_bits);
5301 if (!((insn_bits24_27 & 0x0b) == 0x08 && insn_bit23))
5303 if (imm7_off & 0x40)
5304 address = address - offset;
5306 address = address + offset;
5309 record_buf_mem[0] = datasize / 8;
5310 record_buf_mem[1] = address;
5311 record_buf_mem[2] = datasize / 8;
5312 record_buf_mem[3] = address + (datasize / 8);
5319 else if ((insn_bits24_27 & 0x0b) == 0x09 && insn_bits28_29 == 0x03)
5331 if (size_bits == 0x3 && vector_flag == 0x0 && opc == 0x2)
5336 else if (size_bits == 0x2 && vector_flag == 0x0 && opc == 0x2)
5352 debug_printf (
"Process record: load/store (unsigned immediate):"
5353 " size %x V %d opc %x\n", size_bits, vector_flag,
5360 datasize = 8 << size_bits;
5363 offset = offset << size_bits;
5364 address = address + offset;
5366 record_buf_mem[0] = datasize >> 3;
5367 record_buf_mem[1] = address;
5375 record_buf[0] = reg_rt;
5380 else if ((insn_bits24_27 & 0x0b) == 0x08 && insn_bits28_29 == 0x03
5381 && insn_bits10_11 == 0x02 && insn_bit21)
5384 debug_printf (
"Process record: load/store (register offset)\n");
5392 if (size_bits != 0x03)
5399 ULONGEST reg_rm_val;
5404 offset = reg_rm_val << size_bits;
5406 offset = reg_rm_val;
5407 datasize = 8 << size_bits;
5410 address = address + offset;
5411 record_buf_mem[0] = datasize >> 3;
5412 record_buf_mem[1] = address;
5420 record_buf[0] = reg_rt;
5425 else if ((insn_bits24_27 & 0x0b) == 0x08 && insn_bits28_29 == 0x03
5430 debug_printf (
"Process record: load/store "
5431 "(immediate and unprivileged)\n");
5440 if (size_bits != 0x03)
5449 offset = (imm9_off & 0x0100) ? (((~imm9_off) & 0x01ff) + 1) : imm9_off;
5450 datasize = 8 << size_bits;
5453 if (insn_bits10_11 != 0x01)
5455 if (imm9_off & 0x0100)
5456 address = address - offset;
5458 address = address + offset;
5460 record_buf_mem[0] = datasize >> 3;
5461 record_buf_mem[1] = address;
5469 record_buf[0] = reg_rt;
5472 if (insn_bits10_11 == 0x01 || insn_bits10_11 == 0x03)
5491 uint8_t insn_bit21, opcode, rmode, reg_rd;
5492 uint8_t insn_bits24_27, insn_bits28_31, insn_bits10_11, insn_bits12_15;
5493 uint8_t insn_bits11_14;
5494 uint32_t record_buf[2];
5507 debug_printf (
"Process record: data processing SIMD/FP: ");
5509 if ((insn_bits28_31 & 0x05) == 0x01 && insn_bits24_27 == 0x0e)
5515 debug_printf (
"FP - fixed point conversion");
5517 if ((opcode >> 1) == 0x0 && rmode == 0x03)
5518 record_buf[0] = reg_rd;
5523 else if (insn_bits10_11 == 0x01)
5526 debug_printf (
"FP - conditional compare");
5532 else if (insn_bits10_11 == 0x02 || insn_bits10_11 == 0x03)
5535 debug_printf (
"FP - DP (2-source)");
5539 else if (insn_bits10_11 == 0x00)
5542 if ((insn_bits12_15 & 0x01) == 0x01
5543 || (insn_bits12_15 & 0x07) == 0x04)
5546 debug_printf (
"FP - immediate");
5550 else if ((insn_bits12_15 & 0x03) == 0x02)
5553 debug_printf (
"FP - immediate");
5557 else if (insn_bits12_15 == 0x00)
5560 if (!(opcode >> 1) || ((opcode >> 1) == 0x02 && !rmode))
5563 debug_printf (
"float to int conversion");
5568 else if ((opcode >> 1) == 0x01 && !rmode)
5571 debug_printf (
"int to float conversion");
5576 else if ((opcode >> 1) == 0x03)
5579 debug_printf (
"move float to int");
5581 if (!(opcode & 0x01))
5595 else if ((insn_bits28_31 & 0x09) == 0x00 && insn_bits24_27 == 0x0e)
5598 debug_printf (
"SIMD copy");
5605 if (insn_bits11_14 == 0x05 || insn_bits11_14 == 0x07)
5617 debug_printf (
"all remain");
5623 debug_printf (
"\n");
5644 uint32_t ins_bit25, ins_bit26, ins_bit27, ins_bit28;
5652 if (!ins_bit26 && !ins_bit27 && ins_bit28)
5656 if (ins_bit26 && !ins_bit27 && ins_bit28)
5660 if (!ins_bit25 && ins_bit27)
5664 if (ins_bit25 && !ins_bit26 && ins_bit27)
5668 if (ins_bit25 && ins_bit26 && ins_bit27)
5679 xfree (record->aarch64_regs);
5680 xfree (record->aarch64_mems);
5687aarch64_process_record_test (
void)
5692 info.bfd_arch_info = bfd_scan_arch (
"aarch64");
5723 CORE_ADDR insn_addr)
5725 uint32_t rec_no = 0;
5726 uint8_t insn_size = 4;
5728 gdb_byte buf[insn_size];
5731 memset (&buf[0], 0, insn_size);
5746 _(
"Process record does not support instruction "
5747 "0x%0x at address %s.\n"),
5762 for (rec_no = 0; rec_no < aarch64_record.
reg_rec_count; rec_no++)
5769 for (rec_no = 0; rec_no < aarch64_record.
mem_rec_count; rec_no++)
int aarch64_emit_insn(uint32_t *buf, uint32_t insn)
void aarch64_relocate_instruction(uint32_t insn, const struct aarch64_insn_visitor *visitor, struct aarch64_insn_data *data)
#define IS_BTI(instruction)
#define emit_b(buf, is_bl, offset)
#define emit_bcond(buf, cond, offset)
#define aarch64_debug_printf(fmt,...)
#define bits(obj, st, fn)
#define can_encode_int32(val, bits)
#define emit_tb(buf, is_tbnz, bit, rt, offset)
#define emit_cb(buf, is_cbnz, rt, offset)
#define emit_ldrsw(buf, rt, rn, operand)
#define emit_ldr(buf, rt, rn, operand)
void register_aarch64_ravenscar_ops(struct gdbarch *gdbarch)
static void aarch64_pseudo_write(struct gdbarch *gdbarch, struct regcache *regcache, int regnum, const gdb_byte *buf)
static const std::string aarch64_za_tile_name(const struct za_pseudo_encoding &encoding)
static struct value * value_of_aarch64_user_reg(frame_info_ptr frame, const void *baton)
static std::unordered_map< aarch64_features, target_desc * > tdesc_aarch64_map
static int aarch64_pseudo_register_reggroup_p(struct gdbarch *gdbarch, int regnum, const struct reggroup *group)
static bool aapcs_is_vfp_call_or_return_candidate(struct type *type, int *count, struct type **fundamental_type)
static void pass_in_x(struct gdbarch *gdbarch, struct regcache *regcache, struct aarch64_call_info *info, struct type *type, struct value *arg)
displaced_step_copy_insn_closure_up aarch64_displaced_step_copy_insn(struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
static void aarch64_za_offsets_from_regnum(struct gdbarch *gdbarch, int regnum, struct za_offsets &offsets)
constexpr gdb_byte aarch64_default_breakpoint[]
static void aarch64_stub_this_id(frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id)
void _initialize_aarch64_tdep()
#define REG_ALLOC(REGS, LENGTH, RECORD_BUF)
static void aarch64_displaced_step_adr(const int32_t offset, const unsigned rd, const int is_adrp, struct aarch64_insn_data *data)
static struct value * aarch64_sme_pseudo_register_read(struct gdbarch *gdbarch, readable_regcache *regcache, int regnum, struct value *result)
static const unsigned char op_lit0
static struct value * aarch64_prologue_prev_register(frame_info_ptr this_frame, void **this_cache, int prev_regnum)
static void aarch64_store_return_value(struct type *type, struct regcache *regs, const gdb_byte *valbuf)
static struct type * aarch64_vnd_type(struct gdbarch *gdbarch)
static int aarch64_gdb_print_insn(bfd_vma memaddr, disassemble_info *info)
static ULONGEST aarch64_type_align(gdbarch *gdbarch, struct type *t)
static unsigned int aarch64_record_data_proc_simd_fp(aarch64_insn_decode_record *aarch64_insn_r)
static constexpr uint32_t BRK_INSN_MASK
static struct type * aarch64_za_tile_slice_type(struct gdbarch *gdbarch, const struct za_pseudo_encoding &encoding)
static void aarch64_displaced_step_cb(const int32_t offset, const int is_cbnz, const unsigned rn, int is64, struct aarch64_insn_data *data)
static struct value * aarch64_pseudo_read_value(struct gdbarch *gdbarch, readable_regcache *regcache, int regnum)
static CORE_ADDR aarch64_analyze_prologue(struct gdbarch *gdbarch, CORE_ADDR start, CORE_ADDR limit, struct aarch64_prologue_cache *cache, abstract_instruction_reader &reader)
static struct type * aarch64_za_tile_type(struct gdbarch *gdbarch, const struct za_pseudo_encoding &encoding)
static void aarch64_displaced_step_b(const int is_bl, const int32_t offset, struct aarch64_insn_data *data)
static int aapcs_is_vfp_call_or_return_candidate_1(struct type *type, struct type **fundamental_type)
static void aarch64_displaced_step_others(const uint32_t insn, struct aarch64_insn_data *data)
static int aarch64_dwarf_reg_to_regnum(struct gdbarch *gdbarch, int reg)
#define MEM_ALLOC(MEMS, LENGTH, RECORD_BUF)
static const struct aarch64_insn_visitor visitor
static void aarch64_scan_prologue(frame_info_ptr this_frame, struct aarch64_prologue_cache *cache)
static void pass_on_stack(struct aarch64_call_info *info, struct type *type, struct value *arg)
static struct value * aarch64_dwarf2_prev_register(frame_info_ptr this_frame, void **this_cache, int regnum)
static int pass_in_v(struct gdbarch *gdbarch, struct regcache *regcache, struct aarch64_call_info *info, int len, const bfd_byte *buf)
static int aarch64_stack_frame_destroyed_p(struct gdbarch *, CORE_ADDR)
static struct aarch64_prologue_cache * aarch64_make_stub_cache(frame_info_ptr this_frame, void **this_cache)
static enum unwind_stop_reason aarch64_stub_frame_unwind_stop_reason(frame_info_ptr this_frame, void **this_cache)
static unsigned int aarch64_record_load_store(aarch64_insn_decode_record *aarch64_insn_r)
static const char *const aarch64_v_register_names[]
static void aarch64_prologue_this_id(frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id)
static void aarch64_make_prologue_cache_1(frame_info_ptr this_frame, struct aarch64_prologue_cache *cache)
static void aarch64_za_decode_pseudos(struct gdbarch *gdbarch, int regnum, struct za_pseudo_encoding &encoding)
static struct value * aarch64_pseudo_read_value_1(struct gdbarch *gdbarch, readable_regcache *regcache, int regnum_offset, int regsize, struct value *result_value)
static void pass_in_x_or_stack(struct gdbarch *gdbarch, struct regcache *regcache, struct aarch64_call_info *info, struct type *type, struct value *arg)
static unsigned int aarch64_record_data_proc_imm(aarch64_insn_decode_record *aarch64_insn_r)
static uint64_t aarch64_get_tdesc_svq(const struct target_desc *tdesc)
static void show_aarch64_debug(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static int aarch64_stub_unwind_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_prologue_cache)
static struct type * aarch64_vnb_type(struct gdbarch *gdbarch)
static CORE_ADDR aarch64_frame_align(struct gdbarch *gdbarch, CORE_ADDR sp)
static std::string aarch64_get_pc_address_flags(frame_info_ptr frame, CORE_ADDR pc)
static uint64_t aarch64_get_tdesc_vq(const struct target_desc *tdesc)
static const char *const aarch64_pauth_register_names[]
static bool pass_in_v_vfp_candidate(struct gdbarch *gdbarch, struct regcache *regcache, struct aarch64_call_info *info, struct type *arg_type, struct value *arg)
static CORE_ADDR aarch64_normal_frame_base(frame_info_ptr this_frame, void **this_cache)
static const char *const aarch64_sve_register_names[]
aarch64_features aarch64_features_from_target_desc(const struct target_desc *tdesc)
static CORE_ADDR aarch64_frame_unmask_lr(aarch64_gdbarch_tdep *tdep, frame_info_ptr this_frame, CORE_ADDR addr)
static enum return_value_convention aarch64_return_value(struct gdbarch *gdbarch, struct value *func_value, struct type *valtype, struct regcache *regcache, struct value **read_value, const gdb_byte *writebuf)
bool aarch64_displaced_step_hw_singlestep(struct gdbarch *gdbarch)
static frame_unwind aarch64_prologue_unwind
static int aarch64_cannot_store_register(struct gdbarch *gdbarch, int regnum)
static void aarch64_dwarf2_frame_init_reg(struct gdbarch *gdbarch, int regnum, struct dwarf2_frame_state_reg *reg, frame_info_ptr this_frame)
static struct aarch64_prologue_cache * aarch64_make_prologue_cache(frame_info_ptr this_frame, void **this_cache)
static struct type * aarch64_vnh_type(struct gdbarch *gdbarch)
static struct type * aarch64_vnq_type(struct gdbarch *gdbarch)
static constexpr uint32_t BRK_INSN_BASE
static void aarch64_displaced_step_tb(const int32_t offset, int is_tbnz, const unsigned rt, unsigned bit, struct aarch64_insn_data *data)
static const char * aarch64_pseudo_register_name(struct gdbarch *gdbarch, int regnum)
static struct type * aarch64_vns_type(struct gdbarch *gdbarch)
const target_desc * aarch64_read_description(const aarch64_features &features)
static void aarch64_dump_tdep(struct gdbarch *gdbarch, struct ui_file *file)
static void deallocate_reg_mem(aarch64_insn_decode_record *record)
static void aarch64_displaced_step_b_cond(const unsigned cond, const int32_t offset, struct aarch64_insn_data *data)
static const unsigned char op_lit1
static void aarch64_initialize_sme_pseudo_names(struct gdbarch *gdbarch, std::vector< std::string > &names)
static bool is_sme_pseudo_register(struct gdbarch *gdbarch, int regnum)
@ AARCH64_RECORD_UNSUPPORTED
static CORE_ADDR aarch64_remove_non_address_bits(struct gdbarch *gdbarch, CORE_ADDR pointer)
static struct gdbarch * aarch64_gdbarch_init(struct gdbarch_info info, struct gdbarch_list *arches)
static bool is_w_pseudo_register(struct gdbarch *gdbarch, int regnum)
static enum unwind_stop_reason aarch64_prologue_frame_unwind_stop_reason(frame_info_ptr this_frame, void **this_cache)
static const char *const aarch64_r_register_names[]
static unsigned int aarch64_record_decode_insn_handler(aarch64_insn_decode_record *aarch64_insn_r)
static unsigned int aarch64_record_data_proc_reg(aarch64_insn_decode_record *aarch64_insn_r)
static unsigned int aarch64_record_asimd_load_store(aarch64_insn_decode_record *aarch64_insn_r)
int aarch64_process_record(struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR insn_addr)
static void aarch64_pseudo_write_1(struct gdbarch *gdbarch, struct regcache *regcache, int regnum_offset, int regsize, const gdb_byte *buf)
static bool is_sme_tile_slice_pseudo_register(struct gdbarch *gdbarch, int regnum)
static CORE_ADDR aarch64_skip_prologue(struct gdbarch *gdbarch, CORE_ADDR pc)
static struct type * aarch64_vnv_type(struct gdbarch *gdbarch)
static void aarch64_displaced_step_ldr_literal(const int32_t offset, const int is_sw, const unsigned rt, const int is64, struct aarch64_insn_data *data)
void aarch64_displaced_step_fixup(struct gdbarch *gdbarch, struct displaced_step_copy_insn_closure *dsc_, CORE_ADDR from, CORE_ADDR to, struct regcache *regs, bool completed_p)
static struct type * aarch64_sme_pseudo_register_type(struct gdbarch *gdbarch, int regnum)
static std::vector< CORE_ADDR > aarch64_software_single_step(struct regcache *regcache)
static bool aarch64_execute_dwarf_cfa_vendor_op(struct gdbarch *gdbarch, gdb_byte op, struct dwarf2_frame_state *fs)
static frame_base aarch64_normal_base
static const std::string aarch64_za_tile_slice_name(const struct za_pseudo_encoding &encoding)
static void aarch64_sme_pseudo_register_write(struct gdbarch *gdbarch, struct regcache *regcache, int regnum, const gdb_byte *data)
static int aarch64_get_longjmp_target(frame_info_ptr frame, CORE_ADDR *pc)
static frame_unwind aarch64_stub_unwind
static unsigned int aarch64_record_branch_except_sys(aarch64_insn_decode_record *aarch64_insn_r)
static bool aarch64_program_breakpoint_here_p(gdbarch *gdbarch, CORE_ADDR address)
static const char *const aarch64_mte_register_names[]
static struct type * aarch64_pseudo_register_type(struct gdbarch *gdbarch, int regnum)
static CORE_ADDR aarch64_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 const struct @0 aarch64_register_aliases[]
static int aarch64_return_in_memory(struct gdbarch *gdbarch, struct type *type)
static void aarch64_gen_return_address(struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
#define AARCH64_DISPLACED_MODIFIED_INSNS
#define AARCH64_DWARF_RA_SIGN_STATE
#define AARCH64_DWARF_SVE_Z0
#define AARCH64_D_REGISTER_COUNT
#define AARCH64_DWARF_SVE_VG
#define AARCH64_DWARF_SVE_FFR
#define AARCH64_X_REGISTER_COUNT
#define AARCH64_DWARF_SVE_P0
CORE_ADDR aarch64_remove_top_bits(CORE_ADDR pointer, CORE_ADDR mask)
target_desc * aarch64_create_target_description(const aarch64_features &features)
CORE_ADDR aarch64_mask_from_pac_registers(const CORE_ADDR cmask, const CORE_ADDR dmask)
#define AARCH64_Q0_REGNUM
#define AARCH64_H0_REGNUM
#define AARCH64_PAUTH_CMASK_REGNUM(pauth_reg_base)
#define sve_vq_from_vl(vl)
#define sve_vl_from_vq(vq)
#define AARCH64_TOP_BITS_MASK
#define AARCH64_SVE_V0_REGNUM
#define AARCH64_PAUTH_DMASK_HIGH_REGNUM(pauth_reg_base)
#define VA_RANGE_SELECT_BIT_MASK
@ AARCH64_STRUCT_RETURN_REGNUM
#define AARCH64_B0_REGNUM
#define AARCH64_PAUTH_CMASK_HIGH_REGNUM(pauth_reg_base)
#define AARCH64_S0_REGNUM
#define AARCH64_MAX_SVE_VQ
#define AARCH64_D0_REGNUM
#define AARCH64_ZA_TILES_NUM
#define AARCH64_V_REGS_NUM
#define AARCH64_PAUTH_DMASK_REGNUM(pauth_reg_base)
gdb_static_assert(sizeof(splay_tree_key) >=sizeof(CORE_ADDR *))
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)
int default_print_insn(bfd_vma memaddr, disassemble_info *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)
struct gdbarch * gdbarch_find_by_info(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)
thread_info * find_thread(ptid_t ptid)
bool find_reg(struct gdbarch *gdbarch, int reg, CORE_ADDR *offset_p)
bool store_would_trash(pv_t addr)
void store(pv_t addr, CORE_ADDR size, pv_t value)
enum register_status raw_read(int regnum, gdb_byte *buf)
enum register_status raw_read_part(int regnum, int offset, int len, gdb_byte *buf)
enum register_status cooked_read(int regnum, gdb_byte *buf)
void cooked_write(int regnum, const gdb_byte *buf)
void raw_write_part(int regnum, int offset, int len, const gdb_byte *buf)
void raw_write(int regnum, const gdb_byte *buf)
struct cmd_list_element * showdebuglist
struct cmd_list_element * setdebuglist
set_show_commands add_setshow_boolean_cmd(const char *name, enum command_class theclass, bool *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void write_memory(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
void write_memory_unsigned_integer(CORE_ADDR addr, int len, enum bfd_endian byte_order, ULONGEST value)
int safe_read_memory_unsigned_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order, ULONGEST *return_value)
ULONGEST read_code_unsigned_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
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 ULONGEST extract_unsigned_integer(gdb::array_view< const gdb_byte > buf, enum bfd_endian byte_order)
@ RETURN_VALUE_ABI_RETURNS_ADDRESS
@ RETURN_VALUE_REGISTER_CONVENTION
#define displaced_debug_printf(fmt,...)
std::unique_ptr< displaced_step_copy_insn_closure > displaced_step_copy_insn_closure_up
void dwarf2_append_unwinders(struct gdbarch *gdbarch)
void dwarf2_frame_set_init_reg(struct gdbarch *gdbarch, void(*init_reg)(struct gdbarch *, int, struct dwarf2_frame_state_reg *, frame_info_ptr))
@ DWARF2_FRAME_REG_SAVED_VAL_EXP
@ DWARF2_FRAME_REG_SAME_VALUE
ssize_t read(int fd, void *buf, size_t count)
struct value * value_of_register(int regnum, frame_info_ptr frame)
void frame_base_set_default(struct gdbarch *gdbarch, const struct frame_base *default_base)
int default_frame_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_prologue_cache)
struct value * frame_unwind_got_constant(frame_info_ptr frame, int regnum, ULONGEST val)
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
ULONGEST get_frame_register_unsigned(frame_info_ptr frame, int regnum)
ULONGEST frame_unwind_register_unsigned(frame_info_ptr next_frame, int regnum)
CORE_ADDR get_frame_pc(frame_info_ptr frame)
struct frame_id frame_id_build(CORE_ADDR stack_addr, CORE_ADDR code_addr)
struct gdbarch * get_frame_arch(frame_info_ptr this_frame)
bool get_frame_pc_masked(frame_info_ptr frame)
struct frame_id frame_id_build_unavailable_stack(CORE_ADDR code_addr)
CORE_ADDR get_frame_func(frame_info_ptr this_frame)
void set_frame_previous_pc_masked(frame_info_ptr frame)
CORE_ADDR get_frame_address_in_block(frame_info_ptr this_frame)
#define FRAME_OBSTACK_ZALLOC(TYPE)
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_return_value_as_value(struct gdbarch *gdbarch, gdbarch_return_value_as_value_ftype *return_value_as_value)
void set_gdbarch_gen_return_address(struct gdbarch *gdbarch, gdbarch_gen_return_address_ftype *gen_return_address)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
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_pseudo_register_read_value(struct gdbarch *gdbarch, gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value)
void set_gdbarch_frame_align(struct gdbarch *gdbarch, gdbarch_frame_align_ftype *frame_align)
void set_gdbarch_program_breakpoint_here_p(struct gdbarch *gdbarch, gdbarch_program_breakpoint_here_p_ftype *program_breakpoint_here_p)
void set_gdbarch_get_longjmp_target(struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype *get_longjmp_target)
void set_gdbarch_skip_prologue(struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue)
int gdbarch_addr_bit(struct gdbarch *gdbarch)
void set_gdbarch_get_pc_address_flags(struct gdbarch *gdbarch, gdbarch_get_pc_address_flags_ftype *get_pc_address_flags)
void set_gdbarch_int_bit(struct gdbarch *gdbarch, int int_bit)
void set_gdbarch_wchar_signed(struct gdbarch *gdbarch, int wchar_signed)
void set_gdbarch_have_nonsteppable_watchpoint(struct gdbarch *gdbarch, int have_nonsteppable_watchpoint)
int gdbarch_num_regs(struct gdbarch *gdbarch)
void set_gdbarch_execute_dwarf_cfa_vendor_op(struct gdbarch *gdbarch, gdbarch_execute_dwarf_cfa_vendor_op_ftype *execute_dwarf_cfa_vendor_op)
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)
enum bfd_endian gdbarch_byte_order_for_code(struct gdbarch *gdbarch)
void set_gdbarch_sp_regnum(struct gdbarch *gdbarch, int sp_regnum)
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_print_insn(struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn)
void set_gdbarch_float_bit(struct gdbarch *gdbarch, int float_bit)
void set_gdbarch_stack_frame_destroyed_p(struct gdbarch *gdbarch, gdbarch_stack_frame_destroyed_p_ftype *stack_frame_destroyed_p)
void set_gdbarch_short_bit(struct gdbarch *gdbarch, int short_bit)
void set_gdbarch_remove_non_address_bits(struct gdbarch *gdbarch, gdbarch_remove_non_address_bits_ftype *remove_non_address_bits)
void set_gdbarch_pseudo_register_write(struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype *pseudo_register_write)
void set_gdbarch_num_pseudo_regs(struct gdbarch *gdbarch, int num_pseudo_regs)
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_type_align(struct gdbarch *gdbarch, gdbarch_type_align_ftype *type_align)
void set_gdbarch_cannot_store_register(struct gdbarch *gdbarch, gdbarch_cannot_store_register_ftype *cannot_store_register)
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_double_format(struct gdbarch *gdbarch, const struct floatformat **double_format)
void set_gdbarch_float_format(struct gdbarch *gdbarch, const struct floatformat **float_format)
void set_gdbarch_push_dummy_call(struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call)
void set_gdbarch_vbit_in_delta(struct gdbarch *gdbarch, int vbit_in_delta)
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
@ return_method_hidden_param
struct type * lookup_pointer_type(struct type *type)
struct type * arch_composite_type(struct gdbarch *gdbarch, const char *name, enum type_code code)
const struct floatformat * floatformats_ieee_quad[BFD_ENDIAN_UNKNOWN]
struct type * init_vector_type(struct type *elt_type, int n)
const struct floatformat * floatformats_ieee_single[BFD_ENDIAN_UNKNOWN]
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
unsigned type_align(struct type *type)
const struct floatformat * floatformats_ieee_double[BFD_ENDIAN_UNKNOWN]
void append_composite_type_field(struct type *t, const char *name, struct type *field)
bool is_fixed_point_type(struct type *type)
struct type * check_typedef(struct type *type)
#define TYPE_IS_REFERENCE(t)
#define TYPE_HAS_DYNAMIC_LENGTH(t)
struct inferior * current_inferior(void)
struct language_pass_by_ref_info language_pass_by_reference(struct type *type)
static int in_plt_section(CORE_ADDR pc)
void gdbarch_init_osabi(struct gdbarch_info info, struct gdbarch *gdbarch)
pv_t pv_subtract(pv_t a, pv_t b)
pv_t pv_constant(CORE_ADDR k)
pv_t pv_register(int reg, CORE_ADDR k)
pv_t pv_add_constant(pv_t v, CORE_ADDR k)
int pv_is_register(pv_t a, int r)
int record_full_arch_list_add_reg(struct regcache *regcache, int regnum)
int record_full_arch_list_add_mem(CORE_ADDR addr, int len)
int record_full_arch_list_add_end(void)
unsigned int record_debug
CORE_ADDR regcache_read_pc(struct regcache *regcache)
enum register_status regcache_raw_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
int register_size(struct gdbarch *gdbarch, int regnum)
enum register_status regcache_cooked_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
void regcache_write_pc(struct regcache *regcache, CORE_ADDR pc)
struct regcache * get_thread_regcache(process_stratum_target *target, ptid_t ptid)
void regcache_cooked_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
struct type * register_type(struct gdbarch *gdbarch, int regnum)
const reggroup *const float_reggroup
const reggroup *const all_reggroup
const reggroup *const vector_reggroup
std::vector< stack_item_t > si
uint32_t insn_buf[AARCH64_DISPLACED_MODIFIED_INSNS]
struct aarch64_insn_data base
aarch64_displaced_step_copy_insn_closure * dsc
int sme_tile_slice_pseudo_base
struct type * sme_tile_slice_type_b
struct type * sme_tile_slice_type_d
struct type * sme_tile_type_s
struct type * sme_tile_type_d
int(* aarch64_syscall_record)(struct regcache *regcache, unsigned long svc_number)
struct type * sme_tile_slice_type_h
struct type * sme_tile_type_h
struct type * sme_tile_type_b
struct type * sme_tile_type_q
int sme_tile_slice_pseudo_count
struct type * sme_tile_slice_type_s
struct type * sme_tile_slice_type_q
std::vector< std::string > sme_pseudo_names
struct aarch64_mem_r * aarch64_mems
struct regcache * regcache
trad_frame_saved_reg * saved_regs
struct type * builtin_uint16
struct type * builtin_double
struct type * builtin_int8
struct type * builtin_uint128
struct type * builtin_uint32
struct type * builtin_uint64
struct type * builtin_int64
struct type * builtin_int32
struct type * builtin_uint8
struct type * builtin_half
struct type * builtin_bfloat16
struct type * builtin_int128
struct type * builtin_int16
struct type * builtin_float
union dwarf2_frame_state_reg::@46 loc
struct dwarf2_frame_state_reg::@46::@47 exp
enum dwarf2_frame_reg_rule how
struct type * type() const
std::vector< tdesc_feature_up > features
void set_addr(LONGEST addr)
void set_value(LONGEST val)
struct type * target_type() const
struct field & field(int idx) const
unsigned int num_fields() const
struct value * primitive_field(LONGEST offset, int fieldno, struct type *arg_type)
struct gdbarch * arch() const
static struct value * allocate(struct type *type)
void set_lval(lval_type val)
void mark_bytes_unavailable(LONGEST offset, ULONGEST length)
gdb::array_view< const gdb_byte > contents()
gdb::array_view< gdb_byte > contents_raw()
struct type * type() const
struct value::@203::@204 reg
CORE_ADDR skip_prologue_using_sal(struct gdbarch *gdbarch, CORE_ADDR func_addr)
struct symtab_and_line find_pc_line(CORE_ADDR pc, int notcurrent)
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)
void set_tdesc_pseudo_register_name(struct gdbarch *gdbarch, gdbarch_register_name_ftype *pseudo_name)
int tdesc_has_registers(const struct target_desc *target_desc)
void set_tdesc_pseudo_register_type(struct gdbarch *gdbarch, gdbarch_register_type_ftype *pseudo_type)
int tdesc_register_bitsize(const struct tdesc_feature *feature, const char *name)
int tdesc_unnumbered_register(const struct tdesc_feature *feature, const char *name)
void set_tdesc_pseudo_register_reggroup_p(struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *pseudo_reggroup_p)
std::unique_ptr< tdesc_arch_data, tdesc_arch_data_deleter > tdesc_arch_data_up
scoped_restore_tmpl< int > make_scoped_restore_show_memory_breakpoints(int show)
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
trad_frame_saved_reg * trad_frame_alloc_saved_regs(struct gdbarch *gdbarch)
struct value * trad_frame_get_prev_register(frame_info_ptr this_frame, trad_frame_saved_reg this_saved_regs[], int regnum)
void trad_frame_reset_saved_regs(struct gdbarch *gdbarch, trad_frame_saved_reg *regs)
void user_reg_add(struct gdbarch *gdbarch, const char *name, user_reg_read_ftype *xread, const void *baton)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
void gdb_printf(struct ui_file *stream, const char *format,...)
struct value * value_at_non_lval(struct type *type, CORE_ADDR addr)
struct value * value_cast(struct type *type, struct value *arg2)
struct value * value_from_pointer(struct type *type, CORE_ADDR addr)
LONGEST unpack_long(struct type *type, const gdb_byte *valaddr)
#define VALUE_REGNUM(val)