24#include "floatformat.h"
34#include "elf/common.h"
42#ifdef HAVE_LIBUNWIND_IA64_H
61#define KERNEL_START 0xc000000000000000ULL
63static size_t ktab_size = 0;
64struct ia64_table_entry
66 uint64_t start_offset;
71static struct ia64_table_entry *ktab = NULL;
72static gdb::optional<gdb::byte_vector> ktab_buf;
105#define SLOT_MULTIPLIER 1
113#if BREAKPOINT_MAX < BUNDLE_LEN - 2
114# error "BREAKPOINT_MAX < BUNDLE_LEN - 2"
127#define NUM_IA64_RAW_REGS 462
130#define IA64_FP_REGISTER_SIZE 16
148{
"r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
149 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
150 "r16",
"r17",
"r18",
"r19",
"r20",
"r21",
"r22",
"r23",
151 "r24",
"r25",
"r26",
"r27",
"r28",
"r29",
"r30",
"r31",
152 "",
"",
"",
"",
"",
"",
"",
"",
153 "",
"",
"",
"",
"",
"",
"",
"",
154 "",
"",
"",
"",
"",
"",
"",
"",
155 "",
"",
"",
"",
"",
"",
"",
"",
156 "",
"",
"",
"",
"",
"",
"",
"",
157 "",
"",
"",
"",
"",
"",
"",
"",
158 "",
"",
"",
"",
"",
"",
"",
"",
159 "",
"",
"",
"",
"",
"",
"",
"",
160 "",
"",
"",
"",
"",
"",
"",
"",
161 "",
"",
"",
"",
"",
"",
"",
"",
162 "",
"",
"",
"",
"",
"",
"",
"",
163 "",
"",
"",
"",
"",
"",
"",
"",
165 "f0",
"f1",
"f2",
"f3",
"f4",
"f5",
"f6",
"f7",
166 "f8",
"f9",
"f10",
"f11",
"f12",
"f13",
"f14",
"f15",
167 "f16",
"f17",
"f18",
"f19",
"f20",
"f21",
"f22",
"f23",
168 "f24",
"f25",
"f26",
"f27",
"f28",
"f29",
"f30",
"f31",
169 "f32",
"f33",
"f34",
"f35",
"f36",
"f37",
"f38",
"f39",
170 "f40",
"f41",
"f42",
"f43",
"f44",
"f45",
"f46",
"f47",
171 "f48",
"f49",
"f50",
"f51",
"f52",
"f53",
"f54",
"f55",
172 "f56",
"f57",
"f58",
"f59",
"f60",
"f61",
"f62",
"f63",
173 "f64",
"f65",
"f66",
"f67",
"f68",
"f69",
"f70",
"f71",
174 "f72",
"f73",
"f74",
"f75",
"f76",
"f77",
"f78",
"f79",
175 "f80",
"f81",
"f82",
"f83",
"f84",
"f85",
"f86",
"f87",
176 "f88",
"f89",
"f90",
"f91",
"f92",
"f93",
"f94",
"f95",
177 "f96",
"f97",
"f98",
"f99",
"f100",
"f101",
"f102",
"f103",
178 "f104",
"f105",
"f106",
"f107",
"f108",
"f109",
"f110",
"f111",
179 "f112",
"f113",
"f114",
"f115",
"f116",
"f117",
"f118",
"f119",
180 "f120",
"f121",
"f122",
"f123",
"f124",
"f125",
"f126",
"f127",
182 "",
"",
"",
"",
"",
"",
"",
"",
183 "",
"",
"",
"",
"",
"",
"",
"",
184 "",
"",
"",
"",
"",
"",
"",
"",
185 "",
"",
"",
"",
"",
"",
"",
"",
186 "",
"",
"",
"",
"",
"",
"",
"",
187 "",
"",
"",
"",
"",
"",
"",
"",
188 "",
"",
"",
"",
"",
"",
"",
"",
189 "",
"",
"",
"",
"",
"",
"",
"",
191 "b0",
"b1",
"b2",
"b3",
"b4",
"b5",
"b6",
"b7",
195 "pr",
"ip",
"psr",
"cfm",
197 "kr0",
"kr1",
"kr2",
"kr3",
"kr4",
"kr5",
"kr6",
"kr7",
198 "",
"",
"",
"",
"",
"",
"",
"",
199 "rsc",
"bsp",
"bspstore",
"rnat",
201 "eflag",
"csd",
"ssd",
"cflg",
"fsr",
"fir",
"fdr",
"",
202 "ccv",
"",
"",
"",
"unat",
"",
"",
"",
203 "fpsr",
"",
"",
"",
"itc",
204 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
205 "",
"",
"",
"",
"",
"",
"",
"",
"",
207 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
208 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
209 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
210 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
211 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
212 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
214 "nat0",
"nat1",
"nat2",
"nat3",
"nat4",
"nat5",
"nat6",
"nat7",
215 "nat8",
"nat9",
"nat10",
"nat11",
"nat12",
"nat13",
"nat14",
"nat15",
216 "nat16",
"nat17",
"nat18",
"nat19",
"nat20",
"nat21",
"nat22",
"nat23",
217 "nat24",
"nat25",
"nat26",
"nat27",
"nat28",
"nat29",
"nat30",
"nat31",
218 "nat32",
"nat33",
"nat34",
"nat35",
"nat36",
"nat37",
"nat38",
"nat39",
219 "nat40",
"nat41",
"nat42",
"nat43",
"nat44",
"nat45",
"nat46",
"nat47",
220 "nat48",
"nat49",
"nat50",
"nat51",
"nat52",
"nat53",
"nat54",
"nat55",
221 "nat56",
"nat57",
"nat58",
"nat59",
"nat60",
"nat61",
"nat62",
"nat63",
222 "nat64",
"nat65",
"nat66",
"nat67",
"nat68",
"nat69",
"nat70",
"nat71",
223 "nat72",
"nat73",
"nat74",
"nat75",
"nat76",
"nat77",
"nat78",
"nat79",
224 "nat80",
"nat81",
"nat82",
"nat83",
"nat84",
"nat85",
"nat86",
"nat87",
225 "nat88",
"nat89",
"nat90",
"nat91",
"nat92",
"nat93",
"nat94",
"nat95",
226 "nat96",
"nat97",
"nat98",
"nat99",
"nat100",
"nat101",
"nat102",
"nat103",
227 "nat104",
"nat105",
"nat106",
"nat107",
"nat108",
"nat109",
"nat110",
"nat111",
228 "nat112",
"nat113",
"nat114",
"nat115",
"nat116",
"nat117",
"nat118",
"nat119",
229 "nat120",
"nat121",
"nat122",
"nat123",
"nat124",
"nat125",
"nat126",
"nat127",
233 "r32",
"r33",
"r34",
"r35",
"r36",
"r37",
"r38",
"r39",
234 "r40",
"r41",
"r42",
"r43",
"r44",
"r45",
"r46",
"r47",
235 "r48",
"r49",
"r50",
"r51",
"r52",
"r53",
"r54",
"r55",
236 "r56",
"r57",
"r58",
"r59",
"r60",
"r61",
"r62",
"r63",
237 "r64",
"r65",
"r66",
"r67",
"r68",
"r69",
"r70",
"r71",
238 "r72",
"r73",
"r74",
"r75",
"r76",
"r77",
"r78",
"r79",
239 "r80",
"r81",
"r82",
"r83",
"r84",
"r85",
"r86",
"r87",
240 "r88",
"r89",
"r90",
"r91",
"r92",
"r93",
"r94",
"r95",
241 "r96",
"r97",
"r98",
"r99",
"r100",
"r101",
"r102",
"r103",
242 "r104",
"r105",
"r106",
"r107",
"r108",
"r109",
"r110",
"r111",
243 "r112",
"r113",
"r114",
"r115",
"r116",
"r117",
"r118",
"r119",
244 "r120",
"r121",
"r122",
"r123",
"r124",
"r125",
"r126",
"r127",
246 "p0",
"p1",
"p2",
"p3",
"p4",
"p5",
"p6",
"p7",
247 "p8",
"p9",
"p10",
"p11",
"p12",
"p13",
"p14",
"p15",
248 "p16",
"p17",
"p18",
"p19",
"p20",
"p21",
"p22",
"p23",
249 "p24",
"p25",
"p26",
"p27",
"p28",
"p29",
"p30",
"p31",
250 "p32",
"p33",
"p34",
"p35",
"p36",
"p37",
"p38",
"p39",
251 "p40",
"p41",
"p42",
"p43",
"p44",
"p45",
"p46",
"p47",
252 "p48",
"p49",
"p50",
"p51",
"p52",
"p53",
"p54",
"p55",
253 "p56",
"p57",
"p58",
"p59",
"p60",
"p61",
"p62",
"p63",
294 floatformat_little, 82, 0, 1, 17, 65535, 0x1ffff, 18, 64,
300 floatformat_big, 82, 46, 47, 17, 65535, 0x1ffff, 64, 64,
343 return (!vector_p && !float_p);
379 long long result = 0
LL;
381 int from_byte = from / 8;
382 int to_byte = to / 8;
383 unsigned char *b = (
unsigned char *) bundle;
389 if (from_byte == to_byte)
390 c = ((
unsigned char) (c << (8 - to % 8))) >> (8 - to % 8);
391 result = c >> (from % 8);
392 lshift = 8 - (from % 8);
394 for (i = from_byte+1; i < to_byte; i++)
396 result |= ((
long long) b[i]) << lshift;
400 if (from_byte < to_byte && (to % 8 != 0))
403 c = ((
unsigned char) (c << (8 - to % 8))) >> (8 - to % 8);
404 result |= ((
long long) c) << lshift;
416 int from_byte = from / 8;
417 int to_byte = to / 8;
418 unsigned char *b = (
unsigned char *) bundle;
421 if (from_byte == to_byte)
423 unsigned char left, right;
425 left = (c >> (to % 8)) << (to % 8);
426 right = ((
unsigned char) (c << (8 - from % 8))) >> (8 - from % 8);
427 c = (
unsigned char) (val & 0xff);
428 c = (
unsigned char) (c << (from % 8 + 8 - to % 8)) >> (8 - to % 8);
436 c = ((
unsigned char) (c << (8 - from % 8))) >> (8 - from % 8);
437 c = c | (val << (from % 8));
439 val >>= 8 - from % 8;
441 for (i = from_byte+1; i < to_byte; i++)
450 unsigned char cv = (
unsigned char) val;
452 c = c >> (to % 8) << (to % 8);
453 c |= ((
unsigned char) (cv << (8 - to % 8))) >> (8 - to % 8);
538 warning (_(
"Can't fetch instructions for slot numbers greater than 2.\n"
539 "Using slot 0 instead"));
554 if (slotnum == 2 || (slotnum == 1 && *it ==
L))
639#define IA64_BREAKPOINT 0x00003333300LL
648 long long instr_breakpoint;
653 error (_(
"Can't insert breakpoint for slot numbers greater than 2."));
662 scoped_restore restore_memory_0
670 shadow_slotnum = slotnum;
683 gdb_assert (slotnum == 2);
684 error (_(
"Can't insert breakpoint for non-existing slot X"));
691 gdb_assert (slotnum == 1);
707 scoped_restore restore_memory_1
719 internal_error (_(
"Address %s already contains a breakpoint."),
736 long long instr_breakpoint, instr_saved;
747 scoped_restore restore_memory_1
755 shadow_slotnum = slotnum;
765 gdb_assert (slotnum == 2);
766 warning (_(
"Cannot remove breakpoint at address %s from non-existing "
767 "X-type slot, memory has changed underneath"),
776 gdb_assert (slotnum == 1);
785 warning (_(
"Cannot remove breakpoint at address %s, "
786 "no break instruction at such address."),
793 memcpy (bundle_saved, bundle_mem,
BUNDLE_LEN);
821static const gdb_byte *
823 CORE_ADDR *pcptr,
int *lenptr)
825 CORE_ADDR addr = *pcptr;
828 long long instr_fetched;
833 error (_(
"Can't insert breakpoint for slot numbers greater than 2."));
840 scoped_restore restore_memory_0
852 shadow_slotnum = slotnum;
862 gdb_assert (slotnum == 2);
863 error (_(
"Can't insert breakpoint for non-existing slot X"));
867 gdb_assert (slotnum == 1);
875 instr_fetched &= 0x1003ffffc0LL;
878 return bundle + shadow_slotnum;
884 ULONGEST psr_value, pc_value;
889 slot_num = (psr_value >> 41) & 3;
901 psr_value &= ~(3LL << 41);
902 psr_value |= (ULONGEST)(slot_num & 0x3) << 41;
910#define IS_NaT_COLLECTION_ADDR(addr) ((((addr) >> 3) & 0x3f) == 0x3f)
918 int mandatory_nat_slots = nslots / 63;
919 int direction = nslots < 0 ? -1 : 1;
921 new_addr = addr + 8 * (nslots + mandatory_nat_slots);
923 if ((new_addr >> 9) != ((addr + 8 * 64 * mandatory_nat_slots) >> 9))
924 new_addr += 8 * direction;
927 new_addr += 8 * direction;
932static enum register_status
934 int regnum, gdb_byte *buf)
937 enum register_status
status;
941#ifdef HAVE_LIBUNWIND_IA64_H
991 byte_order, unatN_val);
995 ULONGEST natN_val = 0;
998 CORE_ADDR gr_addr = 0;
1018 CORE_ADDR nat_addr = gr_addr | 0x1f8;
1019 ULONGEST nat_collection;
1024 if (nat_addr >= bsp)
1028 nat_bit = (gr_addr >> 3) & 0x3f;
1029 natN_val = (nat_collection >> nat_bit) & 1;
1033 byte_order, natN_val);
1072 int rrb_pr = (cfm >> 32) & 0x3f;
1080 byte_order, prN_val);
1090 int regnum,
const gdb_byte *buf)
1111 ULONGEST unatN_val, unat, unatN_mask;
1118 unat &= ~unatN_mask;
1119 else if (unatN_val == 1)
1128 CORE_ADDR gr_addr = 0;
1143 if (gr_addr != 0 && (natN_val == 0 || natN_val == 1))
1146 CORE_ADDR nat_addr = gr_addr | 0x1f8;
1147 CORE_ADDR nat_collection;
1148 int natN_bit = (gr_addr >> 3) & 0x3f;
1149 ULONGEST natN_mask = (1LL << natN_bit);
1153 if (nat_addr >= bsp)
1159 nat_collection |= natN_mask;
1161 nat_collection &= ~natN_mask;
1167 gdb_byte nat_buf[8];
1170 nat_collection |= natN_mask;
1172 nat_collection &= ~natN_mask;
1174 byte_order, nat_collection);
1193 int rrb_pr = (cfm >> 32) & 0x3f;
1204 else if (prN_val == 1)
1223 struct type *valtype, gdb_byte *out,
1224 int *optimizedp,
int *unavailablep)
1231 gdb::make_array_view (in,
1234 optimizedp, unavailablep))
1238 *optimizedp = *unavailablep = 0;
1244 struct type *valtype,
const gdb_byte *in)
1274 CORE_ADDR start_pc =
pc;
1286 if (prologue_sal.
line != 0)
1289 CORE_ADDR addr = prologue_sal.
end;
1299 i > 0 && (lim_pc == 0 || addr < lim_pc);
1315 if (lim_pc == 0 || prologue_sal.
end < lim_pc)
1317 lim_pc = prologue_sal.
end;
1325#define isScratch(_regnum_) ((_regnum_) == 2 || (_regnum_) == 3 \
1326 || (8 <= (_regnum_) && (_regnum_) <= 11) \
1327 || (14 <= (_regnum_) && (_regnum_) <= 31))
1328#define imm9(_instr_) \
1329 ( ((((_instr_) & 0x01000000000LL) ? -1 : 0) << 8) \
1330 | (((_instr_) & 0x00008000000LL) >> 20) \
1331 | (((_instr_) & 0x00000001fc0LL) >> 6))
1367 CORE_ADDR last_prologue_pc =
pc;
1373 int unat_save_reg = 0;
1374 int pr_save_reg = 0;
1377 CORE_ADDR spill_addr = 0;
1380 char reg_contents[256];
1388 memset (instores, 0,
sizeof instores);
1389 memset (infpstores, 0,
sizeof infpstores);
1390 memset (reg_contents, 0,
sizeof reg_contents);
1401 if (
pc < lim_pc && next_pc
1402 && it ==
M && ((instr & 0x1ee0000003fLL) == 0x02c00000000LL))
1405 int sol_bits = (int) ((instr & 0x00007f00000LL) >> 20);
1406 int sof_bits = (int) ((instr & 0x000000fe000LL) >> 13);
1407 int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
1415 (sof_bits == (cache->
cfm & 0x7f) &&
1416 sol_bits == ((cache->
cfm >> 7) & 0x7f)))
1420 last_prologue_pc = next_pc;
1426 if (
pc < lim_pc && next_pc
1427 && (it ==
I || it ==
M)
1428 && ((instr & 0x1ee00000000LL) == 0x10800000000LL))
1431 int imm = (int) ((((instr & 0x01000000000LL) ? -1 : 0) << 13)
1432 | ((instr & 0x001f8000000LL) >> 20)
1433 | ((instr & 0x000000fe000LL) >> 13));
1434 int rM = (int) ((instr & 0x00007f00000LL) >> 20);
1435 int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
1436 int qp = (int) (instr & 0x0000000003fLL);
1437 if (qp == 0 && rN == 2 && imm == 0 && rM == 12 &&
fp_reg == 0)
1441 last_prologue_pc = next_pc;
1451 last_prologue_pc = lim_pc;
1463 if (it ==
B && ((instr & 0x1e1f800003fLL) != 0x04000000000LL))
1470 else if (((instr & 0x3fLL) != 0
LL) &&
1479 else if (it ==
I && ((instr & 0x1eff8000000LL) == 0x00188000000LL))
1482 int b2 = (int) ((instr & 0x0000000e000LL) >> 13);
1483 int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
1484 int qp = (int) (instr & 0x0000000003f);
1486 if (qp == 0 && b2 == 0 && rN >= 32 && ret_reg == 0)
1489 last_prologue_pc = next_pc;
1492 else if ((it ==
I || it ==
M)
1493 && ((instr & 0x1ee00000000LL) == 0x10800000000LL))
1496 int imm = (int) ((((instr & 0x01000000000LL) ? -1 : 0) << 13)
1497 | ((instr & 0x001f8000000LL) >> 20)
1498 | ((instr & 0x000000fe000LL) >> 13));
1499 int rM = (int) ((instr & 0x00007f00000LL) >> 20);
1500 int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
1501 int qp = (int) (instr & 0x0000000003fLL);
1503 if (qp == 0 && rN >= 32 && imm == 0 && rM == 12 &&
fp_reg == 0)
1507 last_prologue_pc = next_pc;
1509 else if (qp == 0 && rN == 12 && rM == 12)
1513 last_prologue_pc = next_pc;
1515 else if (qp == 0 && rN == 2
1538 last_prologue_pc = next_pc;
1540 else if (qp == 0 && rM >= 32 && rM < 40 && !instores[rM-32] &&
1541 rN < 256 && imm == 0)
1544 reg_contents[rN] = rM;
1545 last_prologue_pc = next_pc;
1551 last_prologue_pc = next_pc;
1556 && ( ((instr & 0x1efc0000000LL) == 0x0eec0000000LL)
1557 || ((instr & 0x1ffc8000000LL) == 0x0cec0000000LL) ))
1563 int imm =
imm9(instr);
1564 int rN = (int) ((instr & 0x00007f00000LL) >> 20);
1565 int fM = (int) ((instr & 0x000000fe000LL) >> 13);
1566 int qp = (int) (instr & 0x0000000003fLL);
1567 if (qp == 0 && rN == spill_reg && spill_addr != 0
1568 && ((2 <= fM && fM <= 5) || (16 <= fM && fM <= 31)))
1572 if ((instr & 0x1efc0000000LL) == 0x0eec0000000LL)
1576 last_prologue_pc = next_pc;
1579 else if ((it ==
M && ((instr & 0x1eff8000000LL) == 0x02110000000LL))
1580 || (it ==
I && ((instr & 0x1eff8000000LL) == 0x00050000000LL)) )
1586 int arM = (int) ((instr & 0x00007f00000LL) >> 20);
1587 int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
1588 int qp = (int) (instr & 0x0000000003fLL);
1589 if (qp == 0 &&
isScratch (rN) && arM == 36 )
1594 last_prologue_pc = next_pc;
1597 else if (it ==
I && ((instr & 0x1eff8000000LL) == 0x00198000000LL))
1600 int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
1601 int qp = (int) (instr & 0x0000000003fLL);
1605 last_prologue_pc = next_pc;
1609 && ( ((instr & 0x1ffc8000000LL) == 0x08cc0000000LL)
1610 || ((instr & 0x1efc0000000LL) == 0x0acc0000000LL)))
1615 int rN = (int) ((instr & 0x00007f00000LL) >> 20);
1616 int rM = (int) ((instr & 0x000000fe000LL) >> 13);
1617 int qp = (int) (instr & 0x0000000003fLL);
1618 int indirect = rM < 256 ? reg_contents[rM] : 0;
1619 if (qp == 0 && rN == spill_reg && spill_addr != 0
1620 && (rM == unat_save_reg || rM == pr_save_reg))
1626 if (rM == unat_save_reg)
1638 if ((instr & 0x1efc0000000LL) == 0x0acc0000000LL)
1640 spill_addr +=
imm9(instr);
1643 last_prologue_pc = next_pc;
1645 else if (qp == 0 && 32 <= rM && rM < 40 && !instores[rM-32])
1648 instores[rM-32] = 1;
1649 last_prologue_pc = next_pc;
1651 else if (qp == 0 && 32 <= indirect && indirect < 40 &&
1652 !instores[indirect-32])
1655 instores[indirect-32] = 1;
1656 last_prologue_pc = next_pc;
1659 else if (it ==
M && ((instr & 0x1ff08000000LL) == 0x08c00000000LL))
1670 int rM = (int) ((instr & 0x000000fe000LL) >> 13);
1671 int qp = (int) (instr & 0x0000000003fLL);
1672 int indirect = rM < 256 ? reg_contents[rM] : 0;
1673 if (qp == 0 && 32 <= rM && rM < 40 && !instores[rM-32])
1675 instores[rM-32] = 1;
1676 last_prologue_pc = next_pc;
1678 else if (qp == 0 && 32 <= indirect && indirect < 40 &&
1679 !instores[indirect-32])
1682 instores[indirect-32] = 1;
1683 last_prologue_pc = next_pc;
1686 else if (it ==
M && ((instr & 0x1ff88000000LL) == 0x0cc80000000LL))
1695 int fM = (int) ((instr & 0x000000fe000LL) >> 13);
1696 int qp = (int) (instr & 0x0000000003fLL);
1697 if (qp == 0 && 8 <= fM && fM < 16 && !infpstores[fM - 8])
1699 infpstores[fM-8] = 1;
1700 last_prologue_pc = next_pc;
1704 && ( ((instr & 0x1ffc8000000LL) == 0x08ec0000000LL)
1705 || ((instr & 0x1efc0000000LL) == 0x0aec0000000LL)))
1710 int rN = (int) ((instr & 0x00007f00000LL) >> 20);
1711 int rM = (int) ((instr & 0x000000fe000LL) >> 13);
1712 int qp = (int) (instr & 0x0000000003fLL);
1713 if (qp == 0 && rN == spill_reg && 4 <= rM && rM <= 7)
1719 if ((instr & 0x1efc0000000LL) == 0x0aec0000000LL)
1721 spill_addr +=
imm9(instr);
1724 last_prologue_pc = next_pc;
1747 rrb_gr = (cfm >> 18) & 0x7f;
1752 for (i = 0, addr = bof;
1760 if (i+32 == cfm_reg)
1762 if (i+32 == ret_reg)
1776 else if (cfm_reg != 0)
1785 sor = ((cfm >> 14) & 0xf) * 8;
1787 sol = (cfm >> 7) & 0x7f;
1788 rrb_gr = (cfm >> 18) & 0x7f;
1795 for (i = 0, addr = bof;
1805 + ((i + (sor - rrb_gr)) % sor)]
1815 if (trust_limit && lim_pc >= last_prologue_pc)
1816 last_prologue_pc = lim_pc;
1823 return last_prologue_pc;
1856 *this_cache = cache;
1872 cache->
sof = (
cfm & 0x7f);
1873 cache->
sol = (
cfm >> 7) & 0x7f;
1874 cache->
sor = ((
cfm >> 14) & 0xf) * 8;
1897 if (cache->
base != 0)
1901 "regular frame id: code %s, stack %s, "
1902 "special %s, this_frame %s\n",
1906 host_address_to_string (this_frame.
get ()));
1909static struct value *
1918 gdb_assert (
regnum >= 0);
1921 error (_(
"No registers."));
1929 CORE_ADDR prev_cfm, bsp, prev_bsp;
1976 struct value *pr_val;
1985 int rrb_pr = (cache->
cfm >> 32) & 0x3f;
1997 struct value *unat_val;
2018 CORE_ADDR nat_addr = gr_addr | 0x1f8;
2020 CORE_ADDR nat_collection;
2028 if (nat_addr >= bsp)
2035 nat_bit = (gr_addr >> 3) & 0x3f;
2036 natval = (nat_collection >> nat_bit) & 1;
2067 ULONGEST slot_num = 0;
2085 psr &= ~(3LL << 41);
2086 slot_num = pc & 0x3LL;
2087 psr |= (CORE_ADDR)slot_num << 41;
2114 struct value *reg_val;
2115 CORE_ADDR prev_cfm, prev_bsp, prev_bof;
2146 int rrb_fr = (cache->
cfm >> 25) & 0x7f;
2254 cache->
sof = cache->
cfm & 0x7f;
2258 *this_cache = cache;
2264 void **this_cache,
struct frame_id *this_id)
2275 "sigtramp frame id: code %s, stack %s, "
2276 "special %s, this_frame %s\n",
2280 host_address_to_string (this_frame.
get ()));
2283static struct value *
2285 void **this_cache,
int regnum)
2290 gdb_assert (
regnum >= 0);
2293 error (_(
"No registers."));
2382#ifdef HAVE_LIBUNWIND_IA64_H
2384struct ia64_unwind_table_entry
2386 unw_word_t start_offset;
2387 unw_word_t end_offset;
2388 unw_word_t info_offset;
2391static __inline__ uint64_t
2392ia64_rse_slot_num (uint64_t addr)
2394 return (addr >> 3) & 0x3f;
2399static __inline__ uint64_t
2400ia64_rse_skip_regs (uint64_t addr,
long num_regs)
2402 long delta = ia64_rse_slot_num(addr) + num_regs;
2406 return addr + ((num_regs + delta/0x3f) << 3);
2412ia64_gdb2uw_regnum (
int regnum)
2417 return UNW_IA64_BSP;
2433 return UNW_IA64_CFM;
2445ia64_uw2gdb_regnum (
int uw_regnum)
2447 if (uw_regnum == UNW_IA64_SP)
2449 else if (uw_regnum == UNW_IA64_BSP)
2451 else if ((
unsigned) (uw_regnum - UNW_IA64_GR) < 32)
2453 else if ((
unsigned) (uw_regnum - UNW_IA64_GR) < 128)
2455 else if ((
unsigned) (uw_regnum - UNW_IA64_FR) < 128)
2457 else if ((
unsigned) (uw_regnum - UNW_IA64_BR) < 8)
2459 else if (uw_regnum == UNW_IA64_PR)
2461 else if (uw_regnum == UNW_REG_IP)
2463 else if (uw_regnum == UNW_IA64_CFM)
2465 else if ((
unsigned) (uw_regnum - UNW_IA64_AR) < 128)
2467 else if ((
unsigned) (uw_regnum - UNW_IA64_NAT) < 128)
2476ia64_is_fpreg (
int uw_regnum)
2478 return unw_is_fpreg (uw_regnum);
2483ia64_access_reg (unw_addr_space_t as, unw_regnum_t uw_regnum, unw_word_t *val,
2484 int write,
void *arg)
2486 int regnum = ia64_uw2gdb_regnum (uw_regnum);
2487 unw_word_t bsp, sof, cfm, psr, ip;
2493 gdb_assert (!write);
2502 *val = ip | ((psr >> 41) & 0x3);
2505 case UNW_IA64_AR_BSP:
2513 *val = ia64_rse_skip_regs (bsp, -sof);
2516 case UNW_IA64_AR_BSPSTORE:
2530 " access_reg: from cache: %4s=%s\n",
2539ia64_access_fpreg (unw_addr_space_t as, unw_regnum_t uw_regnum,
2540 unw_fpreg_t *val,
int write,
void *arg)
2542 int regnum = ia64_uw2gdb_regnum (uw_regnum);
2546 gdb_assert (!write);
2555ia64_access_rse_reg (unw_addr_space_t as, unw_regnum_t uw_regnum,
2556 unw_word_t *val,
int write,
void *arg)
2558 int regnum = ia64_uw2gdb_regnum (uw_regnum);
2559 unw_word_t bsp, sof, cfm, psr, ip;
2564 gdb_assert (!write);
2573 *val = ip | ((psr >> 41) & 0x3);
2576 case UNW_IA64_AR_BSP:
2584 *val = ia64_rse_skip_regs (bsp, -sof);
2587 case UNW_IA64_AR_BSPSTORE:
2601 " access_rse_reg: from cache: %4s=%s\n",
2611ia64_access_rse_fpreg (unw_addr_space_t as, unw_regnum_t uw_regnum,
2612 unw_fpreg_t *val,
int write,
void *arg)
2614 int regnum = ia64_uw2gdb_regnum (uw_regnum);
2618 gdb_assert (!write);
2627ia64_access_mem (unw_addr_space_t as,
2628 unw_word_t addr, unw_word_t *val,
2629 int write,
void *arg)
2631 if (addr - KERNEL_START < ktab_size)
2633 unw_word_t *laddr = (unw_word_t*) ((
char *) ktab
2634 + (addr - KERNEL_START));
2651static gdb::optional<gdb::byte_vector>
2668get_kernel_table (unw_word_t ip, unw_dyn_info_t *di)
2670 static struct ia64_table_entry *etab;
2674 ktab_buf = getunwind_table ();
2676 return -UNW_ENOINFO;
2678 ktab = (
struct ia64_table_entry *) ktab_buf->data ();
2679 ktab_size = ktab_buf->size ();
2681 for (etab = ktab; etab->start_offset; ++etab)
2682 etab->info_offset += KERNEL_START;
2685 if (ip < ktab[0].start_offset || ip >= etab[-1].end_offset)
2686 return -UNW_ENOINFO;
2688 di->format = UNW_INFO_FORMAT_TABLE;
2690 di->start_ip = ktab[0].start_offset;
2691 di->end_ip = etab[-1].end_offset;
2692 di->u.ti.name_ptr = (unw_word_t)
"<kernel>";
2693 di->u.ti.segbase = 0;
2694 di->u.ti.table_len = ((
char *) etab - (
char *) ktab) /
sizeof (unw_word_t);
2695 di->u.ti.table_data = (unw_word_t *) ktab;
2699 "segbase=%s, length=%s, gp=%s\n",
2700 (
char *) di->u.ti.name_ptr,
2701 hex_string (di->u.ti.segbase),
2702 pulongest (di->u.ti.table_len),
2703 hex_string (di->gp));
2710 unw_dyn_info_t *dip,
void **buf)
2712 Elf_Internal_Phdr *phdr, *p_text = NULL, *p_unwind = NULL;
2713 Elf_Internal_Ehdr *ehdr;
2714 unw_word_t segbase = 0;
2715 CORE_ADDR load_base;
2721 ehdr = elf_tdata (bfd)->elf_header;
2722 phdr = elf_tdata (bfd)->phdr;
2726 for (i = 0; i < ehdr->e_phnum; ++i)
2728 switch (phdr[i].p_type)
2731 if ((unw_word_t) (ip - load_base - phdr[i].p_vaddr)
2736 case PT_IA_64_UNWIND:
2737 p_unwind = phdr + i;
2745 if (!p_text || !p_unwind)
2746 return -UNW_ENOINFO;
2753 segbase = p_text->p_vaddr + load_base;
2755 if ((p_unwind->p_vaddr - p_text->p_vaddr) >= p_text->p_memsz)
2758 for (i = 0; i < ehdr->e_phnum; ++i)
2760 if (phdr[i].p_type == PT_LOAD
2761 && (p_unwind->p_vaddr - phdr[i].p_vaddr) < phdr[i].p_memsz)
2766 segbase = phdr[i].p_vaddr + load_base;
2770 return -UNW_ENOINFO;
2773 dip->start_ip = p_text->p_vaddr + load_base;
2774 dip->end_ip = dip->start_ip + p_text->p_memsz;
2776 dip->format = UNW_INFO_FORMAT_REMOTE_TABLE;
2777 dip->u.rti.name_ptr = (unw_word_t) bfd_get_filename (bfd);
2778 dip->u.rti.segbase = segbase;
2779 dip->u.rti.table_len = p_unwind->p_memsz /
sizeof (unw_word_t);
2780 dip->u.rti.table_data = p_unwind->p_vaddr + load_base;
2787ia64_find_proc_info_x (unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
2788 int need_unwind_info,
void *arg)
2800 if (get_kernel_table (ip, &di) < 0)
2801 return -UNW_ENOINFO;
2805 "(name=`%s',segbase=%s,start=%s,end=%s,gp=%s,"
2806 "length=%s,data=%s)\n",
2807 hex_string (ip), (
char *)di.u.ti.name_ptr,
2808 hex_string (di.u.ti.segbase),
2809 hex_string (di.start_ip), hex_string (di.end_ip),
2811 pulongest (di.u.ti.table_len),
2812 hex_string ((CORE_ADDR)di.u.ti.table_data));
2816 ret = ia64_find_unwind_table (sec->
objfile, ip, &di, &buf);
2822 "(name=`%s',segbase=%s,start=%s,end=%s,gp=%s,"
2823 "length=%s,data=%s)\n",
2824 hex_string (ip), (
char *)di.u.rti.name_ptr,
2825 hex_string (di.u.rti.segbase),
2826 hex_string (di.start_ip), hex_string (di.end_ip),
2828 pulongest (di.u.rti.table_len),
2829 hex_string (di.u.rti.table_data));
2843ia64_put_unwind_info (unw_addr_space_t as,
2844 unw_proc_info_t *pip,
void *arg)
2852ia64_get_dyn_info_list (unw_addr_space_t as,
2853 unw_word_t *dilap,
void *arg)
2856 unw_word_t ip,
addr;
2861 return -UNW_ENOINFO;
2868 ip = text_sec->
addr ();
2869 ret = ia64_find_unwind_table (
objfile, ip, &di, &buf);
2880 "dynamic unwind table in objfile %s "
2883 hex_string (
addr), hex_string (di.gp));
2889 return -UNW_ENOINFO;
2896ia64_libunwind_frame_this_id (
frame_info_ptr this_frame,
void **this_cache,
2921 "libunwind frame id: code %s, stack %s, "
2922 "special %s, this_frame %s\n",
2926 host_address_to_string (this_frame));
2929static struct value *
2931 void **this_cache,
int regnum)
2958 rrb_pr = (cfm >> 32) & 0x3f;
2979 struct value *cfm_val;
2980 CORE_ADDR prev_bsp, prev_cfm;
3002ia64_libunwind_frame_sniffer (
const struct frame_unwind *self,
3013static const struct frame_unwind ia64_libunwind_frame_unwind =
3018 ia64_libunwind_frame_this_id,
3019 ia64_libunwind_frame_prev_register,
3021 ia64_libunwind_frame_sniffer,
3053 "libunwind sigtramp frame id: code %s, "
3054 "stack %s, special %s, this_frame %s\n",
3058 host_address_to_string (this_frame));
3061static struct value *
3062ia64_libunwind_sigtramp_frame_prev_register (
frame_info_ptr this_frame,
3063 void **this_cache,
int regnum)
3067 struct value *prev_ip_val;
3079 void *tmp_cache = NULL;
3084 return ia64_libunwind_frame_prev_register (this_frame, this_cache,
regnum);
3088ia64_libunwind_sigtramp_frame_sniffer (
const struct frame_unwind *self,
3102static const struct frame_unwind ia64_libunwind_sigtramp_frame_unwind =
3104 "ia64 libunwind sigtramp",
3107 ia64_libunwind_sigtramp_frame_this_id,
3108 ia64_libunwind_sigtramp_frame_prev_register,
3110 ia64_libunwind_sigtramp_frame_sniffer
3114unw_accessors_t ia64_unw_accessors =
3116 ia64_find_proc_info_x,
3117 ia64_put_unwind_info,
3118 ia64_get_dyn_info_list,
3130unw_accessors_t ia64_unw_rse_accessors =
3132 ia64_find_proc_info_x,
3133 ia64_put_unwind_info,
3134 ia64_get_dyn_info_list,
3136 ia64_access_rse_reg,
3137 ia64_access_rse_fpreg,
3149 &ia64_unw_accessors,
3150 &ia64_unw_rse_accessors,
3158 struct type *float_elt_type;
3162 if (!(
type->
code () == TYPE_CODE_STRUCT
3163 ||
type->
code () == TYPE_CODE_UNION
3164 ||
type->
code () == TYPE_CODE_ARRAY))
3172 if (float_elt_type != NULL
3186 return (
type->
code () == TYPE_CODE_STRUCT
3187 ||
type->
code () == TYPE_CODE_UNION);
3195 struct type *float_elt_type;
3198 if (float_elt_type != NULL)
3209 valbuf + offset, float_elt_type);
3210 offset += float_elt_type->
length ();
3242 memcpy ((
char *)valbuf + offset, ®val, reglen);
3250 memcpy ((
char *)valbuf + offset, &val, m);
3257 const gdb_byte *valbuf)
3260 struct type *float_elt_type;
3263 if (float_elt_type != NULL)
3275 offset += float_elt_type->
length ();
3290 memcpy (&val, (
char *)valbuf + offset, reglen);
3299 memcpy (&val, (
char *)valbuf + offset, m);
3308 gdb_byte *readbuf,
const gdb_byte *writebuf)
3312 if (writebuf != NULL)
3318 if (readbuf != NULL)
3337 return (*etp)->length () == t->
length ();
3344 case TYPE_CODE_ARRAY:
3349 case TYPE_CODE_STRUCT:
3374 struct type *et = 0;
3396 case TYPE_CODE_ARRAY:
3399 case TYPE_CODE_STRUCT:
3432 if (faddr_sect != NULL)
3436 if (strcmp (osect->the_bfd_section->name,
".dynamic") == 0)
3438 CORE_ADDR
addr = osect->addr ();
3439 CORE_ADDR
endaddr = osect->endaddr ();
3452 if (tag == DT_PLTGOT)
3454 CORE_ADDR global_pointer;
3465 return global_pointer;
3510 if (faddr_sect && strcmp (faddr_sect->
the_bfd_section->name,
".opd") == 0)
3513 if (faddr_sect != NULL)
3517 if (strcmp (osect->the_bfd_section->name,
".opd") == 0)
3519 CORE_ADDR
addr = osect->addr ();
3520 CORE_ADDR
endaddr = osect->endaddr ();
3533 if (faddr == faddr2)
3561 ULONGEST global_pointer;
3569 if (global_pointer == 0)
3640 ULONGEST cfm, pfs, new_bsp;
3648 pfs &= 0xc000000000000000LL;
3649 pfs |= (cfm & 0xffffffffffffLL);
3652 cfm &= 0xc000000000000000LL;
3662 int slotnum, gdb_byte *buf)
3678 int nargs,
struct value **args, CORE_ADDR sp,
3680 CORE_ADDR struct_addr)
3688 int nslots, rseslots, memslots, slotnum, nfuncargs;
3691 CORE_ADDR funcdescaddr, global_pointer;
3697 for (argno = 0; argno < nargs; argno++)
3706 if (
type->
code () == TYPE_CODE_FUNC)
3709 nslots += (len + 7) / 8;
3713 rseslots = (nslots > 8) ? 8 : nslots;
3714 memslots = nslots - rseslots;
3723 funcdescaddr = sp - nfuncargs * 16;
3724 funcdescaddr &= ~0xfLL;
3729 sp = sp - 16 - (memslots + nfuncargs) * 8;
3738 for (argno = 0; argno < nargs; argno++)
3740 struct type *float_elt_type;
3751 gdb_byte val_buf[8];
3753 (arg->
contents ().data (), 8, byte_order);
3757 if (slotnum < rseslots)
3761 write_memory (sp + 16 + 8 * (slotnum - rseslots), val_buf, 8);
3775 gdb_byte val_buf[8];
3777 memset (val_buf, 0, 8);
3784 (val_buf, 8, byte_order,
3799 memcpy (val_buf, arg->
contents ().data () + argoffset,
3800 (len > 8) ? 8 : len);
3803 if (slotnum < rseslots)
3807 write_memory (sp + 16 + 8 * (slotnum - rseslots), val_buf, 8);
3816 if (float_elt_type != NULL)
3828 argoffset += float_elt_type->
length ();
3829 len -= float_elt_type->
length ();
3837 (ULONGEST) struct_addr);
3841 if (global_pointer != 0)
3880 "dummy frame id: code %s, stack %s, special %s\n",
3892 CORE_ADDR ip, psr, pc;
3899 pc = (ip & ~0xf) | ((psr >> 41) & 3);
3915 return (cfm & 0x7f);
3988#ifdef HAVE_LIBUNWIND_IA64_H
3990 &ia64_libunwind_sigtramp_frame_unwind);
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)
unsigned int gdbarch_debug
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)
bool find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr, const struct block **block)
CORE_ADDR get_pc_function_start(CORE_ADDR pc)
enum register_status cooked_read(int regnum, gdb_byte *buf)
void cooked_write(int regnum, const gdb_byte *buf)
void write_memory(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
ULONGEST read_memory_unsigned_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
void read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
LONGEST read_memory_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
int is_vtable_name(const char *name)
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 frame_base_set_default(struct gdbarch *gdbarch, const struct frame_base *default_base)
const struct frame_id outer_frame_id
int default_frame_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_prologue_cache)
struct value * frame_unwind_got_memory(frame_info_ptr frame, int regnum, CORE_ADDR addr)
struct value * frame_unwind_got_register(frame_info_ptr frame, int regnum, int new_regnum)
enum unwind_stop_reason default_frame_unwind_stop_reason(frame_info_ptr this_frame, void **this_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)
CORE_ADDR get_frame_pc(frame_info_ptr frame)
struct frame_id frame_id_build_special(CORE_ADDR stack_addr, CORE_ADDR code_addr, CORE_ADDR special_addr)
void get_frame_register(frame_info_ptr frame, int regnum, gdb_byte *buf)
struct gdbarch * get_frame_arch(frame_info_ptr this_frame)
void frame_unwind_register(frame_info_ptr next_frame, int regnum, gdb_byte *buf)
CORE_ADDR get_frame_func(frame_info_ptr this_frame)
bool get_frame_register_bytes(frame_info_ptr frame, int regnum, CORE_ADDR offset, gdb::array_view< gdb_byte > buffer, int *optimizedp, int *unavailablep)
void put_frame_register(frame_info_ptr frame, int regnum, const gdb_byte *buf)
#define FRAME_OBSTACK_ZALLOC(TYPE)
void set_gdbarch_long_long_bit(struct gdbarch *gdbarch, int long_long_bit)
void set_gdbarch_unwind_pc(struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype *unwind_pc)
void set_gdbarch_convert_from_func_ptr_addr(struct gdbarch *gdbarch, gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr)
void set_gdbarch_register_to_value(struct gdbarch *gdbarch, gdbarch_register_to_value_ftype *register_to_value)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
void set_gdbarch_value_to_register(struct gdbarch *gdbarch, gdbarch_value_to_register_ftype *value_to_register)
void set_gdbarch_breakpoint_kind_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_kind_from_pc_ftype *breakpoint_kind_from_pc)
void set_gdbarch_frame_align(struct gdbarch *gdbarch, gdbarch_frame_align_ftype *frame_align)
void set_gdbarch_vtable_function_descriptors(struct gdbarch *gdbarch, int vtable_function_descriptors)
void set_gdbarch_write_pc(struct gdbarch *gdbarch, gdbarch_write_pc_ftype *write_pc)
void set_gdbarch_skip_prologue(struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue)
void set_gdbarch_register_name(struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name)
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)
CORE_ADDR gdbarch_skip_prologue_ftype(struct gdbarch *gdbarch, CORE_ADDR ip)
void set_gdbarch_fp0_regnum(struct gdbarch *gdbarch, int fp0_regnum)
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)
struct type * gdbarch_register_type_ftype(struct gdbarch *gdbarch, int reg_nr)
int gdbarch_sp_regnum(struct gdbarch *gdbarch)
void set_gdbarch_long_double_format(struct gdbarch *gdbarch, const struct floatformat **long_double_format)
void set_gdbarch_register_type(struct gdbarch *gdbarch, gdbarch_register_type_ftype *register_type)
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_short_bit(struct gdbarch *gdbarch, int short_bit)
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)
const gdb_byte * gdbarch_breakpoint_from_pc_ftype(struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
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_convert_register_p(struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p)
void set_gdbarch_pseudo_register_read(struct gdbarch *gdbarch, gdbarch_pseudo_register_read_ftype *pseudo_register_read)
void set_gdbarch_memory_remove_breakpoint(struct gdbarch *gdbarch, gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint)
void set_gdbarch_num_regs(struct gdbarch *gdbarch, int num_regs)
void set_gdbarch_long_double_bit(struct gdbarch *gdbarch, int long_double_bit)
const char * gdbarch_register_name_ftype(struct gdbarch *gdbarch, int regnr)
void set_gdbarch_dummy_id(struct gdbarch *gdbarch, gdbarch_dummy_id_ftype *dummy_id)
void set_gdbarch_read_pc(struct gdbarch *gdbarch, gdbarch_read_pc_ftype *read_pc)
void set_gdbarch_breakpoint_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc)
void set_gdbarch_push_dummy_call(struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call)
void set_gdbarch_memory_insert_breakpoint(struct gdbarch *gdbarch, gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint)
struct gdbarch * gdbarch_alloc(const struct gdbarch_info *info, gdbarch_tdep_up tdep)
std::unique_ptr< gdbarch_tdep_base > gdbarch_tdep_up
struct gdbarch * gdbarch_init_ftype(struct gdbarch_info info, struct gdbarch_list *arches)
function_call_return_method
struct type * init_float_type(type_allocator &alloc, int bit, const char *name, const struct floatformat **floatformats, enum bfd_endian byte_order)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
const struct floatformat * floatformats_i387_ext[BFD_ENDIAN_UNKNOWN]
struct type * check_typedef(struct type *type)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int status
struct value * libunwind_frame_prev_register(frame_info_ptr this_frame, void **this_cache, int regnum)
unw_word_t libunwind_find_dyn_list(unw_addr_space_t as, unw_dyn_info_t *di, void *arg)
int libunwind_frame_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_cache)
void libunwind_frame_this_id(frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id)
int libunwind_search_unwind_table(void *as, long ip, void *di, void *pi, int need_unwind_info, void *args)
int libunwind_get_reg_special(struct gdbarch *gdbarch, readable_regcache *regcache, int regnum, void *buf)
int libunwind_sigtramp_frame_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_cache)
void libunwind_frame_dealloc_cache(frame_info_ptr self, void *this_cache)
int libunwind_is_initialized(void)
void libunwind_frame_set_descr(struct gdbarch *gdbarch, struct libunwind_descr *descr)
static int ia64_struct_type_p(const struct type *type)
#define NUM_IA64_RAW_REGS
#define IS_NaT_COLLECTION_ADDR(addr)
static int ia64_sigtramp_frame_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_cache)
static int ia64_memory_insert_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
static void ia64_allocate_new_rse_frame(struct regcache *regcache, ULONGEST bsp, int sof)
static CORE_ADDR ia64_find_global_pointer_from_dynamic_section(struct gdbarch *gdbarch, CORE_ADDR faddr)
static long long extract_bit_field(const gdb_byte *bundle, int from, int len)
static long long slotN_contents(gdb_byte *bundle, int slotnum)
static gdbarch_breakpoint_from_pc_ftype ia64_breakpoint_from_pc
static void ia64_store_return_value(struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
static CORE_ADDR find_extant_func_descr(struct gdbarch *gdbarch, CORE_ADDR faddr)
static void ia64_extract_return_value(struct type *type, struct regcache *regcache, gdb_byte *valbuf)
static void ia64_frame_this_id(frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id)
static const struct floatformat * floatformats_ia64_ext[2]
static CORE_ADDR ia64_find_global_pointer(struct gdbarch *gdbarch, CORE_ADDR faddr)
static struct type * ia64_ext_type(struct gdbarch *gdbarch)
static int floatformat_valid(const struct floatformat *fmt, const void *from)
static gdbarch_init_ftype ia64_gdbarch_init
static void ia64_sigtramp_frame_this_id(frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id)
static enum ia64_instruction_type template_encoding_table[32][3]
static struct ia64_frame_cache * ia64_sigtramp_frame_cache(frame_info_ptr this_frame, void **this_cache)
static CORE_ADDR refine_prologue_limit(CORE_ADDR pc, CORE_ADDR lim_pc, int *trust_limit)
static enum register_status ia64_pseudo_register_read(struct gdbarch *gdbarch, readable_regcache *regcache, int regnum, gdb_byte *buf)
static void ia64_pseudo_register_write(struct gdbarch *gdbarch, struct regcache *regcache, int regnum, const gdb_byte *buf)
static struct ia64_frame_cache * ia64_alloc_frame_cache(void)
static const struct frame_base ia64_frame_base
static struct ia64_frame_cache * ia64_frame_cache(frame_info_ptr this_frame, void **this_cache)
static int ia64_register_reggroup_p(struct gdbarch *gdbarch, int regnum, const struct reggroup *group)
static enum return_value_convention ia64_return_value(struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
static CORE_ADDR ia64_unwind_pc(struct gdbarch *gdbarch, frame_info_ptr next_frame)
static int ia64_memory_remove_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
static struct value * ia64_frame_prev_register(frame_info_ptr this_frame, void **this_cache, int regnum)
static CORE_ADDR ia64_read_pc(readable_regcache *regcache)
static const struct ia64_infcall_ops ia64_infcall_ops
static int is_float_or_hfa_type_recurse(struct type *t, struct type **etp)
static CORE_ADDR rse_address_add(CORE_ADDR addr, int nslots)
static gdbarch_register_name_ftype ia64_register_name
static void ia64_value_to_register(frame_info_ptr frame, int regnum, struct type *valtype, const gdb_byte *in)
static CORE_ADDR ia64_frame_align(struct gdbarch *gdbarch, CORE_ADDR sp)
static gdbarch_skip_prologue_ftype ia64_skip_prologue
static void ia64_store_argument_in_slot(struct regcache *regcache, CORE_ADDR bsp, int slotnum, gdb_byte *buf)
static const char *const ia64_register_names[]
static int ia64_dwarf_reg_to_regnum(struct gdbarch *gdbarch, int reg)
static struct value * ia64_sigtramp_frame_prev_register(frame_info_ptr this_frame, void **this_cache, int regnum)
static int max_skip_non_prologue_insns
static void ia64_sigtramp_frame_init_saved_regs(frame_info_ptr this_frame, struct ia64_frame_cache *cache)
static CORE_ADDR fetch_instruction(CORE_ADDR addr, ia64_instruction_type *it, long long *instr)
static int slot_alignment_is_next_even(struct type *t)
static int ia64_use_struct_convention(struct type *type)
static CORE_ADDR ia64_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)
#define IA64_FP_REGISTER_SIZE
static CORE_ADDR find_func_descr(struct regcache *regcache, CORE_ADDR faddr, CORE_ADDR *fdaptr)
static int ia64_register_to_value(frame_info_ptr frame, int regnum, struct type *valtype, gdb_byte *out, int *optimizedp, int *unavailablep)
static struct type * is_float_or_hfa_type(struct type *t)
static CORE_ADDR ia64_frame_base_address(frame_info_ptr this_frame, void **this_cache)
static int ia64_convert_register_p(struct gdbarch *gdbarch, int regno, struct type *type)
static int ia64_size_of_register_frame(frame_info_ptr this_frame, ULONGEST cfm)
static CORE_ADDR ia64_convert_from_func_ptr_addr(struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
static const struct frame_unwind ia64_sigtramp_frame_unwind
static CORE_ADDR examine_prologue(CORE_ADDR pc, CORE_ADDR lim_pc, frame_info_ptr this_frame, struct ia64_frame_cache *cache)
static void ia64_set_function_addr(struct regcache *regcache, CORE_ADDR func_addr)
void _initialize_ia64_tdep()
void ia64_write_pc(struct regcache *regcache, CORE_ADDR new_pc)
static struct frame_id ia64_dummy_id(struct gdbarch *gdbarch, frame_info_ptr this_frame)
#define isScratch(_regnum_)
static const struct floatformat floatformat_ia64_ext_little
static int ia64_breakpoint_kind_from_pc(struct gdbarch *gdbarch, CORE_ADDR *pcptr)
static void replace_bit_field(gdb_byte *bundle, long long val, int from, int len)
static gdbarch_register_type_ftype ia64_register_type
static const struct frame_unwind ia64_frame_unwind
static int ia64_print_insn(bfd_vma memaddr, struct disassemble_info *info)
static const struct floatformat floatformat_ia64_ext_big
static void replace_slotN_contents(gdb_byte *bundle, long long instr, int slotnum)
#define IA64_GR127_REGNUM
#define IA64_NAT127_REGNUM
#define IA64_NAT32_REGNUM
#define IA64_NAT31_REGNUM
#define IA64_FR127_REGNUM
CORE_ADDR find_function_addr(struct value *function, struct type **retval_type, struct type **function_type)
struct inferior * current_inferior(void)
struct bound_minimal_symbol lookup_minimal_symbol_by_pc(CORE_ADDR pc)
struct obj_section * find_pc_section(CORE_ADDR pc)
#define SECT_OFF_TEXT(objfile)
void gdbarch_init_osabi(struct gdbarch_info info, struct gdbarch *gdbarch)
struct program_space * current_program_space
int register_size(struct gdbarch *gdbarch, int regnum)
enum register_status regcache_cooked_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
void regcache_cooked_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
struct type * register_type(struct gdbarch *gdbarch, int regnum)
const reggroup *const general_reggroup
const reggroup *const float_reggroup
const reggroup *const save_reggroup
const reggroup *const all_reggroup
const reggroup *const restore_reggroup
const reggroup *const vector_reggroup
struct minimal_symbol * minsym
gdb_byte shadow_contents[BREAKPOINT_MAX]
struct type * builtin_long
struct type * type() const
frame_this_id_ftype * this_id
const char * linkage_name() const
CORE_ADDR saved_regs[NUM_IA64_RAW_REGS]
int(* pc_in_sigtramp)(CORE_ADDR)
CORE_ADDR(* find_global_pointer_from_solib)(struct gdbarch *gdbarch, CORE_ADDR faddr)
CORE_ADDR(* sigcontext_register_address)(struct gdbarch *, CORE_ADDR, int)
struct type * ia64_ext_type
int(* size_of_register_frame)(frame_info_ptr this_frame, ULONGEST cfm)
CORE_ADDR endaddr() const
struct bfd_section * the_bfd_section
iterator_range< section_iterator > sections()
struct gdbarch * arch() const
CORE_ADDR text_section_offset() const
struct type * target_type() const
struct field & field(int idx) const
unsigned int num_fields() const
gdb::array_view< const gdb_byte > contents_all()
gdb::array_view< const gdb_byte > contents()
struct type * type() const
struct value::@203::@204 reg
struct symtab_and_line find_pc_line(CORE_ADDR pc, int notcurrent)
void target_float_convert(const gdb_byte *from, const struct type *from_type, gdb_byte *to, const struct type *to_type)
scoped_restore_tmpl< int > make_scoped_restore_show_memory_breakpoints(int show)
int target_write_memory(CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
int target_has_registers()
gdb::optional< gdb::byte_vector > target_read_alloc(struct target_ops *ops, enum target_object object, const char *annex)
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
int target_write_raw_memory(CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
@ TARGET_OBJECT_UNWIND_TABLE
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
void gdb_printf(struct ui_file *stream, const char *format,...)