24 #include "floatformat.h" 34 #include "elf/common.h" 42 #ifdef HAVE_LIBUNWIND_IA64_H 61 #define KERNEL_START 0xc000000000000000ULL 63 static size_t ktab_size = 0;
64 struct ia64_table_entry
66 uint64_t start_offset;
71 static struct ia64_table_entry *ktab = NULL;
104 #define SLOT_MULTIPLIER 1 108 #define BUNDLE_LEN 16 112 #if BREAKPOINT_MAX < BUNDLE_LEN - 2 113 # error "BREAKPOINT_MAX < BUNDLE_LEN - 2" 126 #define NUM_IA64_RAW_REGS 462 129 #define IA64_FP_REGISTER_SIZE 16 147 {
"r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
148 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
149 "r16",
"r17",
"r18",
"r19",
"r20",
"r21",
"r22",
"r23",
150 "r24",
"r25",
"r26",
"r27",
"r28",
"r29",
"r30",
"r31",
151 "",
"",
"",
"",
"",
"",
"",
"",
152 "",
"",
"",
"",
"",
"",
"",
"",
153 "",
"",
"",
"",
"",
"",
"",
"",
154 "",
"",
"",
"",
"",
"",
"",
"",
155 "",
"",
"",
"",
"",
"",
"",
"",
156 "",
"",
"",
"",
"",
"",
"",
"",
157 "",
"",
"",
"",
"",
"",
"",
"",
158 "",
"",
"",
"",
"",
"",
"",
"",
159 "",
"",
"",
"",
"",
"",
"",
"",
160 "",
"",
"",
"",
"",
"",
"",
"",
161 "",
"",
"",
"",
"",
"",
"",
"",
162 "",
"",
"",
"",
"",
"",
"",
"",
164 "f0",
"f1",
"f2",
"f3",
"f4",
"f5",
"f6",
"f7",
165 "f8",
"f9",
"f10",
"f11",
"f12",
"f13",
"f14",
"f15",
166 "f16",
"f17",
"f18",
"f19",
"f20",
"f21",
"f22",
"f23",
167 "f24",
"f25",
"f26",
"f27",
"f28",
"f29",
"f30",
"f31",
168 "f32",
"f33",
"f34",
"f35",
"f36",
"f37",
"f38",
"f39",
169 "f40",
"f41",
"f42",
"f43",
"f44",
"f45",
"f46",
"f47",
170 "f48",
"f49",
"f50",
"f51",
"f52",
"f53",
"f54",
"f55",
171 "f56",
"f57",
"f58",
"f59",
"f60",
"f61",
"f62",
"f63",
172 "f64",
"f65",
"f66",
"f67",
"f68",
"f69",
"f70",
"f71",
173 "f72",
"f73",
"f74",
"f75",
"f76",
"f77",
"f78",
"f79",
174 "f80",
"f81",
"f82",
"f83",
"f84",
"f85",
"f86",
"f87",
175 "f88",
"f89",
"f90",
"f91",
"f92",
"f93",
"f94",
"f95",
176 "f96",
"f97",
"f98",
"f99",
"f100",
"f101",
"f102",
"f103",
177 "f104",
"f105",
"f106",
"f107",
"f108",
"f109",
"f110",
"f111",
178 "f112",
"f113",
"f114",
"f115",
"f116",
"f117",
"f118",
"f119",
179 "f120",
"f121",
"f122",
"f123",
"f124",
"f125",
"f126",
"f127",
181 "",
"",
"",
"",
"",
"",
"",
"",
182 "",
"",
"",
"",
"",
"",
"",
"",
183 "",
"",
"",
"",
"",
"",
"",
"",
184 "",
"",
"",
"",
"",
"",
"",
"",
185 "",
"",
"",
"",
"",
"",
"",
"",
186 "",
"",
"",
"",
"",
"",
"",
"",
187 "",
"",
"",
"",
"",
"",
"",
"",
188 "",
"",
"",
"",
"",
"",
"",
"",
190 "b0",
"b1",
"b2",
"b3",
"b4",
"b5",
"b6",
"b7",
194 "pr",
"ip",
"psr",
"cfm",
196 "kr0",
"kr1",
"kr2",
"kr3",
"kr4",
"kr5",
"kr6",
"kr7",
197 "",
"",
"",
"",
"",
"",
"",
"",
198 "rsc",
"bsp",
"bspstore",
"rnat",
200 "eflag",
"csd",
"ssd",
"cflg",
"fsr",
"fir",
"fdr",
"",
201 "ccv",
"",
"",
"",
"unat",
"",
"",
"",
202 "fpsr",
"",
"",
"",
"itc",
203 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
204 "",
"",
"",
"",
"",
"",
"",
"",
"",
206 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
207 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
208 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
209 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
210 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
211 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
213 "nat0",
"nat1",
"nat2",
"nat3",
"nat4",
"nat5",
"nat6",
"nat7",
214 "nat8",
"nat9",
"nat10",
"nat11",
"nat12",
"nat13",
"nat14",
"nat15",
215 "nat16",
"nat17",
"nat18",
"nat19",
"nat20",
"nat21",
"nat22",
"nat23",
216 "nat24",
"nat25",
"nat26",
"nat27",
"nat28",
"nat29",
"nat30",
"nat31",
217 "nat32",
"nat33",
"nat34",
"nat35",
"nat36",
"nat37",
"nat38",
"nat39",
218 "nat40",
"nat41",
"nat42",
"nat43",
"nat44",
"nat45",
"nat46",
"nat47",
219 "nat48",
"nat49",
"nat50",
"nat51",
"nat52",
"nat53",
"nat54",
"nat55",
220 "nat56",
"nat57",
"nat58",
"nat59",
"nat60",
"nat61",
"nat62",
"nat63",
221 "nat64",
"nat65",
"nat66",
"nat67",
"nat68",
"nat69",
"nat70",
"nat71",
222 "nat72",
"nat73",
"nat74",
"nat75",
"nat76",
"nat77",
"nat78",
"nat79",
223 "nat80",
"nat81",
"nat82",
"nat83",
"nat84",
"nat85",
"nat86",
"nat87",
224 "nat88",
"nat89",
"nat90",
"nat91",
"nat92",
"nat93",
"nat94",
"nat95",
225 "nat96",
"nat97",
"nat98",
"nat99",
"nat100",
"nat101",
"nat102",
"nat103",
226 "nat104",
"nat105",
"nat106",
"nat107",
"nat108",
"nat109",
"nat110",
"nat111",
227 "nat112",
"nat113",
"nat114",
"nat115",
"nat116",
"nat117",
"nat118",
"nat119",
228 "nat120",
"nat121",
"nat122",
"nat123",
"nat124",
"nat125",
"nat126",
"nat127",
232 "r32",
"r33",
"r34",
"r35",
"r36",
"r37",
"r38",
"r39",
233 "r40",
"r41",
"r42",
"r43",
"r44",
"r45",
"r46",
"r47",
234 "r48",
"r49",
"r50",
"r51",
"r52",
"r53",
"r54",
"r55",
235 "r56",
"r57",
"r58",
"r59",
"r60",
"r61",
"r62",
"r63",
236 "r64",
"r65",
"r66",
"r67",
"r68",
"r69",
"r70",
"r71",
237 "r72",
"r73",
"r74",
"r75",
"r76",
"r77",
"r78",
"r79",
238 "r80",
"r81",
"r82",
"r83",
"r84",
"r85",
"r86",
"r87",
239 "r88",
"r89",
"r90",
"r91",
"r92",
"r93",
"r94",
"r95",
240 "r96",
"r97",
"r98",
"r99",
"r100",
"r101",
"r102",
"r103",
241 "r104",
"r105",
"r106",
"r107",
"r108",
"r109",
"r110",
"r111",
242 "r112",
"r113",
"r114",
"r115",
"r116",
"r117",
"r118",
"r119",
243 "r120",
"r121",
"r122",
"r123",
"r124",
"r125",
"r126",
"r127",
245 "p0",
"p1",
"p2",
"p3",
"p4",
"p5",
"p6",
"p7",
246 "p8",
"p9",
"p10",
"p11",
"p12",
"p13",
"p14",
"p15",
247 "p16",
"p17",
"p18",
"p19",
"p20",
"p21",
"p22",
"p23",
248 "p24",
"p25",
"p26",
"p27",
"p28",
"p29",
"p30",
"p31",
249 "p32",
"p33",
"p34",
"p35",
"p36",
"p37",
"p38",
"p39",
250 "p40",
"p41",
"p42",
"p43",
"p44",
"p45",
"p46",
"p47",
251 "p48",
"p49",
"p50",
"p51",
"p52",
"p53",
"p54",
"p55",
252 "p56",
"p57",
"p58",
"p59",
"p60",
"p61",
"p62",
"p63",
293 floatformat_little, 82, 0, 1, 17, 65535, 0x1ffff, 18, 64,
299 floatformat_big, 82, 46, 47, 17, 65535, 0x1ffff, 64, 64,
339 return (!vector_p && !float_p);
375 long long result = 0LL;
377 int from_byte = from / 8;
378 int to_byte = to / 8;
379 unsigned char *b = (
unsigned char *) bundle;
385 if (from_byte == to_byte)
386 c = ((
unsigned char) (c << (8 - to % 8))) >> (8 - to % 8);
387 result = c >> (from % 8);
388 lshift = 8 - (from % 8);
390 for (i = from_byte+1; i < to_byte; i++)
392 result |= ((
long long) b[i]) << lshift;
396 if (from_byte < to_byte && (to % 8 != 0))
399 c = ((
unsigned char) (c << (8 - to % 8))) >> (8 - to % 8);
400 result |= ((
long long) c) << lshift;
412 int from_byte = from / 8;
413 int to_byte = to / 8;
414 unsigned char *b = (
unsigned char *) bundle;
417 if (from_byte == to_byte)
419 unsigned char left, right;
421 left = (c >> (to % 8)) << (to % 8);
422 right = ((
unsigned char) (c << (8 - from % 8))) >> (8 - from % 8);
423 c = (
unsigned char) (val & 0xff);
424 c = (
unsigned char) (c << (from % 8 + 8 - to % 8)) >> (8 - to % 8);
432 c = ((
unsigned char) (c << (8 - from % 8))) >> (8 - from % 8);
433 c = c | (val << (from % 8));
435 val >>= 8 - from % 8;
437 for (i = from_byte+1; i < to_byte; i++)
446 unsigned char cv = (
unsigned char) val;
448 c = c >> (to % 8) << (to % 8);
449 c |= ((
unsigned char) (cv << (8 - to % 8))) >> (8 - to % 8);
534 warning (
_(
"Can't fetch instructions for slot numbers greater than 2.\n" 535 "Using slot 0 instead"));
550 if (slotnum == 2 || (slotnum == 1 && *it ==
L))
635 #define IA64_BREAKPOINT 0x00003333300LL 644 long long instr_breakpoint;
649 error (
_(
"Can't insert breakpoint for slot numbers greater than 2."));
666 shadow_slotnum = slotnum;
680 error (
_(
"Can't insert breakpoint for non-existing slot X"));
716 _(
"Address %s already contains a breakpoint."),
733 long long instr_breakpoint, instr_saved;
752 shadow_slotnum = slotnum;
763 warning (
_(
"Cannot remove breakpoint at address %s from non-existing " 764 "X-type slot, memory has changed underneath"),
782 warning (
_(
"Cannot remove breakpoint at address %s, " 783 "no break instruction at such address."),
790 memcpy (bundle_saved, bundle_mem,
BUNDLE_LEN);
825 long long instr_fetched;
830 error (
_(
"Can't insert breakpoint for slot numbers greater than 2."));
849 shadow_slotnum = slotnum;
860 error (
_(
"Can't insert breakpoint for non-existing slot X"));
872 instr_fetched &= 0x1003ffffc0LL;
875 return bundle + shadow_slotnum;
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;
938 #ifdef HAVE_LIBUNWIND_IA64_H 990 byte_order, unatN_val);
1021 if (nat_addr >= bsp)
1026 nat_bit = (gr_addr >> 3) & 0x3f;
1027 natN_val = (nat_collection >> nat_bit) & 1;
1031 byte_order, natN_val);
1068 int rrb_pr = (cfm >> 32) & 0x3f;
1076 byte_order, prN_val);
1107 ULONGEST unatN_val, unat, unatN_mask;
1114 unat &= ~unatN_mask;
1115 else if (unatN_val == 1)
1139 if (gr_addr != 0 && (natN_val == 0 || natN_val == 1))
1144 int natN_bit = (gr_addr >> 3) & 0x3f;
1145 ULONGEST natN_mask = (1LL << natN_bit);
1149 if (nat_addr >= bsp)
1155 nat_collection |= natN_mask;
1157 nat_collection &= ~natN_mask;
1166 nat_collection |= natN_mask;
1168 nat_collection &= ~natN_mask;
1170 byte_order, nat_collection);
1189 int rrb_pr = (cfm >> 32) & 0x3f;
1200 else if (prN_val == 1)
1220 int *optimizedp,
int *unavailablep)
1228 in, optimizedp, unavailablep))
1232 *optimizedp = *unavailablep = 0;
1280 if (prologue_sal.
line != 0)
1293 i > 0 && (lim_pc == 0 || addr < lim_pc);
1301 if (sal.line <= prologue_sal.
line 1302 && sal.symtab == prologue_sal.
symtab)
1309 if (lim_pc == 0 || prologue_sal.
end < lim_pc)
1311 lim_pc = prologue_sal.
end;
1319 #define isScratch(_regnum_) ((_regnum_) == 2 || (_regnum_) == 3 \ 1320 || (8 <= (_regnum_) && (_regnum_) <= 11) \ 1321 || (14 <= (_regnum_) && (_regnum_) <= 31)) 1322 #define imm9(_instr_) \ 1323 ( ((((_instr_) & 0x01000000000LL) ? -1 : 0) << 8) \ 1324 | (((_instr_) & 0x00008000000LL) >> 20) \ 1325 | (((_instr_) & 0x00000001fc0LL) >> 6)) 1367 int unat_save_reg = 0;
1368 int pr_save_reg = 0;
1374 char reg_contents[256];
1382 memset (instores, 0,
sizeof instores);
1383 memset (infpstores, 0,
sizeof infpstores);
1384 memset (reg_contents, 0,
sizeof reg_contents);
1395 if (
pc < lim_pc && next_pc
1396 && it ==
M && ((instr & 0x1ee0000003fLL) == 0x02c00000000LL))
1399 int sol = (int) ((instr & 0x00007f00000LL) >> 20);
1400 int sof = (int) ((instr & 0x000000fe000LL) >> 13);
1401 int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
1409 (
sof == (cache->
cfm & 0x7f) &&
1410 sol == ((cache->
cfm >> 7) & 0x7f)))
1414 last_prologue_pc = next_pc;
1420 if (
pc < lim_pc && next_pc
1421 && (it ==
I || it ==
M)
1422 && ((instr & 0x1ee00000000LL) == 0x10800000000LL))
1425 int imm = (int) ((((instr & 0x01000000000LL) ? -1 : 0) << 13)
1426 | ((instr & 0x001f8000000LL) >> 20)
1427 | ((instr & 0x000000fe000LL) >> 13));
1428 int rM = (int) ((instr & 0x00007f00000LL) >> 20);
1429 int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
1430 int qp = (int) (instr & 0x0000000003fLL);
1431 if (qp == 0 && rN == 2 && imm == 0 && rM == 12 &&
fp_reg == 0)
1435 last_prologue_pc = next_pc;
1445 last_prologue_pc = lim_pc;
1457 if (it ==
B && ((instr & 0x1e1f800003fLL) != 0x04000000000LL))
1464 else if (((instr & 0x3fLL) != 0LL) &&
1473 else if (it ==
I && ((instr & 0x1eff8000000LL) == 0x00188000000LL))
1476 int b2 = (int) ((instr & 0x0000000e000LL) >> 13);
1477 int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
1478 int qp = (int) (instr & 0x0000000003f);
1480 if (qp == 0 && b2 == 0 && rN >= 32 && ret_reg == 0)
1483 last_prologue_pc = next_pc;
1486 else if ((it ==
I || it ==
M)
1487 && ((instr & 0x1ee00000000LL) == 0x10800000000LL))
1490 int imm = (int) ((((instr & 0x01000000000LL) ? -1 : 0) << 13)
1491 | ((instr & 0x001f8000000LL) >> 20)
1492 | ((instr & 0x000000fe000LL) >> 13));
1493 int rM = (int) ((instr & 0x00007f00000LL) >> 20);
1494 int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
1495 int qp = (int) (instr & 0x0000000003fLL);
1497 if (qp == 0 && rN >= 32 && imm == 0 && rM == 12 &&
fp_reg == 0)
1501 last_prologue_pc = next_pc;
1503 else if (qp == 0 && rN == 12 && rM == 12)
1507 last_prologue_pc = next_pc;
1509 else if (qp == 0 && rN == 2
1531 spill_addr = saved_sp
1532 + (rM == 12 ? 0 : mem_stack_frame_size)
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;
1544 else if (frameless && qp == 0 && rN == fp_reg && imm == 0 &&
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;
1732 if (!frameless && this_frame)
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",
1906 static struct value *
1918 error (
_(
"No registers."));
1973 struct value *pr_val;
1982 int rrb_pr = (cache->
cfm >> 32) & 0x3f;
1994 struct value *unat_val;
2025 if (nat_addr >= bsp)
2032 nat_bit = (gr_addr >> 3) & 0x3f;
2033 natval = (nat_collection >> nat_bit) & 1;
2082 psr &= ~(3LL << 41);
2083 slot_num = pc & 0x3LL;
2111 struct value *reg_val;
2143 int rrb_fr = (cache->
cfm >> 25) & 0x7f;
2250 cache->
sof = cache->
cfm & 0x7f;
2254 *this_cache = cache;
2260 void **this_cache,
struct frame_id *this_id)
2271 "sigtramp frame id: code %s, stack %s, " 2272 "special %s, this_frame %s\n",
2279 static struct value *
2281 void **this_cache,
int regnum)
2289 error (
_(
"No registers."));
2376 #ifdef HAVE_LIBUNWIND_IA64_H 2378 struct ia64_unwind_table_entry
2380 unw_word_t start_offset;
2381 unw_word_t end_offset;
2382 unw_word_t info_offset;
2385 static __inline__ uint64_t
2386 ia64_rse_slot_num (uint64_t addr)
2388 return (addr >> 3) & 0x3f;
2393 static __inline__ uint64_t
2394 ia64_rse_skip_regs (uint64_t addr,
long num_regs)
2396 long delta = ia64_rse_slot_num(addr) + num_regs;
2400 return addr + ((num_regs + delta/0x3f) << 3);
2406 ia64_gdb2uw_regnum (
int regnum)
2411 return UNW_IA64_BSP;
2427 return UNW_IA64_CFM;
2439 ia64_uw2gdb_regnum (
int uw_regnum)
2441 if (uw_regnum == UNW_IA64_SP)
2443 else if (uw_regnum == UNW_IA64_BSP)
2445 else if ((
unsigned) (uw_regnum - UNW_IA64_GR) < 32)
2447 else if ((
unsigned) (uw_regnum - UNW_IA64_GR) < 128)
2449 else if ((
unsigned) (uw_regnum - UNW_IA64_FR) < 128)
2451 else if ((
unsigned) (uw_regnum - UNW_IA64_BR) < 8)
2453 else if (uw_regnum == UNW_IA64_PR)
2455 else if (uw_regnum == UNW_REG_IP)
2457 else if (uw_regnum == UNW_IA64_CFM)
2459 else if ((
unsigned) (uw_regnum - UNW_IA64_AR) < 128)
2461 else if ((
unsigned) (uw_regnum - UNW_IA64_NAT) < 128)
2470 ia64_is_fpreg (
int uw_regnum)
2472 return unw_is_fpreg (uw_regnum);
2477 ia64_access_reg (unw_addr_space_t as, unw_regnum_t uw_regnum, unw_word_t *val,
2478 int write,
void *arg)
2480 int regnum = ia64_uw2gdb_regnum (uw_regnum);
2481 unw_word_t bsp, sof, cfm, psr, ip;
2485 long new_sof, old_sof;
2497 *val = ip | ((psr >> 41) & 0x3);
2500 case UNW_IA64_AR_BSP:
2508 *val = ia64_rse_skip_regs (bsp, -sof);
2511 case UNW_IA64_AR_BSPSTORE:
2525 " access_reg: from cache: %4s=%s\n",
2534 ia64_access_fpreg (unw_addr_space_t as, unw_regnum_t uw_regnum,
2535 unw_fpreg_t *val,
int write,
void *arg)
2537 int regnum = ia64_uw2gdb_regnum (uw_regnum);
2550 ia64_access_rse_reg (unw_addr_space_t as, unw_regnum_t uw_regnum,
2551 unw_word_t *val,
int write,
void *arg)
2553 int regnum = ia64_uw2gdb_regnum (uw_regnum);
2554 unw_word_t bsp, sof, cfm, psr, ip;
2558 long new_sof, old_sof;
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",
2608 ia64_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);
2624 ia64_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));
2669 get_kernel_table (unw_word_t ip, unw_dyn_info_t *di)
2671 static struct ia64_table_entry *etab;
2678 size = getunwind_table (&ktab_buf);
2680 return -UNW_ENOINFO;
2682 ktab = (
struct ia64_table_entry *) ktab_buf;
2685 for (etab = ktab; etab->start_offset; ++etab)
2686 etab->info_offset += KERNEL_START;
2689 if (ip < ktab[0].start_offset || ip >= etab[-1].end_offset)
2690 return -UNW_ENOINFO;
2692 di->format = UNW_INFO_FORMAT_TABLE;
2694 di->start_ip = ktab[0].start_offset;
2695 di->end_ip = etab[-1].end_offset;
2696 di->u.ti.name_ptr = (unw_word_t)
"<kernel>";
2697 di->u.ti.segbase = 0;
2698 di->u.ti.table_len = ((
char *) etab - (
char *) ktab) /
sizeof (unw_word_t);
2699 di->u.ti.table_data = (unw_word_t *) ktab;
2703 "segbase=%s, length=%s, gp=%s\n",
2704 (
char *) di->u.ti.name_ptr,
2714 unw_dyn_info_t *dip,
void **buf)
2716 Elf_Internal_Phdr *phdr, *p_text = NULL, *p_unwind = NULL;
2717 Elf_Internal_Ehdr *ehdr;
2718 unw_word_t segbase = 0;
2725 ehdr = elf_tdata (bfd)->elf_header;
2726 phdr = elf_tdata (bfd)->phdr;
2730 for (i = 0; i < ehdr->e_phnum; ++i)
2732 switch (phdr[i].p_type)
2735 if ((unw_word_t) (ip - load_base - phdr[i].p_vaddr)
2740 case PT_IA_64_UNWIND:
2741 p_unwind = phdr + i;
2749 if (!p_text || !p_unwind)
2750 return -UNW_ENOINFO;
2757 segbase = p_text->p_vaddr + load_base;
2759 if ((p_unwind->p_vaddr - p_text->p_vaddr) >= p_text->p_memsz)
2762 for (i = 0; i < ehdr->e_phnum; ++i)
2764 if (phdr[i].p_type == PT_LOAD
2765 && (p_unwind->p_vaddr - phdr[i].p_vaddr) < phdr[i].p_memsz)
2770 segbase = phdr[i].p_vaddr + load_base;
2774 return -UNW_ENOINFO;
2777 dip->start_ip = p_text->p_vaddr + load_base;
2778 dip->end_ip = dip->start_ip + p_text->p_memsz;
2780 dip->format = UNW_INFO_FORMAT_REMOTE_TABLE;
2781 dip->u.rti.name_ptr = (unw_word_t) bfd_get_filename (bfd);
2782 dip->u.rti.segbase = segbase;
2783 dip->u.rti.table_len = p_unwind->p_memsz /
sizeof (unw_word_t);
2784 dip->u.rti.table_data = p_unwind->p_vaddr + load_base;
2791 ia64_find_proc_info_x (unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
2792 int need_unwind_info,
void *arg)
2804 if (get_kernel_table (ip, &di) < 0)
2805 return -UNW_ENOINFO;
2809 "(name=`%s',segbase=%s,start=%s,end=%s,gp=%s," 2810 "length=%s,data=%s)\n",
2820 ret = ia64_find_unwind_table (sec->
objfile, ip, &di, &buf);
2826 "(name=`%s',segbase=%s,start=%s,end=%s,gp=%s," 2827 "length=%s,data=%s)\n",
2847 ia64_put_unwind_info (unw_addr_space_t as,
2848 unw_proc_info_t *pip,
void *arg)
2856 ia64_get_dyn_info_list (unw_addr_space_t as,
2857 unw_word_t *dilap,
void *arg)
2861 unw_word_t ip, addr;
2866 return -UNW_ENOINFO;
2874 ret = ia64_find_unwind_table (
objfile, ip, &di, &buf);
2885 "dynamic unwind table in objfile %s " 2894 return -UNW_ENOINFO;
2901 ia64_libunwind_frame_this_id (
struct frame_info *this_frame,
void **this_cache,
2926 "libunwind frame id: code %s, stack %s, " 2927 "special %s, this_frame %s\n",
2934 static struct value *
2935 ia64_libunwind_frame_prev_register (
struct frame_info *this_frame,
2936 void **this_cache,
int regnum)
2963 rrb_pr = (cfm >> 32) & 0x3f;
2984 struct value *cfm_val;
3007 ia64_libunwind_frame_sniffer (
const struct frame_unwind *
self,
3018 static const struct frame_unwind ia64_libunwind_frame_unwind =
3022 ia64_libunwind_frame_this_id,
3023 ia64_libunwind_frame_prev_register,
3025 ia64_libunwind_frame_sniffer,
3030 ia64_libunwind_sigtramp_frame_this_id (
struct frame_info *this_frame,
3058 "libunwind sigtramp frame id: code %s, " 3059 "stack %s, special %s, this_frame %s\n",
3066 static struct value *
3067 ia64_libunwind_sigtramp_frame_prev_register (
struct frame_info *this_frame,
3068 void **this_cache,
int regnum)
3072 struct value *prev_ip_val;
3084 void *tmp_cache = NULL;
3089 return ia64_libunwind_frame_prev_register (this_frame, this_cache,
regnum);
3093 ia64_libunwind_sigtramp_frame_sniffer (
const struct frame_unwind *
self,
3107 static const struct frame_unwind ia64_libunwind_sigtramp_frame_unwind =
3111 ia64_libunwind_sigtramp_frame_this_id,
3112 ia64_libunwind_sigtramp_frame_prev_register,
3114 ia64_libunwind_sigtramp_frame_sniffer
3118 unw_accessors_t ia64_unw_accessors =
3120 ia64_find_proc_info_x,
3121 ia64_put_unwind_info,
3122 ia64_get_dyn_info_list,
3134 unw_accessors_t ia64_unw_rse_accessors =
3136 ia64_find_proc_info_x,
3137 ia64_put_unwind_info,
3138 ia64_get_dyn_info_list,
3140 ia64_access_rse_reg,
3141 ia64_access_rse_fpreg,
3153 &ia64_unw_accessors,
3154 &ia64_unw_rse_accessors,
3162 struct type *float_elt_type;
3176 if (float_elt_type != NULL
3199 struct type *float_elt_type;
3202 if (float_elt_type != NULL)
3213 valbuf +
offset, float_elt_type);
3246 memcpy ((
char *)valbuf +
offset, &val, reglen);
3254 memcpy ((
char *)valbuf +
offset, &val,
m);
3264 struct type *float_elt_type;
3267 if (float_elt_type != NULL)
3295 memcpy (&val, (
char *)valbuf +
offset, reglen);
3303 memcpy (&val, (
char *)valbuf +
offset,
m);
3316 if (writebuf != NULL)
3322 if (readbuf != NULL)
3374 static struct type *
3377 struct type *et = 0;
3435 if (faddr_sect != NULL)
3452 while (addr < endaddr)
3463 if (tag == DT_PLTGOT)
3474 return global_pointer;
3516 if (faddr_sect && strcmp (faddr_sect->
the_bfd_section->name,
".opd") == 0)
3519 if (faddr_sect != NULL)
3535 while (addr < endaddr)
3546 if (faddr == faddr2)
3579 if (global_pointer == 0)
3658 pfs &= 0xc000000000000000LL;
3659 pfs |= (cfm & 0xffffffffffffLL);
3662 cfm &= 0xc000000000000000LL;
3697 int nslots, rseslots, memslots, slotnum, nfuncargs;
3706 for (argno = 0; argno < nargs; argno++)
3718 nslots += (len + 7) / 8;
3722 rseslots = (nslots > 8) ? 8 : nslots;
3723 memslots = nslots - rseslots;
3732 funcdescaddr = sp - nfuncargs * 16;
3733 funcdescaddr &= ~0xfLL;
3738 sp = sp - 16 - (memslots + nfuncargs) * 8;
3747 for (argno = 0; argno < nargs; argno++)
3749 struct type *float_elt_type;
3766 if (slotnum < rseslots)
3770 write_memory (sp + 16 + 8 * (slotnum - rseslots), val_buf, 8);
3793 (val_buf, 8, byte_order,
3809 (len > 8) ? 8 : len);
3812 if (slotnum < rseslots)
3816 write_memory (sp + 16 + 8 * (slotnum - rseslots), val_buf, 8);
3825 if (float_elt_type != NULL)
3852 if (global_pointer != 0)
3891 "dummy frame id: code %s, stack %s, special %s\n",
3910 pc = (ip & ~0xf) | ((psr >> 41) & 3);
3926 return (cfm & 0x7f);
4001 #ifdef HAVE_LIBUNWIND_IA64_H 4003 &ia64_libunwind_sigtramp_frame_unwind);
void set_gdbarch_num_regs(struct gdbarch *gdbarch, int num_regs)
static CORE_ADDR rse_address_add(CORE_ADDR addr, int nslots)
static long long extract_bit_field(const gdb_byte *bundle, int from, int len)
void set_gdbarch_double_bit(struct gdbarch *gdbarch, int double_bit)
void set_gdbarch_frame_align(struct gdbarch *gdbarch, gdbarch_frame_align_ftype frame_align)
void set_gdbarch_value_to_register(struct gdbarch *gdbarch, gdbarch_value_to_register_ftype value_to_register)
char * hex_string(LONGEST num)
#define target_has_registers
void libunwind_frame_set_descr(struct gdbarch *gdbarch, struct libunwind_descr *descr)
#define SECT_OFF_TEXT(objfile)
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, int struct_return, CORE_ADDR struct_addr)
void set_gdbarch_float_bit(struct gdbarch *gdbarch, int float_bit)
CORE_ADDR get_frame_pc(struct frame_info *frame)
void set_gdbarch_fp0_regnum(struct gdbarch *gdbarch, int fp0_regnum)
#define MSYMBOL_LINKAGE_NAME(symbol)
struct type * ia64_ext_type
static void replace_bit_field(gdb_byte *bundle, long long val, int from, int len)
void gdbarch_init_osabi(struct gdbarch_info info, struct gdbarch *gdbarch)
static CORE_ADDR ia64_read_pc(struct regcache *regcache)
int target_write_memory(CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
static void ia64_sigtramp_frame_init_saved_regs(struct frame_info *this_frame, struct ia64_frame_cache *cache)
static const struct frame_unwind ia64_frame_unwind
static struct ia64_frame_cache * ia64_alloc_frame_cache(void)
void libunwind_frame_dealloc_cache(struct frame_info *self, void *this_cache)
struct value * frame_unwind_got_memory(struct frame_info *frame, int regnum, CORE_ADDR addr)
static gdbarch_register_type_ftype ia64_register_type
struct bfd_section * the_bfd_section
void warning(const char *fmt,...)
static CORE_ADDR find_extant_func_descr(struct gdbarch *gdbarch, CORE_ADDR faddr)
static struct type * ia64_ext_type(struct gdbarch *gdbarch)
static struct ia64_frame_cache * ia64_sigtramp_frame_cache(struct frame_info *this_frame, void **this_cache)
void set_gdbarch_write_pc(struct gdbarch *gdbarch, gdbarch_write_pc_ftype write_pc)
static enum instruction_type template_encoding_table[32][3]
static int ia64_register_reggroup_p(struct gdbarch *gdbarch, int regnum, struct reggroup *group)
LONGEST target_read_alloc(struct target_ops *ops, enum target_object object, const char *annex, gdb_byte **buf_p)
void libunwind_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
static void ia64_allocate_new_rse_frame(struct regcache *regcache, ULONGEST bsp, int sof)
void set_gdbarch_short_bit(struct gdbarch *gdbarch, int short_bit)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
void * memset(T *s, int c, size_t n)=delete
void internal_error(const char *file, int line, const char *fmt,...)
void frame_unwind_register(struct frame_info *frame, int regnum, gdb_byte *buf)
#define obj_section_endaddr(s)
void(* store_argument_in_slot)(struct regcache *regcache, CORE_ADDR bsp, int slotnum, gdb_byte *buf)
void set_gdbarch_register_reggroup_p(struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype register_reggroup_p)
static gdbarch_init_ftype ia64_gdbarch_init
void target_float_convert(const gdb_byte *from, const struct type *from_type, gdb_byte *to, const struct type *to_type)
static int ia64_memory_remove_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
scoped_restore_tmpl< int > make_scoped_restore_show_memory_breakpoints(int show)
#define ALL_OBJFILE_OSECTIONS(objfile, osect)
struct gdbarch_list * gdbarch_list_lookup_by_info(struct gdbarch_list *arches, const struct gdbarch_info *info)
static int floatformat_valid(const struct floatformat *fmt, const void *from)
struct reggroup *const restore_reggroup
void(* set_function_addr)(struct regcache *regcache, CORE_ADDR func_addr)
struct reggroup *const all_reggroup
void set_gdbarch_dwarf2_reg_to_regnum(struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
#define NUM_IA64_RAW_REGS
static const struct floatformat * floatformats_ia64_ext[2]
struct gdbarch_tdep * gdbarch_tdep(struct gdbarch *gdbarch)
static const char * ia64_register_names[]
#define TYPE_FIELD_TYPE(thistype, n)
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
static const struct frame_unwind ia64_sigtramp_frame_unwind
#define isScratch(_regnum_)
const gdb_byte *() gdbarch_breakpoint_from_pc_ftype(struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
#define FRAME_OBSTACK_ZALLOC(TYPE)
static int slot_alignment_is_next_even(struct type *t)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
#define host_address_to_string(ADDR)
struct value * frame_unwind_got_constant(struct frame_info *frame, int regnum, ULONGEST val)
void gdbarch_register(enum bfd_architecture bfd_architecture, gdbarch_init_ftype *init, gdbarch_dump_tdep_ftype *dump_tdep)
static void ia64_set_function_addr(struct regcache *regcache, CORE_ADDR func_addr)
int frame_id_eq(struct frame_id l, struct frame_id r)
struct reggroup *const float_reggroup
void frame_base_set_default(struct gdbarch *gdbarch, const struct frame_base *default_base)
void set_gdbarch_pseudo_register_write(struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype pseudo_register_write)
void(* allocate_new_rse_frame)(struct regcache *regcache, ULONGEST bsp, int sof)
void set_gdbarch_register_type(struct gdbarch *gdbarch, gdbarch_register_type_ftype register_type)
struct type * check_typedef(struct type *type)
LONGEST read_memory_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
const gdb_byte * value_contents(struct value *value)
struct reggroup *const general_reggroup
struct target_ops current_target
struct symtab_and_line find_pc_line(CORE_ADDR pc, int notcurrent)
#define IA64_FR127_REGNUM
int gdbarch_sp_regnum(struct gdbarch *gdbarch)
objfile(bfd *, const char *, objfile_flags)
static int ia64_breakpoint_kind_from_pc(struct gdbarch *gdbarch, CORE_ADDR *pcptr)
struct ia64_infcall_ops infcall_ops
static int ia64_convert_register_p(struct gdbarch *gdbarch, int regno, struct type *type)
static int is_float_or_hfa_type_recurse(struct type *t, struct type **etp)
static gdbarch_skip_prologue_ftype ia64_skip_prologue
static ULONGEST extract_unsigned_integer(const gdb_byte *addr, int len, enum bfd_endian byte_order)
enum register_status regcache_cooked_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
struct type * arch_float_type(struct gdbarch *gdbarch, int bit, const char *name, const struct floatformat **floatformats)
void set_gdbarch_sp_regnum(struct gdbarch *gdbarch, int sp_regnum)
#define IA64_NAT31_REGNUM
CORE_ADDR saved_regs[NUM_IA64_RAW_REGS]
int libunwind_is_initialized(void)
struct type * register_type(struct gdbarch *gdbarch, int regnum)
void set_gdbarch_dummy_id(struct gdbarch *gdbarch, gdbarch_dummy_id_ftype dummy_id)
void fprintf_unfiltered(struct ui_file *stream, const char *format,...)
#define IA64_FP_REGISTER_SIZE
const gdb_byte * value_contents_all(struct value *value)
static CORE_ADDR ia64_unwind_pc(struct gdbarch *gdbarch, struct frame_info *next_frame)
void ia64_write_pc(struct regcache *regcache, CORE_ADDR new_pc)
static const struct floatformat floatformat_ia64_ext_little
struct frame_id frame_id_build_special(CORE_ADDR stack_addr, CORE_ADDR code_addr, CORE_ADDR special_addr)
int default_print_insn(bfd_vma memaddr, disassemble_info *info)
static CORE_ADDR ia64_find_global_pointer_from_dynamic_section(struct gdbarch *gdbarch, CORE_ADDR faddr)
gdb_byte shadow_contents[BREAKPOINT_MAX]
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
int target_write_raw_memory(CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
static CORE_ADDR ia64_frame_base_address(struct frame_info *this_frame, void **this_cache)
int is_vtable_name(const char *name)
#define ANOFFSET(secoff, whichone)
struct gdbarch * get_objfile_arch(const struct objfile *objfile)
char * pulongest(ULONGEST u)
static enum register_status ia64_pseudo_register_read(struct gdbarch *gdbarch, struct regcache *regcache, int regnum, gdb_byte *buf)
struct obj_section * sections
int find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr)
void set_gdbarch_register_to_value(struct gdbarch *gdbarch, gdbarch_register_to_value_ftype register_to_value)
static int ia64_print_insn(bfd_vma memaddr, struct disassemble_info *info)
void set_gdbarch_unwind_pc(struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype unwind_pc)
unsigned int gdbarch_debug
static int ia64_dwarf_reg_to_regnum(struct gdbarch *gdbarch, int reg)
void set_gdbarch_breakpoint_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
static CORE_ADDR ia64_convert_from_func_ptr_addr(struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
int default_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
static void ia64_sigtramp_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
static CORE_ADDR fetch_instruction(CORE_ADDR addr, instruction_type *it, long long *instr)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int status
struct type * builtin_long
static int ia64_use_struct_convention(struct type *type)
void set_gdbarch_read_pc(struct gdbarch *gdbarch, gdbarch_read_pc_ftype read_pc)
static int ia64_register_to_value(struct frame_info *frame, int regnum, struct type *valtype, gdb_byte *out, int *optimizedp, int *unavailablep)
static CORE_ADDR ia64_find_global_pointer(struct gdbarch *gdbarch, CORE_ADDR faddr)
void set_gdbarch_convert_from_func_ptr_addr(struct gdbarch *gdbarch, gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
void read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
struct obj_section * find_pc_section(CORE_ADDR pc)
struct reggroup *const vector_reggroup
ULONGEST get_frame_register_unsigned(struct frame_info *frame, int regnum)
static const struct floatformat floatformat_ia64_ext_big
void set_gdbarch_breakpoint_kind_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_kind_from_pc_ftype breakpoint_kind_from_pc)
void set_gdbarch_long_long_bit(struct gdbarch *gdbarch, int long_long_bit)
CORE_ADDR(* sigcontext_register_address)(struct gdbarch *, CORE_ADDR, int)
void put_frame_register(struct frame_info *frame, int regnum, const gdb_byte *buf)
struct type *() gdbarch_register_type_ftype(struct gdbarch *gdbarch, int reg_nr)
int(* size_of_register_frame)(struct frame_info *this_frame, ULONGEST cfm)
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)
void _initialize_ia64_tdep(void)
struct gdbarch *() gdbarch_init_ftype(struct gdbarch_info info, struct gdbarch_list *arches)
#define IS_NaT_COLLECTION_ADDR(addr)
#define IA64_NAT127_REGNUM
int core_addr_lessthan(CORE_ADDR lhs, CORE_ADDR rhs)
int libunwind_get_reg_special(struct gdbarch *gdbarch, struct regcache *regcache, int regnum, void *buf)
int libunwind_sigtramp_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
const struct floatformat * floatformats_i387_ext[BFD_ENDIAN_UNKNOWN]
void set_gdbarch_pseudo_register_read(struct gdbarch *gdbarch, gdbarch_pseudo_register_read_ftype pseudo_register_read)
int(* pc_in_sigtramp)(struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
int libunwind_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
#define TYPE_TARGET_TYPE(thistype)
void set_gdbarch_memory_insert_breakpoint(struct gdbarch *gdbarch, gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
struct bound_minimal_symbol lookup_minimal_symbol_by_pc(CORE_ADDR pc)
static gdbarch_register_name_ftype ia64_register_name
static void ia64_store_return_value(struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
void set_gdbarch_convert_register_p(struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype convert_register_p)
CORE_ADDR() gdbarch_skip_prologue_ftype(struct gdbarch *gdbarch, CORE_ADDR ip)
static struct value * ia64_sigtramp_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
#define TYPE_CODE(thistype)
struct value * frame_unwind_got_register(struct frame_info *frame, int regnum, int new_regnum)
void regcache_cooked_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
static int ia64_sigtramp_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
CORE_ADDR find_function_addr(struct value *function, struct type **retval_type)
void set_gdbarch_int_bit(struct gdbarch *gdbarch, int int_bit)
struct minimal_symbol * minsym
struct value * libunwind_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
static const struct frame_base ia64_frame_base
static void ia64_extract_return_value(struct type *type, struct regcache *regcache, gdb_byte *valbuf)
#define obj_section_addr(s)
static long long slotN_contents(gdb_byte *bundle, int slotnum)
static void replace_slotN_contents(gdb_byte *bundle, long long instr, int slotnum)
void get_frame_register(struct frame_info *frame, int regnum, gdb_byte *buf)
#define TYPE_NFIELDS(thistype)
static int ia64_size_of_register_frame(struct frame_info *this_frame, ULONGEST cfm)
void set_gdbarch_num_pseudo_regs(struct gdbarch *gdbarch, int num_pseudo_regs)
enum register_status regcache_cooked_read(struct regcache *regcache, int regnum, gdb_byte *buf)
static struct frame_id ia64_dummy_id(struct gdbarch *gdbarch, struct frame_info *this_frame)
static struct type * is_float_or_hfa_type(struct type *t)
static LONGEST extract_signed_integer(const gdb_byte *addr, int len, enum bfd_endian byte_order)
static void ia64_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
void set_gdbarch_memory_remove_breakpoint(struct gdbarch *gdbarch, gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
int get_frame_register_bytes(struct frame_info *frame, int regnum, CORE_ADDR offset, int len, gdb_byte *myaddr, int *optimizedp, int *unavailablep)
unw_word_t libunwind_find_dyn_list(unw_addr_space_t as, unw_dyn_info_t *di, void *arg)
unsigned long long ULONGEST
enum unwind_stop_reason default_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
const struct frame_id outer_frame_id
static struct ia64_frame_cache * ia64_frame_cache(struct frame_info *this_frame, void **this_cache)
static void ia64_value_to_register(struct frame_info *frame, int regnum, struct type *valtype, const gdb_byte *in)
int register_size(struct gdbarch *gdbarch, int regnum)
void set_gdbarch_long_double_bit(struct gdbarch *gdbarch, int long_double_bit)
struct type * value_type(const struct value *value)
void set_gdbarch_long_bit(struct gdbarch *gdbarch, int long_bit)
void set_gdbarch_vtable_function_descriptors(struct gdbarch *gdbarch, int vtable_function_descriptors)
static void ia64_pseudo_register_write(struct gdbarch *gdbarch, struct regcache *regcache, int regnum, const gdb_byte *buf)
void set_gdbarch_return_value(struct gdbarch *gdbarch, gdbarch_return_value_ftype return_value)
frame_this_id_ftype * this_id
static struct value * ia64_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
static int max_skip_non_prologue_insns
static CORE_ADDR ia64_frame_align(struct gdbarch *gdbarch, CORE_ADDR sp)
void set_gdbarch_long_double_format(struct gdbarch *gdbarch, const struct floatformat **long_double_format)
static CORE_ADDR examine_prologue(CORE_ADDR pc, CORE_ADDR lim_pc, struct frame_info *this_frame, struct ia64_frame_cache *cache)
struct reggroup *const save_reggroup
const char *() gdbarch_register_name_ftype(struct gdbarch *gdbarch, int regnr)
#define TYPE_LENGTH(thistype)
void set_gdbarch_ptr_bit(struct gdbarch *gdbarch, int ptr_bit)
static int ia64_memory_insert_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
void set_gdbarch_push_dummy_call(struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype push_dummy_call)
#define IA64_GR127_REGNUM
CORE_ADDR get_pc_function_start(CORE_ADDR pc)
ULONGEST read_memory_unsigned_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
int libunwind_search_unwind_table(void *as, long ip, void *di, void *pi, int need_unwind_info, void *args)
struct section_offsets * section_offsets
CORE_ADDR(* find_global_pointer_from_solib)(struct gdbarch *gdbarch, CORE_ADDR faddr)
void write_memory(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
void set_gdbarch_skip_prologue(struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype skip_prologue)
enum bfd_endian byte_order
static const struct ia64_infcall_ops ia64_infcall_ops
void set_gdbarch_register_name(struct gdbarch *gdbarch, gdbarch_register_name_ftype register_name)
CORE_ADDR get_frame_func(struct frame_info *this_frame)
#define IA64_NAT32_REGNUM
void error(const char *fmt,...)
struct gdbarch * gdbarch_alloc(const struct gdbarch_info *info, struct gdbarch_tdep *tdep)
void set_gdbarch_inner_than(struct gdbarch *gdbarch, gdbarch_inner_than_ftype inner_than)
static gdbarch_breakpoint_from_pc_ftype ia64_breakpoint_from_pc
static CORE_ADDR refine_prologue_limit(CORE_ADDR pc, CORE_ADDR lim_pc, int *trust_limit)
static int ia64_struct_type_p(const struct type *type)
struct gdbarch * get_frame_arch(struct frame_info *this_frame)
void regcache_cooked_write(struct regcache *regcache, int regnum, const gdb_byte *buf)
static void ia64_store_argument_in_slot(struct regcache *regcache, CORE_ADDR bsp, int slotnum, gdb_byte *buf)
static CORE_ADDR find_func_descr(struct regcache *regcache, CORE_ADDR faddr, CORE_ADDR *fdaptr)
void set_gdbarch_print_insn(struct gdbarch *gdbarch, gdbarch_print_insn_ftype print_insn)
struct obj_section * sections_end
static void store_unsigned_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, ULONGEST val)