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
146 {
"r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
147 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
148 "r16",
"r17",
"r18",
"r19",
"r20",
"r21",
"r22",
"r23",
149 "r24",
"r25",
"r26",
"r27",
"r28",
"r29",
"r30",
"r31",
150 "",
"",
"",
"",
"",
"",
"",
"",
151 "",
"",
"",
"",
"",
"",
"",
"",
152 "",
"",
"",
"",
"",
"",
"",
"",
153 "",
"",
"",
"",
"",
"",
"",
"",
154 "",
"",
"",
"",
"",
"",
"",
"",
155 "",
"",
"",
"",
"",
"",
"",
"",
156 "",
"",
"",
"",
"",
"",
"",
"",
157 "",
"",
"",
"",
"",
"",
"",
"",
158 "",
"",
"",
"",
"",
"",
"",
"",
159 "",
"",
"",
"",
"",
"",
"",
"",
160 "",
"",
"",
"",
"",
"",
"",
"",
161 "",
"",
"",
"",
"",
"",
"",
"",
163 "f0",
"f1",
"f2",
"f3",
"f4",
"f5",
"f6",
"f7",
164 "f8",
"f9",
"f10",
"f11",
"f12",
"f13",
"f14",
"f15",
165 "f16",
"f17",
"f18",
"f19",
"f20",
"f21",
"f22",
"f23",
166 "f24",
"f25",
"f26",
"f27",
"f28",
"f29",
"f30",
"f31",
167 "f32",
"f33",
"f34",
"f35",
"f36",
"f37",
"f38",
"f39",
168 "f40",
"f41",
"f42",
"f43",
"f44",
"f45",
"f46",
"f47",
169 "f48",
"f49",
"f50",
"f51",
"f52",
"f53",
"f54",
"f55",
170 "f56",
"f57",
"f58",
"f59",
"f60",
"f61",
"f62",
"f63",
171 "f64",
"f65",
"f66",
"f67",
"f68",
"f69",
"f70",
"f71",
172 "f72",
"f73",
"f74",
"f75",
"f76",
"f77",
"f78",
"f79",
173 "f80",
"f81",
"f82",
"f83",
"f84",
"f85",
"f86",
"f87",
174 "f88",
"f89",
"f90",
"f91",
"f92",
"f93",
"f94",
"f95",
175 "f96",
"f97",
"f98",
"f99",
"f100",
"f101",
"f102",
"f103",
176 "f104",
"f105",
"f106",
"f107",
"f108",
"f109",
"f110",
"f111",
177 "f112",
"f113",
"f114",
"f115",
"f116",
"f117",
"f118",
"f119",
178 "f120",
"f121",
"f122",
"f123",
"f124",
"f125",
"f126",
"f127",
180 "",
"",
"",
"",
"",
"",
"",
"",
181 "",
"",
"",
"",
"",
"",
"",
"",
182 "",
"",
"",
"",
"",
"",
"",
"",
183 "",
"",
"",
"",
"",
"",
"",
"",
184 "",
"",
"",
"",
"",
"",
"",
"",
185 "",
"",
"",
"",
"",
"",
"",
"",
186 "",
"",
"",
"",
"",
"",
"",
"",
187 "",
"",
"",
"",
"",
"",
"",
"",
189 "b0",
"b1",
"b2",
"b3",
"b4",
"b5",
"b6",
"b7",
193 "pr",
"ip",
"psr",
"cfm",
195 "kr0",
"kr1",
"kr2",
"kr3",
"kr4",
"kr5",
"kr6",
"kr7",
196 "",
"",
"",
"",
"",
"",
"",
"",
197 "rsc",
"bsp",
"bspstore",
"rnat",
199 "eflag",
"csd",
"ssd",
"cflg",
"fsr",
"fir",
"fdr",
"",
200 "ccv",
"",
"",
"",
"unat",
"",
"",
"",
201 "fpsr",
"",
"",
"",
"itc",
202 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
203 "",
"",
"",
"",
"",
"",
"",
"",
"",
205 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
206 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
207 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
208 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
209 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
210 "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
212 "nat0",
"nat1",
"nat2",
"nat3",
"nat4",
"nat5",
"nat6",
"nat7",
213 "nat8",
"nat9",
"nat10",
"nat11",
"nat12",
"nat13",
"nat14",
"nat15",
214 "nat16",
"nat17",
"nat18",
"nat19",
"nat20",
"nat21",
"nat22",
"nat23",
215 "nat24",
"nat25",
"nat26",
"nat27",
"nat28",
"nat29",
"nat30",
"nat31",
216 "nat32",
"nat33",
"nat34",
"nat35",
"nat36",
"nat37",
"nat38",
"nat39",
217 "nat40",
"nat41",
"nat42",
"nat43",
"nat44",
"nat45",
"nat46",
"nat47",
218 "nat48",
"nat49",
"nat50",
"nat51",
"nat52",
"nat53",
"nat54",
"nat55",
219 "nat56",
"nat57",
"nat58",
"nat59",
"nat60",
"nat61",
"nat62",
"nat63",
220 "nat64",
"nat65",
"nat66",
"nat67",
"nat68",
"nat69",
"nat70",
"nat71",
221 "nat72",
"nat73",
"nat74",
"nat75",
"nat76",
"nat77",
"nat78",
"nat79",
222 "nat80",
"nat81",
"nat82",
"nat83",
"nat84",
"nat85",
"nat86",
"nat87",
223 "nat88",
"nat89",
"nat90",
"nat91",
"nat92",
"nat93",
"nat94",
"nat95",
224 "nat96",
"nat97",
"nat98",
"nat99",
"nat100",
"nat101",
"nat102",
"nat103",
225 "nat104",
"nat105",
"nat106",
"nat107",
"nat108",
"nat109",
"nat110",
"nat111",
226 "nat112",
"nat113",
"nat114",
"nat115",
"nat116",
"nat117",
"nat118",
"nat119",
227 "nat120",
"nat121",
"nat122",
"nat123",
"nat124",
"nat125",
"nat126",
"nat127",
231 "r32",
"r33",
"r34",
"r35",
"r36",
"r37",
"r38",
"r39",
232 "r40",
"r41",
"r42",
"r43",
"r44",
"r45",
"r46",
"r47",
233 "r48",
"r49",
"r50",
"r51",
"r52",
"r53",
"r54",
"r55",
234 "r56",
"r57",
"r58",
"r59",
"r60",
"r61",
"r62",
"r63",
235 "r64",
"r65",
"r66",
"r67",
"r68",
"r69",
"r70",
"r71",
236 "r72",
"r73",
"r74",
"r75",
"r76",
"r77",
"r78",
"r79",
237 "r80",
"r81",
"r82",
"r83",
"r84",
"r85",
"r86",
"r87",
238 "r88",
"r89",
"r90",
"r91",
"r92",
"r93",
"r94",
"r95",
239 "r96",
"r97",
"r98",
"r99",
"r100",
"r101",
"r102",
"r103",
240 "r104",
"r105",
"r106",
"r107",
"r108",
"r109",
"r110",
"r111",
241 "r112",
"r113",
"r114",
"r115",
"r116",
"r117",
"r118",
"r119",
242 "r120",
"r121",
"r122",
"r123",
"r124",
"r125",
"r126",
"r127",
244 "p0",
"p1",
"p2",
"p3",
"p4",
"p5",
"p6",
"p7",
245 "p8",
"p9",
"p10",
"p11",
"p12",
"p13",
"p14",
"p15",
246 "p16",
"p17",
"p18",
"p19",
"p20",
"p21",
"p22",
"p23",
247 "p24",
"p25",
"p26",
"p27",
"p28",
"p29",
"p30",
"p31",
248 "p32",
"p33",
"p34",
"p35",
"p36",
"p37",
"p38",
"p39",
249 "p40",
"p41",
"p42",
"p43",
"p44",
"p45",
"p46",
"p47",
250 "p48",
"p49",
"p50",
"p51",
"p52",
"p53",
"p54",
"p55",
251 "p56",
"p57",
"p58",
"p59",
"p60",
"p61",
"p62",
"p63",
292 floatformat_little, 82, 0, 1, 17, 65535, 0x1ffff, 18, 64,
298 floatformat_big, 82, 46, 47, 17, 65535, 0x1ffff, 64, 64,
305 &floatformat_ia64_ext_little
316 floatformats_ia64_ext);
338 return (!vector_p && !float_p);
347 return ia64_register_names[reg];
374 long long result = 0LL;
376 int from_byte = from / 8;
377 int to_byte = to / 8;
378 unsigned char *b = (
unsigned char *) bundle;
384 if (from_byte == to_byte)
385 c = ((
unsigned char) (c << (8 - to % 8))) >> (8 - to % 8);
386 result = c >> (from % 8);
387 lshift = 8 - (from % 8);
389 for (i = from_byte+1; i < to_byte; i++)
391 result |= ((
long long) b[i]) << lshift;
395 if (from_byte < to_byte && (to % 8 != 0))
398 c = ((
unsigned char) (c << (8 - to % 8))) >> (8 - to % 8);
399 result |= ((
long long) c) << lshift;
411 int from_byte = from / 8;
412 int to_byte = to / 8;
413 unsigned char *b = (
unsigned char *) bundle;
416 if (from_byte == to_byte)
418 unsigned char left, right;
420 left = (c >> (to % 8)) << (to % 8);
421 right = ((
unsigned char) (c << (8 - from % 8))) >> (8 - from % 8);
422 c = (
unsigned char) (val & 0xff);
423 c = (
unsigned char) (c << (from % 8 + 8 - to % 8)) >> (8 - to % 8);
431 c = ((
unsigned char) (c << (8 - from % 8))) >> (8 - from % 8);
432 c = c | (val << (from % 8));
434 val >>= 8 - from % 8;
436 for (i = from_byte+1; i < to_byte; i++)
445 unsigned char cv = (
unsigned char) val;
447 c = c >> (to % 8) << (to % 8);
448 c |= ((
unsigned char) (cv << (8 - to % 8))) >> (8 - to % 8);
533 warning (
_(
"Can't fetch instructions for slot numbers greater than 2.\n"
534 "Using slot 0 instead"));
547 *it = template_encoding_table[(
int)templ][slotnum];
549 if (slotnum == 2 || (slotnum == 1 && *it ==
L))
634 #define IA64_BREAKPOINT 0x00003333300LL
643 long long instr_breakpoint;
649 error (
_(
"Can't insert breakpoint for slot numbers greater than 2."));
668 shadow_slotnum = slotnum;
675 if (template_encoding_table[templ][slotnum] ==
X)
682 error (
_(
"Can't insert breakpoint for non-existing slot X"));
684 if (template_encoding_table[templ][slotnum] ==
L)
720 _(
"Address %s already contains a breakpoint."),
740 long long instr_breakpoint, instr_saved;
762 shadow_slotnum = slotnum;
765 if (template_encoding_table[templ][slotnum] ==
X)
773 warning (
_(
"Cannot remove breakpoint at address %s from non-existing "
774 "X-type slot, memory has changed underneath"),
779 if (template_encoding_table[templ][slotnum] ==
L)
794 warning (
_(
"Cannot remove breakpoint at address %s, "
795 "no break instruction at such address."),
803 memcpy (bundle_saved, bundle_mem,
BUNDLE_LEN);
830 long long instr_fetched;
836 error (
_(
"Can't insert breakpoint for slot numbers greater than 2."));
853 shadow_slotnum = slotnum;
861 if (template_encoding_table[templ][slotnum] ==
X)
864 error (
_(
"Can't insert breakpoint for non-existing slot X"));
866 if (template_encoding_table[templ][slotnum] ==
L)
876 instr_fetched &= 0x1003ffffc0LL;
879 return bundle + shadow_slotnum;
890 slot_num = (psr_value >> 41) & 3;
902 psr_value &= ~(3LL << 41);
903 psr_value |= (
ULONGEST)(slot_num & 0x3) << 41;
911 #define IS_NaT_COLLECTION_ADDR(addr) ((((addr) >> 3) & 0x3f) == 0x3f)
919 int mandatory_nat_slots = nslots / 63;
920 int direction = nslots < 0 ? -1 : 1;
922 new_addr = addr + 8 * (nslots + mandatory_nat_slots);
924 if ((new_addr >> 9) != ((addr + 8 * 64 * mandatory_nat_slots) >> 9))
925 new_addr += 8 * direction;
928 new_addr += 8 * direction;
942 #ifdef HAVE_LIBUNWIND_IA64_H
994 byte_order, unatN_val);
1025 if (nat_addr >= bsp)
1030 nat_bit = (gr_addr >> 3) & 0x3f;
1031 natN_val = (nat_collection >> nat_bit) & 1;
1035 byte_order, natN_val);
1072 int rrb_pr = (cfm >> 32) & 0x3f;
1078 prN_val = (pr & (1LL << (regnum -
VP0_REGNUM))) != 0;
1080 byte_order, prN_val);
1111 ULONGEST unatN_val, unat, unatN_mask;
1118 unat &= ~unatN_mask;
1119 else if (unatN_val == 1)
1143 if (gr_addr != 0 && (natN_val == 0 || natN_val == 1))
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;
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 int *optimizedp,
int *unavailablep)
1231 in, optimizedp, unavailablep))
1235 *optimizedp = *unavailablep = 0;
1283 if (prologue_sal.
line != 0)
1295 for (i = 2 * max_skip_non_prologue_insns;
1296 i > 0 && (lim_pc == 0 || addr < lim_pc);
1304 if (sal.line <= prologue_sal.
line
1305 && sal.symtab == prologue_sal.
symtab)
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))
1370 int unat_save_reg = 0;
1371 int pr_save_reg = 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 sor = (
int) ((instr & 0x00078000000LL) >> 27);
1403 int sol = (
int) ((instr & 0x00007f00000LL) >> 20);
1404 int sof = (
int) ((instr & 0x000000fe000LL) >> 13);
1405 int rN = (
int) ((instr & 0x00000001fc0LL) >> 6);
1413 (sof == (cache->
cfm & 0x7f) &&
1414 sol == ((cache->
cfm >> 7) & 0x7f)))
1418 last_prologue_pc = next_pc;
1424 if (pc < lim_pc && next_pc
1425 && (it ==
I || it ==
M)
1426 && ((instr & 0x1ee00000000LL) == 0x10800000000LL))
1429 int imm = (
int) ((((instr & 0x01000000000LL) ? -1 : 0) << 13)
1430 | ((instr & 0x001f8000000LL) >> 20)
1431 | ((instr & 0x000000fe000LL) >> 13));
1432 int rM = (
int) ((instr & 0x00007f00000LL) >> 20);
1433 int rN = (
int) ((instr & 0x00000001fc0LL) >> 6);
1434 int qp = (
int) (instr & 0x0000000003fLL);
1435 if (qp == 0 && rN == 2 && imm == 0 && rM == 12 && fp_reg == 0)
1439 last_prologue_pc = next_pc;
1449 last_prologue_pc = lim_pc;
1461 if (it ==
B && ((instr & 0x1e1f800003fLL) != 0x04000000000LL))
1468 else if (((instr & 0x3fLL) != 0LL) &&
1469 (frameless || ret_reg != 0))
1477 else if (it ==
I && ((instr & 0x1eff8000000LL) == 0x00188000000LL))
1480 int b2 = (
int) ((instr & 0x0000000e000LL) >> 13);
1481 int rN = (
int) ((instr & 0x00000001fc0LL) >> 6);
1482 int qp = (
int) (instr & 0x0000000003f);
1484 if (qp == 0 && b2 == 0 && rN >= 32 && ret_reg == 0)
1487 last_prologue_pc = next_pc;
1490 else if ((it ==
I || it ==
M)
1491 && ((instr & 0x1ee00000000LL) == 0x10800000000LL))
1494 int imm = (
int) ((((instr & 0x01000000000LL) ? -1 : 0) << 13)
1495 | ((instr & 0x001f8000000LL) >> 20)
1496 | ((instr & 0x000000fe000LL) >> 13));
1497 int rM = (
int) ((instr & 0x00007f00000LL) >> 20);
1498 int rN = (
int) ((instr & 0x00000001fc0LL) >> 6);
1499 int qp = (
int) (instr & 0x0000000003fLL);
1501 if (qp == 0 && rN >= 32 && imm == 0 && rM == 12 && fp_reg == 0)
1505 last_prologue_pc = next_pc;
1507 else if (qp == 0 && rN == 12 && rM == 12)
1510 mem_stack_frame_size -= imm;
1511 last_prologue_pc = next_pc;
1513 else if (qp == 0 && rN == 2
1514 && ((rM == fp_reg && fp_reg != 0) || rM == 12))
1537 spill_addr = saved_sp
1538 + (rM == 12 ? 0 : mem_stack_frame_size)
1541 last_prologue_pc = next_pc;
1543 else if (qp == 0 && rM >= 32 && rM < 40 && !instores[rM-32] &&
1544 rN < 256 && imm == 0)
1547 reg_contents[rN] = rM;
1548 last_prologue_pc = next_pc;
1550 else if (frameless && qp == 0 && rN == fp_reg && imm == 0 &&
1554 last_prologue_pc = next_pc;
1559 && ( ((instr & 0x1efc0000000LL) == 0x0eec0000000LL)
1560 || ((instr & 0x1ffc8000000LL) == 0x0cec0000000LL) ))
1566 int imm =
imm9(instr);
1567 int rN = (
int) ((instr & 0x00007f00000LL) >> 20);
1568 int fM = (
int) ((instr & 0x000000fe000LL) >> 13);
1569 int qp = (
int) (instr & 0x0000000003fLL);
1570 if (qp == 0 && rN == spill_reg && spill_addr != 0
1571 && ((2 <= fM && fM <= 5) || (16 <= fM && fM <= 31)))
1575 if ((instr & 0x1efc0000000LL) == 0x0eec0000000LL)
1579 last_prologue_pc = next_pc;
1582 else if ((it ==
M && ((instr & 0x1eff8000000LL) == 0x02110000000LL))
1583 || (it ==
I && ((instr & 0x1eff8000000LL) == 0x00050000000LL)) )
1589 int arM = (
int) ((instr & 0x00007f00000LL) >> 20);
1590 int rN = (
int) ((instr & 0x00000001fc0LL) >> 6);
1591 int qp = (
int) (instr & 0x0000000003fLL);
1592 if (qp == 0 &&
isScratch (rN) && arM == 36 )
1597 last_prologue_pc = next_pc;
1600 else if (it ==
I && ((instr & 0x1eff8000000LL) == 0x00198000000LL))
1603 int rN = (
int) ((instr & 0x00000001fc0LL) >> 6);
1604 int qp = (
int) (instr & 0x0000000003fLL);
1608 last_prologue_pc = next_pc;
1612 && ( ((instr & 0x1ffc8000000LL) == 0x08cc0000000LL)
1613 || ((instr & 0x1efc0000000LL) == 0x0acc0000000LL)))
1618 int rN = (
int) ((instr & 0x00007f00000LL) >> 20);
1619 int rM = (
int) ((instr & 0x000000fe000LL) >> 13);
1620 int qp = (
int) (instr & 0x0000000003fLL);
1621 int indirect = rM < 256 ? reg_contents[rM] : 0;
1622 if (qp == 0 && rN == spill_reg && spill_addr != 0
1623 && (rM == unat_save_reg || rM == pr_save_reg))
1629 if (rM == unat_save_reg)
1641 if ((instr & 0x1efc0000000LL) == 0x0acc0000000LL)
1643 spill_addr +=
imm9(instr);
1646 last_prologue_pc = next_pc;
1648 else if (qp == 0 && 32 <= rM && rM < 40 && !instores[rM-32])
1651 instores[rM-32] = 1;
1652 last_prologue_pc = next_pc;
1654 else if (qp == 0 && 32 <= indirect && indirect < 40 &&
1655 !instores[indirect-32])
1658 instores[indirect-32] = 1;
1659 last_prologue_pc = next_pc;
1662 else if (it ==
M && ((instr & 0x1ff08000000LL) == 0x08c00000000LL))
1673 int rM = (
int) ((instr & 0x000000fe000LL) >> 13);
1674 int qp = (
int) (instr & 0x0000000003fLL);
1675 int indirect = rM < 256 ? reg_contents[rM] : 0;
1676 if (qp == 0 && 32 <= rM && rM < 40 && !instores[rM-32])
1678 instores[rM-32] = 1;
1679 last_prologue_pc = next_pc;
1681 else if (qp == 0 && 32 <= indirect && indirect < 40 &&
1682 !instores[indirect-32])
1685 instores[indirect-32] = 1;
1686 last_prologue_pc = next_pc;
1689 else if (it ==
M && ((instr & 0x1ff88000000LL) == 0x0cc80000000LL))
1698 int fM = (
int) ((instr & 0x000000fe000LL) >> 13);
1699 int qp = (
int) (instr & 0x0000000003fLL);
1700 if (qp == 0 && 8 <= fM && fM < 16 && !infpstores[fM - 8])
1702 infpstores[fM-8] = 1;
1703 last_prologue_pc = next_pc;
1707 && ( ((instr & 0x1ffc8000000LL) == 0x08ec0000000LL)
1708 || ((instr & 0x1efc0000000LL) == 0x0aec0000000LL)))
1713 int rN = (
int) ((instr & 0x00007f00000LL) >> 20);
1714 int rM = (
int) ((instr & 0x000000fe000LL) >> 13);
1715 int qp = (
int) (instr & 0x0000000003fLL);
1716 if (qp == 0 && rN == spill_reg && 4 <= rM && rM <= 7)
1722 if ((instr & 0x1efc0000000LL) == 0x0aec0000000LL)
1724 spill_addr +=
imm9(instr);
1727 last_prologue_pc = next_pc;
1738 if (!frameless && this_frame)
1750 rrb_gr = (cfm >> 18) & 0x7f;
1755 for (i = 0, addr = bof;
1763 if (i+32 == cfm_reg)
1765 if (i+32 == ret_reg)
1779 else if (cfm_reg != 0)
1788 sor = ((cfm >> 14) & 0xf) * 8;
1790 sol = (cfm >> 7) & 0x7f;
1791 rrb_gr = (cfm >> 18) & 0x7f;
1798 for (i = 0, addr = bof;
1808 + ((i + (sor - rrb_gr)) % sor)]
1818 if (trust_limit && lim_pc >= last_prologue_pc)
1819 last_prologue_pc = lim_pc;
1826 return last_prologue_pc;
1859 *this_cache = cache;
1876 cache->
sof = (cfm & 0x7f);
1877 cache->
sol = (cfm >> 7) & 0x7f;
1878 cache->
sor = ((cfm >> 14) & 0xf) * 8;
1901 if (cache->
base != 0)
1905 "regular frame id: code %s, stack %s, "
1906 "special %s, this_frame %s\n",
1913 static struct value *
1925 error (
_(
"No registers."));
1980 struct value *pr_val;
1989 int rrb_pr = (cache->
cfm >> 32) & 0x3f;
2001 struct value *unat_val;
2032 if (nat_addr >= bsp)
2039 nat_bit = (gr_addr >> 3) & 0x3f;
2040 natval = (nat_collection >> nat_bit) & 1;
2089 psr &= ~(3LL << 41);
2090 slot_num = pc & 0x3LL;
2118 struct value *reg_val;
2150 int rrb_fr = (cache->
cfm >> 25) & 0x7f;
2257 cache->
sof = cache->
cfm & 0x7f;
2261 *this_cache = cache;
2267 void **this_cache,
struct frame_id *this_id)
2278 "sigtramp frame id: code %s, stack %s, "
2279 "special %s, this_frame %s\n",
2286 static struct value *
2288 void **this_cache,
int regnum)
2300 error (
_(
"No registers."));
2383 ia64_frame_base_address
2386 #ifdef HAVE_LIBUNWIND_IA64_H
2388 struct ia64_unwind_table_entry
2390 unw_word_t start_offset;
2391 unw_word_t end_offset;
2392 unw_word_t info_offset;
2395 static __inline__ uint64_t
2396 ia64_rse_slot_num (uint64_t addr)
2398 return (addr >> 3) & 0x3f;
2403 static __inline__ uint64_t
2404 ia64_rse_skip_regs (uint64_t addr,
long num_regs)
2406 long delta = ia64_rse_slot_num(addr) + num_regs;
2410 return addr + ((num_regs + delta/0x3f) << 3);
2416 ia64_gdb2uw_regnum (
int regnum)
2418 if (regnum == sp_regnum)
2421 return UNW_IA64_BSP;
2424 else if ((
unsigned) (regnum -
V32_REGNUM) < 95)
2425 return UNW_IA64_GR + 32 + (regnum -
V32_REGNUM);
2437 return UNW_IA64_CFM;
2449 ia64_uw2gdb_regnum (
int uw_regnum)
2451 if (uw_regnum == UNW_IA64_SP)
2453 else if (uw_regnum == UNW_IA64_BSP)
2455 else if ((
unsigned) (uw_regnum - UNW_IA64_GR) < 32)
2457 else if ((
unsigned) (uw_regnum - UNW_IA64_GR) < 128)
2459 else if ((
unsigned) (uw_regnum - UNW_IA64_FR) < 128)
2461 else if ((
unsigned) (uw_regnum - UNW_IA64_BR) < 8)
2463 else if (uw_regnum == UNW_IA64_PR)
2465 else if (uw_regnum == UNW_REG_IP)
2467 else if (uw_regnum == UNW_IA64_CFM)
2469 else if ((
unsigned) (uw_regnum - UNW_IA64_AR) < 128)
2471 else if ((
unsigned) (uw_regnum - UNW_IA64_NAT) < 128)
2480 ia64_is_fpreg (
int uw_regnum)
2482 return unw_is_fpreg (uw_regnum);
2487 ia64_access_reg (unw_addr_space_t as, unw_regnum_t uw_regnum, unw_word_t *val,
2488 int write,
void *arg)
2490 int regnum = ia64_uw2gdb_regnum (uw_regnum);
2491 unw_word_t bsp, sof, sol, cfm, psr, ip;
2495 long new_sof, old_sof;
2510 *val = ip | ((psr >> 41) & 0x3);
2513 case UNW_IA64_AR_BSP:
2523 *val = ia64_rse_skip_regs (bsp, -sof);
2526 case UNW_IA64_AR_BSPSTORE:
2542 " access_reg: from cache: %4s=%s\n",
2544 ? ia64_register_names[regnum] :
"r??"),
2551 ia64_access_fpreg (unw_addr_space_t as, unw_regnum_t uw_regnum,
2552 unw_fpreg_t *val,
int write,
void *arg)
2554 int regnum = ia64_uw2gdb_regnum (uw_regnum);
2567 ia64_access_rse_reg (unw_addr_space_t as, unw_regnum_t uw_regnum,
2568 unw_word_t *val,
int write,
void *arg)
2570 int regnum = ia64_uw2gdb_regnum (uw_regnum);
2571 unw_word_t bsp, sof, sol, cfm, psr, ip;
2572 struct regcache *regcache = arg;
2575 long new_sof, old_sof;
2590 *val = ip | ((psr >> 41) & 0x3);
2593 case UNW_IA64_AR_BSP:
2603 *val = ia64_rse_skip_regs (bsp, -sof);
2606 case UNW_IA64_AR_BSPSTORE:
2622 " access_rse_reg: from cache: %4s=%s\n",
2624 ? ia64_register_names[regnum] :
"r??"),
2632 ia64_access_rse_fpreg (unw_addr_space_t as, unw_regnum_t uw_regnum,
2633 unw_fpreg_t *val,
int write,
void *arg)
2635 int regnum = ia64_uw2gdb_regnum (uw_regnum);
2636 struct regcache *regcache = arg;
2648 ia64_access_mem (unw_addr_space_t as,
2649 unw_word_t addr, unw_word_t *val,
2650 int write,
void *arg)
2652 if (addr - KERNEL_START < ktab_size)
2654 unw_word_t *laddr = (unw_word_t*) ((
char *) ktab
2655 + (addr - KERNEL_START));
2693 get_kernel_table (unw_word_t ip, unw_dyn_info_t *di)
2695 static struct ia64_table_entry *etab;
2702 size = getunwind_table (&ktab_buf);
2704 return -UNW_ENOINFO;
2706 ktab = (
struct ia64_table_entry *) ktab_buf;
2709 for (etab = ktab; etab->start_offset; ++etab)
2710 etab->info_offset += KERNEL_START;
2713 if (ip < ktab[0].start_offset || ip >= etab[-1].end_offset)
2714 return -UNW_ENOINFO;
2716 di->format = UNW_INFO_FORMAT_TABLE;
2718 di->start_ip = ktab[0].start_offset;
2719 di->end_ip = etab[-1].end_offset;
2720 di->u.ti.name_ptr = (unw_word_t)
"<kernel>";
2721 di->u.ti.segbase = 0;
2722 di->u.ti.table_len = ((
char *) etab - (
char *) ktab) /
sizeof (unw_word_t);
2723 di->u.ti.table_data = (unw_word_t *) ktab;
2727 "segbase=%s, length=%s, gp=%s\n",
2728 (
char *) di->u.ti.name_ptr,
2737 ia64_find_unwind_table (
struct objfile *objfile, unw_word_t ip,
2738 unw_dyn_info_t *dip,
void **buf)
2740 Elf_Internal_Phdr *phdr, *p_text = NULL, *p_unwind = NULL;
2741 Elf_Internal_Ehdr *ehdr;
2742 unw_word_t segbase = 0;
2747 bfd = objfile->
obfd;
2749 ehdr = elf_tdata (bfd)->elf_header;
2750 phdr = elf_tdata (bfd)->phdr;
2754 for (i = 0; i < ehdr->e_phnum; ++i)
2756 switch (phdr[i].p_type)
2759 if ((unw_word_t) (ip - load_base - phdr[i].p_vaddr)
2764 case PT_IA_64_UNWIND:
2765 p_unwind = phdr + i;
2773 if (!p_text || !p_unwind)
2774 return -UNW_ENOINFO;
2781 segbase = p_text->p_vaddr + load_base;
2783 if ((p_unwind->p_vaddr - p_text->p_vaddr) >= p_text->p_memsz)
2786 for (i = 0; i < ehdr->e_phnum; ++i)
2788 if (phdr[i].p_type == PT_LOAD
2789 && (p_unwind->p_vaddr - phdr[i].p_vaddr) < phdr[i].p_memsz)
2794 segbase = phdr[i].p_vaddr + load_base;
2798 return -UNW_ENOINFO;
2801 dip->start_ip = p_text->p_vaddr + load_base;
2802 dip->end_ip = dip->start_ip + p_text->p_memsz;
2804 dip->format = UNW_INFO_FORMAT_REMOTE_TABLE;
2805 dip->u.rti.name_ptr = (unw_word_t) bfd_get_filename (bfd);
2806 dip->u.rti.segbase = segbase;
2807 dip->u.rti.table_len = p_unwind->p_memsz /
sizeof (unw_word_t);
2808 dip->u.rti.table_data = p_unwind->p_vaddr + load_base;
2815 ia64_find_proc_info_x (unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
2816 int need_unwind_info,
void *arg)
2828 if (get_kernel_table (ip, &di) < 0)
2829 return -UNW_ENOINFO;
2833 "(name=`%s',segbase=%s,start=%s,end=%s,gp=%s,"
2834 "length=%s,data=%s)\n",
2844 ret = ia64_find_unwind_table (sec->
objfile, ip, &di, &buf);
2850 "(name=`%s',segbase=%s,start=%s,end=%s,gp=%s,"
2851 "length=%s,data=%s)\n",
2871 ia64_put_unwind_info (unw_addr_space_t as,
2872 unw_proc_info_t *pip,
void *arg)
2880 ia64_get_dyn_info_list (unw_addr_space_t as,
2881 unw_word_t *dilap,
void *arg)
2884 struct objfile *objfile;
2885 unw_word_t ip, addr;
2890 return -UNW_ENOINFO;
2898 ret = ia64_find_unwind_table (objfile, ip, &di, &buf);
2909 "dynamic unwind table in objfile %s "
2911 bfd_get_filename (objfile->
obfd),
2918 return -UNW_ENOINFO;
2925 ia64_libunwind_frame_this_id (
struct frame_info *this_frame,
void **this_cache,
2950 "libunwind frame id: code %s, stack %s, "
2951 "special %s, this_frame %s\n",
2958 static struct value *
2959 ia64_libunwind_frame_prev_register (
struct frame_info *this_frame,
2960 void **this_cache,
int regnum)
2989 rrb_pr = (cfm >> 32) & 0x3f;
3010 struct value *cfm_val;
3033 ia64_libunwind_frame_sniffer (
const struct frame_unwind *
self,
3044 static const struct frame_unwind ia64_libunwind_frame_unwind =
3048 ia64_libunwind_frame_this_id,
3049 ia64_libunwind_frame_prev_register,
3051 ia64_libunwind_frame_sniffer,
3056 ia64_libunwind_sigtramp_frame_this_id (
struct frame_info *this_frame,
3084 "libunwind sigtramp frame id: code %s, "
3085 "stack %s, special %s, this_frame %s\n",
3092 static struct value *
3093 ia64_libunwind_sigtramp_frame_prev_register (
struct frame_info *this_frame,
3094 void **this_cache,
int regnum)
3098 struct value *prev_ip_val;
3110 void *tmp_cache = NULL;
3115 return ia64_libunwind_frame_prev_register (this_frame, this_cache, regnum);
3119 ia64_libunwind_sigtramp_frame_sniffer (
const struct frame_unwind *
self,
3133 static const struct frame_unwind ia64_libunwind_sigtramp_frame_unwind =
3137 ia64_libunwind_sigtramp_frame_this_id,
3138 ia64_libunwind_sigtramp_frame_prev_register,
3140 ia64_libunwind_sigtramp_frame_sniffer
3144 unw_accessors_t ia64_unw_accessors =
3146 ia64_find_proc_info_x,
3147 ia64_put_unwind_info,
3148 ia64_get_dyn_info_list,
3160 unw_accessors_t ia64_unw_rse_accessors =
3162 ia64_find_proc_info_x,
3163 ia64_put_unwind_info,
3164 ia64_get_dyn_info_list,
3166 ia64_access_rse_reg,
3167 ia64_access_rse_fpreg,
3179 &ia64_unw_accessors,
3180 &ia64_unw_rse_accessors,
3188 struct type *float_elt_type;
3202 if (float_elt_type != NULL
3225 struct type *float_elt_type;
3228 if (float_elt_type != NULL)
3239 (
char *)valbuf + offset, float_elt_type);
3272 memcpy ((
char *)valbuf + offset, &val, reglen);
3280 memcpy ((
char *)valbuf + offset, &val, m);
3290 struct type *float_elt_type;
3293 if (float_elt_type != NULL)
3321 memcpy (&val, (
char *)valbuf + offset, reglen);
3329 memcpy (&val, (
char *)valbuf + offset, m);
3337 struct type *valtype,
struct regcache *regcache,
3342 if (writebuf != NULL)
3348 if (readbuf != NULL)
3400 static struct type *
3403 struct type *et = 0;
3461 if (faddr_sect != NULL)
3478 while (addr < endaddr)
3489 if (tag == DT_PLTGOT)
3500 return global_pointer;
3542 if (faddr_sect && strcmp (faddr_sect->
the_bfd_section->name,
".opd") == 0)
3545 if (faddr_sect != NULL)
3561 while (addr < endaddr)
3572 if (faddr == faddr2)
3605 if (global_pointer == 0)
3684 pfs &= 0xc000000000000000LL;
3685 pfs |= (cfm & 0xffffffffffffLL);
3688 cfm &= 0xc000000000000000LL;
3713 struct regcache *regcache,
CORE_ADDR bp_addr,
3723 int nslots, rseslots, memslots, slotnum, nfuncargs;
3726 CORE_ADDR funcdescaddr, pc, global_pointer;
3732 for (argno = 0; argno < nargs; argno++)
3744 nslots += (len + 7) / 8;
3748 rseslots = (nslots > 8) ? 8 : nslots;
3749 memslots = nslots - rseslots;
3758 funcdescaddr = sp - nfuncargs * 16;
3759 funcdescaddr &= ~0xfLL;
3764 sp = sp - 16 - (memslots + nfuncargs) * 8;
3773 for (argno = 0; argno < nargs; argno++)
3775 struct type *float_elt_type;
3792 if (slotnum < rseslots)
3796 write_memory (sp + 16 + 8 * (slotnum - rseslots), val_buf, 8);
3812 memset (val_buf, 0, 8);
3819 (val_buf, 8, byte_order,
3835 (len > 8) ? 8 : len);
3838 if (slotnum < rseslots)
3842 write_memory (sp + 16 + 8 * (slotnum - rseslots), val_buf, 8);
3851 if (float_elt_type != NULL)
3878 if (global_pointer != 0)
3895 static const struct ia64_infcall_ops ia64_infcall_ops =
3917 "dummy frame id: code %s, stack %s, special %s\n",
3936 pc = (ip & ~0xf) | ((psr >> 41) & 3);
3944 return print_insn_ia64 (memaddr, info);
3952 return (cfm & 0x7f);
3955 static struct gdbarch *
3958 struct gdbarch *gdbarch;
4026 #ifdef HAVE_LIBUNWIND_IA64_H
4028 &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)
ULONGEST extract_unsigned_integer(const gdb_byte *, int, enum bfd_endian)
char * hex_string(LONGEST num)
#define target_has_registers
void libunwind_frame_set_descr(struct gdbarch *gdbarch, struct libunwind_descr *descr)
struct cleanup * make_show_memory_breakpoints_cleanup(int show)
#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 gdbarch * get_regcache_arch(const struct regcache *regcache)
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
initialize_file_ftype _initialize_ia64_tdep
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)
struct type * arch_float_type(struct gdbarch *gdbarch, int bit, char *name, const struct floatformat **floatformats)
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)
void convert_typed_floating(const void *from, const struct type *from_type, void *to, const struct type *to_type)
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 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
static int ia64_memory_remove_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
#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)
#define TYPE_FIELD_TYPE(thistype, n)
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
#define isScratch(_regnum_)
#define FRAME_OBSTACK_ZALLOC(TYPE)
void store_unsigned_integer(gdb_byte *, int, enum bfd_endian, ULONGEST)
static int slot_alignment_is_next_even(struct type *t)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR 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)
#define obj_section_addr(s)
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)
const char *( gdbarch_register_name_ftype)(struct gdbarch *gdbarch, int regnr)
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
void initialize_file_ftype(void)
struct symtab_and_line find_pc_line(CORE_ADDR pc, int notcurrent)
#define IA64_FR127_REGNUM
struct gdbarch *( gdbarch_init_ftype)(struct gdbarch_info info, struct gdbarch_list *arches)
int gdbarch_sp_regnum(struct gdbarch *gdbarch)
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
void * xzalloc(size_t size)
enum register_status regcache_cooked_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
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,...)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t int status
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)
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)
struct type *( gdbarch_register_type_ftype)(struct gdbarch *gdbarch, int reg_nr)
static char * ia64_register_names[]
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)
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
struct ui_file * gdb_stdlog
static const struct floatformat floatformat_ia64_ext_big
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)
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)
#define IS_NaT_COLLECTION_ADDR(addr)
#define IA64_NAT127_REGNUM
const char const char int
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)
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)
struct obj_section * sections_end
CORE_ADDR find_function_addr(struct value *function, struct type **retval_type)
void set_gdbarch_int_bit(struct gdbarch *gdbarch, int int_bit)
struct value * libunwind_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
static void ia64_extract_return_value(struct type *type, struct regcache *regcache, gdb_byte *valbuf)
const char * host_address_to_string(const void *addr)
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 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)
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
#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)
LONGEST extract_signed_integer(const gdb_byte *, int, enum bfd_endian)
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)
const gdb_byte *( gdbarch_breakpoint_from_pc_ftype)(struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
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)
CORE_ADDR( gdbarch_skip_prologue_ftype)(struct gdbarch *gdbarch, CORE_ADDR ip)
void do_cleanups(struct cleanup *old_chain)
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)
const ULONGEST const LONGEST len