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,
340 return (!vector_p && !float_p);
376 long long result = 0
LL;
378 int from_byte = from / 8;
379 int to_byte = to / 8;
380 unsigned char *b = (
unsigned char *) bundle;
386 if (from_byte == to_byte)
387 c = ((
unsigned char) (c << (8 - to % 8))) >> (8 - to % 8);
388 result = c >> (from % 8);
389 lshift = 8 - (from % 8);
391 for (i = from_byte+1; i < to_byte; i++)
393 result |= ((
long long) b[i]) << lshift;
397 if (from_byte < to_byte && (to % 8 != 0))
400 c = ((
unsigned char) (c << (8 - to % 8))) >> (8 - to % 8);
401 result |= ((
long long) c) << lshift;
413 int from_byte = from / 8;
414 int to_byte = to / 8;
415 unsigned char *b = (
unsigned char *) bundle;
418 if (from_byte == to_byte)
420 unsigned char left, right;
422 left = (c >> (to % 8)) << (to % 8);
423 right = ((
unsigned char) (c << (8 - from % 8))) >> (8 - from % 8);
424 c = (
unsigned char) (val & 0xff);
425 c = (
unsigned char) (c << (from % 8 + 8 - to % 8)) >> (8 - to % 8);
433 c = ((
unsigned char) (c << (8 - from % 8))) >> (8 - from % 8);
434 c = c | (val << (from % 8));
436 val >>= 8 - from % 8;
438 for (i = from_byte+1; i < to_byte; i++)
447 unsigned char cv = (
unsigned char) val;
449 c = c >> (to % 8) << (to % 8);
450 c |= ((
unsigned char) (cv << (8 - to % 8))) >> (8 - to % 8);
535 warning (_(
"Can't fetch instructions for slot numbers greater than 2.\n"
536 "Using slot 0 instead"));
551 if (slotnum == 2 || (slotnum == 1 && *it ==
L))
636#define IA64_BREAKPOINT 0x00003333300LL
645 long long instr_breakpoint;
650 error (_(
"Can't insert breakpoint for slot numbers greater than 2."));
659 scoped_restore restore_memory_0
667 shadow_slotnum = slotnum;
680 gdb_assert (slotnum == 2);
681 error (_(
"Can't insert breakpoint for non-existing slot X"));
688 gdb_assert (slotnum == 1);
704 scoped_restore restore_memory_1
716 internal_error (_(
"Address %s already contains a breakpoint."),
733 long long instr_breakpoint, instr_saved;
744 scoped_restore restore_memory_1
752 shadow_slotnum = slotnum;
762 gdb_assert (slotnum == 2);
763 warning (_(
"Cannot remove breakpoint at address %s from non-existing "
764 "X-type slot, memory has changed underneath"),
773 gdb_assert (slotnum == 1);
782 warning (_(
"Cannot remove breakpoint at address %s, "
783 "no break instruction at such address."),
790 memcpy (bundle_saved, bundle_mem,
BUNDLE_LEN);
818static const gdb_byte *
820 CORE_ADDR *pcptr,
int *lenptr)
822 CORE_ADDR addr = *pcptr;
825 long long instr_fetched;
830 error (_(
"Can't insert breakpoint for slot numbers greater than 2."));
837 scoped_restore restore_memory_0
849 shadow_slotnum = slotnum;
859 gdb_assert (slotnum == 2);
860 error (_(
"Can't insert breakpoint for non-existing slot X"));
864 gdb_assert (slotnum == 1);
872 instr_fetched &= 0x1003ffffc0LL;
875 return bundle + shadow_slotnum;
881 ULONGEST psr_value, pc_value;
886 slot_num = (psr_value >> 41) & 3;
898 psr_value &= ~(3LL << 41);
899 psr_value |= (ULONGEST)(slot_num & 0x3) << 41;
907#define IS_NaT_COLLECTION_ADDR(addr) ((((addr) >> 3) & 0x3f) == 0x3f)
915 int mandatory_nat_slots = nslots / 63;
916 int direction = nslots < 0 ? -1 : 1;
918 new_addr = addr + 8 * (nslots + mandatory_nat_slots);
920 if ((new_addr >> 9) != ((addr + 8 * 64 * mandatory_nat_slots) >> 9))
921 new_addr += 8 * direction;
924 new_addr += 8 * direction;
929static enum register_status
931 int regnum, gdb_byte *buf)
934 enum register_status
status;
938#ifdef HAVE_LIBUNWIND_IA64_H
988 byte_order, unatN_val);
992 ULONGEST natN_val = 0;
995 CORE_ADDR gr_addr = 0;
1015 CORE_ADDR nat_addr = gr_addr | 0x1f8;
1016 ULONGEST nat_collection;
1021 if (nat_addr >= bsp)
1025 nat_bit = (gr_addr >> 3) & 0x3f;
1026 natN_val = (nat_collection >> nat_bit) & 1;
1030 byte_order, natN_val);
1069 int rrb_pr = (cfm >> 32) & 0x3f;
1077 byte_order, prN_val);
1087 int regnum,
const gdb_byte *buf)
1108 ULONGEST unatN_val, unat, unatN_mask;
1115 unat &= ~unatN_mask;
1116 else if (unatN_val == 1)
1125 CORE_ADDR gr_addr = 0;
1140 if (gr_addr != 0 && (natN_val == 0 || natN_val == 1))
1143 CORE_ADDR nat_addr = gr_addr | 0x1f8;
1144 CORE_ADDR nat_collection;
1145 int natN_bit = (gr_addr >> 3) & 0x3f;
1146 ULONGEST natN_mask = (1LL << natN_bit);
1150 if (nat_addr >= bsp)
1156 nat_collection |= natN_mask;
1158 nat_collection &= ~natN_mask;
1164 gdb_byte nat_buf[8];
1167 nat_collection |= natN_mask;
1169 nat_collection &= ~natN_mask;
1171 byte_order, nat_collection);
1190 int rrb_pr = (cfm >> 32) & 0x3f;
1201 else if (prN_val == 1)
1220 struct type *valtype, gdb_byte *out,
1221 int *optimizedp,
int *unavailablep)
1228 gdb::make_array_view (in,
1231 optimizedp, unavailablep))
1235 *optimizedp = *unavailablep = 0;
1241 struct type *valtype,
const gdb_byte *in)
1271 CORE_ADDR start_pc =
pc;
1283 if (prologue_sal.
line != 0)
1286 CORE_ADDR addr = prologue_sal.
end;
1296 i > 0 && (lim_pc == 0 || addr < lim_pc);
1312 if (lim_pc == 0 || prologue_sal.
end < lim_pc)
1314 lim_pc = prologue_sal.
end;
1322#define isScratch(_regnum_) ((_regnum_) == 2 || (_regnum_) == 3 \
1323 || (8 <= (_regnum_) && (_regnum_) <= 11) \
1324 || (14 <= (_regnum_) && (_regnum_) <= 31))
1325#define imm9(_instr_) \
1326 ( ((((_instr_) & 0x01000000000LL) ? -1 : 0) << 8) \
1327 | (((_instr_) & 0x00008000000LL) >> 20) \
1328 | (((_instr_) & 0x00000001fc0LL) >> 6))
1364 CORE_ADDR last_prologue_pc =
pc;
1370 int unat_save_reg = 0;
1371 int pr_save_reg = 0;
1374 CORE_ADDR spill_addr = 0;
1377 char reg_contents[256];
1385 memset (instores, 0,
sizeof instores);
1386 memset (infpstores, 0,
sizeof infpstores);
1387 memset (reg_contents, 0,
sizeof reg_contents);
1398 if (
pc < lim_pc && next_pc
1399 && it ==
M && ((instr & 0x1ee0000003fLL) == 0x02c00000000LL))
1402 int sol_bits = (int) ((instr & 0x00007f00000LL) >> 20);
1403 int sof_bits = (int) ((instr & 0x000000fe000LL) >> 13);
1404 int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
1412 (sof_bits == (cache->
cfm & 0x7f) &&
1413 sol_bits == ((cache->
cfm >> 7) & 0x7f)))
1417 last_prologue_pc = next_pc;
1423 if (
pc < lim_pc && next_pc
1424 && (it ==
I || it ==
M)
1425 && ((instr & 0x1ee00000000LL) == 0x10800000000LL))
1428 int imm = (int) ((((instr & 0x01000000000LL) ? -1 : 0) << 13)
1429 | ((instr & 0x001f8000000LL) >> 20)
1430 | ((instr & 0x000000fe000LL) >> 13));
1431 int rM = (int) ((instr & 0x00007f00000LL) >> 20);
1432 int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
1433 int qp = (int) (instr & 0x0000000003fLL);
1434 if (qp == 0 && rN == 2 && imm == 0 && rM == 12 &&
fp_reg == 0)
1438 last_prologue_pc = next_pc;
1448 last_prologue_pc = lim_pc;
1460 if (it ==
B && ((instr & 0x1e1f800003fLL) != 0x04000000000LL))
1467 else if (((instr & 0x3fLL) != 0
LL) &&
1476 else if (it ==
I && ((instr & 0x1eff8000000LL) == 0x00188000000LL))
1479 int b2 = (int) ((instr & 0x0000000e000LL) >> 13);
1480 int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
1481 int qp = (int) (instr & 0x0000000003f);
1483 if (qp == 0 && b2 == 0 && rN >= 32 && ret_reg == 0)
1486 last_prologue_pc = next_pc;
1489 else if ((it ==
I || it ==
M)
1490 && ((instr & 0x1ee00000000LL) == 0x10800000000LL))
1493 int imm = (int) ((((instr & 0x01000000000LL) ? -1 : 0) << 13)
1494 | ((instr & 0x001f8000000LL) >> 20)
1495 | ((instr & 0x000000fe000LL) >> 13));
1496 int rM = (int) ((instr & 0x00007f00000LL) >> 20);
1497 int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
1498 int qp = (int) (instr & 0x0000000003fLL);
1500 if (qp == 0 && rN >= 32 && imm == 0 && rM == 12 &&
fp_reg == 0)
1504 last_prologue_pc = next_pc;
1506 else if (qp == 0 && rN == 12 && rM == 12)
1510 last_prologue_pc = next_pc;
1512 else if (qp == 0 && rN == 2
1535 last_prologue_pc = next_pc;
1537 else if (qp == 0 && rM >= 32 && rM < 40 && !instores[rM-32] &&
1538 rN < 256 && imm == 0)
1541 reg_contents[rN] = rM;
1542 last_prologue_pc = next_pc;
1548 last_prologue_pc = next_pc;
1553 && ( ((instr & 0x1efc0000000LL) == 0x0eec0000000LL)
1554 || ((instr & 0x1ffc8000000LL) == 0x0cec0000000LL) ))
1560 int imm =
imm9(instr);
1561 int rN = (int) ((instr & 0x00007f00000LL) >> 20);
1562 int fM = (int) ((instr & 0x000000fe000LL) >> 13);
1563 int qp = (int) (instr & 0x0000000003fLL);
1564 if (qp == 0 && rN == spill_reg && spill_addr != 0
1565 && ((2 <= fM && fM <= 5) || (16 <= fM && fM <= 31)))
1569 if ((instr & 0x1efc0000000LL) == 0x0eec0000000LL)
1573 last_prologue_pc = next_pc;
1576 else if ((it ==
M && ((instr & 0x1eff8000000LL) == 0x02110000000LL))
1577 || (it ==
I && ((instr & 0x1eff8000000LL) == 0x00050000000LL)) )
1583 int arM = (int) ((instr & 0x00007f00000LL) >> 20);
1584 int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
1585 int qp = (int) (instr & 0x0000000003fLL);
1586 if (qp == 0 &&
isScratch (rN) && arM == 36 )
1591 last_prologue_pc = next_pc;
1594 else if (it ==
I && ((instr & 0x1eff8000000LL) == 0x00198000000LL))
1597 int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
1598 int qp = (int) (instr & 0x0000000003fLL);
1602 last_prologue_pc = next_pc;
1606 && ( ((instr & 0x1ffc8000000LL) == 0x08cc0000000LL)
1607 || ((instr & 0x1efc0000000LL) == 0x0acc0000000LL)))
1612 int rN = (int) ((instr & 0x00007f00000LL) >> 20);
1613 int rM = (int) ((instr & 0x000000fe000LL) >> 13);
1614 int qp = (int) (instr & 0x0000000003fLL);
1615 int indirect = rM < 256 ? reg_contents[rM] : 0;
1616 if (qp == 0 && rN == spill_reg && spill_addr != 0
1617 && (rM == unat_save_reg || rM == pr_save_reg))
1623 if (rM == unat_save_reg)
1635 if ((instr & 0x1efc0000000LL) == 0x0acc0000000LL)
1637 spill_addr +=
imm9(instr);
1640 last_prologue_pc = next_pc;
1642 else if (qp == 0 && 32 <= rM && rM < 40 && !instores[rM-32])
1645 instores[rM-32] = 1;
1646 last_prologue_pc = next_pc;
1648 else if (qp == 0 && 32 <= indirect && indirect < 40 &&
1649 !instores[indirect-32])
1652 instores[indirect-32] = 1;
1653 last_prologue_pc = next_pc;
1656 else if (it ==
M && ((instr & 0x1ff08000000LL) == 0x08c00000000LL))
1667 int rM = (int) ((instr & 0x000000fe000LL) >> 13);
1668 int qp = (int) (instr & 0x0000000003fLL);
1669 int indirect = rM < 256 ? reg_contents[rM] : 0;
1670 if (qp == 0 && 32 <= rM && rM < 40 && !instores[rM-32])
1672 instores[rM-32] = 1;
1673 last_prologue_pc = next_pc;
1675 else if (qp == 0 && 32 <= indirect && indirect < 40 &&
1676 !instores[indirect-32])
1679 instores[indirect-32] = 1;
1680 last_prologue_pc = next_pc;
1683 else if (it ==
M && ((instr & 0x1ff88000000LL) == 0x0cc80000000LL))
1692 int fM = (int) ((instr & 0x000000fe000LL) >> 13);
1693 int qp = (int) (instr & 0x0000000003fLL);
1694 if (qp == 0 && 8 <= fM && fM < 16 && !infpstores[fM - 8])
1696 infpstores[fM-8] = 1;
1697 last_prologue_pc = next_pc;
1701 && ( ((instr & 0x1ffc8000000LL) == 0x08ec0000000LL)
1702 || ((instr & 0x1efc0000000LL) == 0x0aec0000000LL)))
1707 int rN = (int) ((instr & 0x00007f00000LL) >> 20);
1708 int rM = (int) ((instr & 0x000000fe000LL) >> 13);
1709 int qp = (int) (instr & 0x0000000003fLL);
1710 if (qp == 0 && rN == spill_reg && 4 <= rM && rM <= 7)
1716 if ((instr & 0x1efc0000000LL) == 0x0aec0000000LL)
1718 spill_addr +=
imm9(instr);
1721 last_prologue_pc = next_pc;
1744 rrb_gr = (cfm >> 18) & 0x7f;
1749 for (i = 0, addr = bof;
1757 if (i+32 == cfm_reg)
1759 if (i+32 == ret_reg)
1773 else if (cfm_reg != 0)
1782 sor = ((cfm >> 14) & 0xf) * 8;
1784 sol = (cfm >> 7) & 0x7f;
1785 rrb_gr = (cfm >> 18) & 0x7f;
1792 for (i = 0, addr = bof;
1802 + ((i + (sor - rrb_gr)) % sor)]
1812 if (trust_limit && lim_pc >= last_prologue_pc)
1813 last_prologue_pc = lim_pc;
1820 return last_prologue_pc;
1853 *this_cache = cache;
1869 cache->
sof = (
cfm & 0x7f);
1870 cache->
sol = (
cfm >> 7) & 0x7f;
1871 cache->
sor = ((
cfm >> 14) & 0xf) * 8;
1894 if (cache->
base != 0)
1898 "regular frame id: code %s, stack %s, "
1899 "special %s, this_frame %s\n",
1903 host_address_to_string (this_frame.
get ()));
1906static struct value *
1915 gdb_assert (
regnum >= 0);
1918 error (_(
"No registers."));
1926 CORE_ADDR prev_cfm, bsp, prev_bsp;
1973 struct value *pr_val;
1982 int rrb_pr = (cache->
cfm >> 32) & 0x3f;
1994 struct value *unat_val;
2015 CORE_ADDR nat_addr = gr_addr | 0x1f8;
2017 CORE_ADDR nat_collection;
2025 if (nat_addr >= bsp)
2032 nat_bit = (gr_addr >> 3) & 0x3f;
2033 natval = (nat_collection >> nat_bit) & 1;
2064 ULONGEST slot_num = 0;
2082 psr &= ~(3LL << 41);
2083 slot_num = pc & 0x3LL;
2084 psr |= (CORE_ADDR)slot_num << 41;
2111 struct value *reg_val;
2112 CORE_ADDR prev_cfm, prev_bsp, prev_bof;
2143 int rrb_fr = (cache->
cfm >> 25) & 0x7f;
2251 cache->
sof = cache->
cfm & 0x7f;
2255 *this_cache = cache;
2261 void **this_cache,
struct frame_id *this_id)
2272 "sigtramp frame id: code %s, stack %s, "
2273 "special %s, this_frame %s\n",
2277 host_address_to_string (this_frame.
get ()));
2280static struct value *
2282 void **this_cache,
int regnum)
2287 gdb_assert (
regnum >= 0);
2290 error (_(
"No registers."));
2379#ifdef HAVE_LIBUNWIND_IA64_H
2381struct ia64_unwind_table_entry
2383 unw_word_t start_offset;
2384 unw_word_t end_offset;
2385 unw_word_t info_offset;
2388static __inline__ uint64_t
2389ia64_rse_slot_num (uint64_t addr)
2391 return (addr >> 3) & 0x3f;
2396static __inline__ uint64_t
2397ia64_rse_skip_regs (uint64_t addr,
long num_regs)
2399 long delta = ia64_rse_slot_num(addr) + num_regs;
2403 return addr + ((num_regs + delta/0x3f) << 3);
2409ia64_gdb2uw_regnum (
int regnum)
2414 return UNW_IA64_BSP;
2430 return UNW_IA64_CFM;
2442ia64_uw2gdb_regnum (
int uw_regnum)
2444 if (uw_regnum == UNW_IA64_SP)
2446 else if (uw_regnum == UNW_IA64_BSP)
2448 else if ((
unsigned) (uw_regnum - UNW_IA64_GR) < 32)
2450 else if ((
unsigned) (uw_regnum - UNW_IA64_GR) < 128)
2452 else if ((
unsigned) (uw_regnum - UNW_IA64_FR) < 128)
2454 else if ((
unsigned) (uw_regnum - UNW_IA64_BR) < 8)
2456 else if (uw_regnum == UNW_IA64_PR)
2458 else if (uw_regnum == UNW_REG_IP)
2460 else if (uw_regnum == UNW_IA64_CFM)
2462 else if ((
unsigned) (uw_regnum - UNW_IA64_AR) < 128)
2464 else if ((
unsigned) (uw_regnum - UNW_IA64_NAT) < 128)
2473ia64_is_fpreg (
int uw_regnum)
2475 return unw_is_fpreg (uw_regnum);
2480ia64_access_reg (unw_addr_space_t as, unw_regnum_t uw_regnum, unw_word_t *val,
2481 int write,
void *arg)
2483 int regnum = ia64_uw2gdb_regnum (uw_regnum);
2484 unw_word_t bsp, sof, cfm, psr, ip;
2490 gdb_assert (!write);
2499 *val = ip | ((psr >> 41) & 0x3);
2502 case UNW_IA64_AR_BSP:
2510 *val = ia64_rse_skip_regs (bsp, -sof);
2513 case UNW_IA64_AR_BSPSTORE:
2527 " access_reg: from cache: %4s=%s\n",
2536ia64_access_fpreg (unw_addr_space_t as, unw_regnum_t uw_regnum,
2537 unw_fpreg_t *val,
int write,
void *arg)
2539 int regnum = ia64_uw2gdb_regnum (uw_regnum);
2543 gdb_assert (!write);
2552ia64_access_rse_reg (unw_addr_space_t as, unw_regnum_t uw_regnum,
2553 unw_word_t *val,
int write,
void *arg)
2555 int regnum = ia64_uw2gdb_regnum (uw_regnum);
2556 unw_word_t bsp, sof, cfm, psr, ip;
2561 gdb_assert (!write);
2570 *val = ip | ((psr >> 41) & 0x3);
2573 case UNW_IA64_AR_BSP:
2581 *val = ia64_rse_skip_regs (bsp, -sof);
2584 case UNW_IA64_AR_BSPSTORE:
2598 " access_rse_reg: from cache: %4s=%s\n",
2608ia64_access_rse_fpreg (unw_addr_space_t as, unw_regnum_t uw_regnum,
2609 unw_fpreg_t *val,
int write,
void *arg)
2611 int regnum = ia64_uw2gdb_regnum (uw_regnum);
2615 gdb_assert (!write);
2624ia64_access_mem (unw_addr_space_t as,
2625 unw_word_t addr, unw_word_t *val,
2626 int write,
void *arg)
2628 if (addr - KERNEL_START < ktab_size)
2630 unw_word_t *laddr = (unw_word_t*) ((
char *) ktab
2631 + (addr - KERNEL_START));
2648static gdb::optional<gdb::byte_vector>
2665get_kernel_table (unw_word_t ip, unw_dyn_info_t *di)
2667 static struct ia64_table_entry *etab;
2671 ktab_buf = getunwind_table ();
2673 return -UNW_ENOINFO;
2675 ktab = (
struct ia64_table_entry *) ktab_buf->data ();
2676 ktab_size = ktab_buf->size ();
2678 for (etab = ktab; etab->start_offset; ++etab)
2679 etab->info_offset += KERNEL_START;
2682 if (ip < ktab[0].start_offset || ip >= etab[-1].end_offset)
2683 return -UNW_ENOINFO;
2685 di->format = UNW_INFO_FORMAT_TABLE;
2687 di->start_ip = ktab[0].start_offset;
2688 di->end_ip = etab[-1].end_offset;
2689 di->u.ti.name_ptr = (unw_word_t)
"<kernel>";
2690 di->u.ti.segbase = 0;
2691 di->u.ti.table_len = ((
char *) etab - (
char *) ktab) /
sizeof (unw_word_t);
2692 di->u.ti.table_data = (unw_word_t *) ktab;
2696 "segbase=%s, length=%s, gp=%s\n",
2697 (
char *) di->u.ti.name_ptr,
2698 hex_string (di->u.ti.segbase),
2699 pulongest (di->u.ti.table_len),
2700 hex_string (di->gp));
2707 unw_dyn_info_t *dip,
void **buf)
2709 Elf_Internal_Phdr *phdr, *p_text = NULL, *p_unwind = NULL;
2710 Elf_Internal_Ehdr *ehdr;
2711 unw_word_t segbase = 0;
2712 CORE_ADDR load_base;
2718 ehdr = elf_tdata (bfd)->elf_header;
2719 phdr = elf_tdata (bfd)->phdr;
2723 for (i = 0; i < ehdr->e_phnum; ++i)
2725 switch (phdr[i].p_type)
2728 if ((unw_word_t) (ip - load_base - phdr[i].p_vaddr)
2733 case PT_IA_64_UNWIND:
2734 p_unwind = phdr + i;
2742 if (!p_text || !p_unwind)
2743 return -UNW_ENOINFO;
2750 segbase = p_text->p_vaddr + load_base;
2752 if ((p_unwind->p_vaddr - p_text->p_vaddr) >= p_text->p_memsz)
2755 for (i = 0; i < ehdr->e_phnum; ++i)
2757 if (phdr[i].p_type == PT_LOAD
2758 && (p_unwind->p_vaddr - phdr[i].p_vaddr) < phdr[i].p_memsz)
2763 segbase = phdr[i].p_vaddr + load_base;
2767 return -UNW_ENOINFO;
2770 dip->start_ip = p_text->p_vaddr + load_base;
2771 dip->end_ip = dip->start_ip + p_text->p_memsz;
2773 dip->format = UNW_INFO_FORMAT_REMOTE_TABLE;
2774 dip->u.rti.name_ptr = (unw_word_t) bfd_get_filename (bfd);
2775 dip->u.rti.segbase = segbase;
2776 dip->u.rti.table_len = p_unwind->p_memsz /
sizeof (unw_word_t);
2777 dip->u.rti.table_data = p_unwind->p_vaddr + load_base;
2784ia64_find_proc_info_x (unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
2785 int need_unwind_info,
void *arg)
2797 if (get_kernel_table (ip, &di) < 0)
2798 return -UNW_ENOINFO;
2802 "(name=`%s',segbase=%s,start=%s,end=%s,gp=%s,"
2803 "length=%s,data=%s)\n",
2804 hex_string (ip), (
char *)di.u.ti.name_ptr,
2805 hex_string (di.u.ti.segbase),
2806 hex_string (di.start_ip), hex_string (di.end_ip),
2808 pulongest (di.u.ti.table_len),
2809 hex_string ((CORE_ADDR)di.u.ti.table_data));
2813 ret = ia64_find_unwind_table (sec->
objfile, ip, &di, &buf);
2819 "(name=`%s',segbase=%s,start=%s,end=%s,gp=%s,"
2820 "length=%s,data=%s)\n",
2821 hex_string (ip), (
char *)di.u.rti.name_ptr,
2822 hex_string (di.u.rti.segbase),
2823 hex_string (di.start_ip), hex_string (di.end_ip),
2825 pulongest (di.u.rti.table_len),
2826 hex_string (di.u.rti.table_data));
2840ia64_put_unwind_info (unw_addr_space_t as,
2841 unw_proc_info_t *pip,
void *arg)
2849ia64_get_dyn_info_list (unw_addr_space_t as,
2850 unw_word_t *dilap,
void *arg)
2853 unw_word_t ip,
addr;
2858 return -UNW_ENOINFO;
2865 ip = text_sec->
addr ();
2866 ret = ia64_find_unwind_table (
objfile, ip, &di, &buf);
2877 "dynamic unwind table in objfile %s "
2880 hex_string (
addr), hex_string (di.gp));
2886 return -UNW_ENOINFO;
2893ia64_libunwind_frame_this_id (
frame_info_ptr this_frame,
void **this_cache,
2918 "libunwind frame id: code %s, stack %s, "
2919 "special %s, this_frame %s\n",
2923 host_address_to_string (this_frame));
2926static struct value *
2928 void **this_cache,
int regnum)
2955 rrb_pr = (cfm >> 32) & 0x3f;
2976 struct value *cfm_val;
2977 CORE_ADDR prev_bsp, prev_cfm;
2999ia64_libunwind_frame_sniffer (
const struct frame_unwind *self,
3010static const struct frame_unwind ia64_libunwind_frame_unwind =
3015 ia64_libunwind_frame_this_id,
3016 ia64_libunwind_frame_prev_register,
3018 ia64_libunwind_frame_sniffer,
3050 "libunwind sigtramp frame id: code %s, "
3051 "stack %s, special %s, this_frame %s\n",
3055 host_address_to_string (this_frame));
3058static struct value *
3059ia64_libunwind_sigtramp_frame_prev_register (
frame_info_ptr this_frame,
3060 void **this_cache,
int regnum)
3064 struct value *prev_ip_val;
3076 void *tmp_cache = NULL;
3081 return ia64_libunwind_frame_prev_register (this_frame, this_cache,
regnum);
3085ia64_libunwind_sigtramp_frame_sniffer (
const struct frame_unwind *self,
3099static const struct frame_unwind ia64_libunwind_sigtramp_frame_unwind =
3101 "ia64 libunwind sigtramp",
3104 ia64_libunwind_sigtramp_frame_this_id,
3105 ia64_libunwind_sigtramp_frame_prev_register,
3107 ia64_libunwind_sigtramp_frame_sniffer
3111unw_accessors_t ia64_unw_accessors =
3113 ia64_find_proc_info_x,
3114 ia64_put_unwind_info,
3115 ia64_get_dyn_info_list,
3127unw_accessors_t ia64_unw_rse_accessors =
3129 ia64_find_proc_info_x,
3130 ia64_put_unwind_info,
3131 ia64_get_dyn_info_list,
3133 ia64_access_rse_reg,
3134 ia64_access_rse_fpreg,
3146 &ia64_unw_accessors,
3147 &ia64_unw_rse_accessors,
3155 struct type *float_elt_type;
3159 if (!(
type->
code () == TYPE_CODE_STRUCT
3160 ||
type->
code () == TYPE_CODE_UNION
3161 ||
type->
code () == TYPE_CODE_ARRAY))
3169 if (float_elt_type != NULL
3183 return (
type->
code () == TYPE_CODE_STRUCT
3184 ||
type->
code () == TYPE_CODE_UNION);
3192 struct type *float_elt_type;
3195 if (float_elt_type != NULL)
3206 valbuf + offset, float_elt_type);
3207 offset += float_elt_type->
length ();
3239 memcpy ((
char *)valbuf + offset, ®val, reglen);
3247 memcpy ((
char *)valbuf + offset, &val, m);
3254 const gdb_byte *valbuf)
3257 struct type *float_elt_type;
3260 if (float_elt_type != NULL)
3272 offset += float_elt_type->
length ();
3287 memcpy (&val, (
char *)valbuf + offset, reglen);
3296 memcpy (&val, (
char *)valbuf + offset, m);
3305 gdb_byte *readbuf,
const gdb_byte *writebuf)
3309 if (writebuf != NULL)
3315 if (readbuf != NULL)
3334 return (*etp)->length () == t->
length ();
3341 case TYPE_CODE_ARRAY:
3346 case TYPE_CODE_STRUCT:
3371 struct type *et = 0;
3393 case TYPE_CODE_ARRAY:
3396 case TYPE_CODE_STRUCT:
3429 if (faddr_sect != NULL)
3455 if (tag == DT_PLTGOT)
3457 CORE_ADDR global_pointer;
3466 return global_pointer;
3508 if (faddr_sect && strcmp (faddr_sect->
the_bfd_section->name,
".opd") == 0)
3511 if (faddr_sect != NULL)
3536 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];
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,
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);
3989#ifdef HAVE_LIBUNWIND_IA64_H
3991 &ia64_libunwind_sigtramp_frame_unwind);
unsigned int gdbarch_debug
int default_print_insn(bfd_vma memaddr, disassemble_info *info)
static std::vector< const char * > arches
void gdbarch_register(enum bfd_architecture bfd_architecture, gdbarch_init_ftype *init, gdbarch_dump_tdep_ftype *dump_tdep)
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)
struct type *() gdbarch_register_type_ftype(struct gdbarch *gdbarch, int reg_nr)
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)
const char *() gdbarch_register_name_ftype(struct gdbarch *gdbarch, int regnr)
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)
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)
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)
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)
const gdb_byte *() gdbarch_breakpoint_from_pc_ftype(struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
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, struct gdbarch_tdep_base *tdep)
struct gdbarch *() gdbarch_init_ftype(struct gdbarch_info info, struct gdbarch_list *arches)
function_call_return_method
struct type * arch_float_type(struct gdbarch *gdbarch, int bit, const char *name, const struct floatformat **floatformats)
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 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)
#define ALL_OBJFILE_OSECTIONS(objfile, osect)
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
struct obj_section * sections_end
struct gdbarch * arch() const
struct obj_section * sections
CORE_ADDR text_section_offset() const
struct type * target_type() const
struct field & field(int idx) const
struct value::@195::@196 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,...)
struct type * value_type(const struct value *value)
gdb::array_view< const gdb_byte > value_contents_all(struct value *value)
gdb::array_view< const gdb_byte > value_contents(struct value *value)