40 #define G_FLD(_i,_ms,_ls) \
41 ((unsigned)((_i) << (31 - (_ms))) >> (31 - (_ms) + (_ls)))
45 unsigned long long raw;
62 && regnum < ((target_mach == bfd_mach_score7)
82 const char *score_register_names[] = {
83 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
84 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
85 "r16",
"r17",
"r18",
"r19",
"r20",
"r21",
"r22",
"r23",
86 "r24",
"r25",
"r26",
"r27",
"r28",
"r29",
"r30",
"r31",
88 "PSR",
"COND",
"ECR",
"EXCPVEC",
"CCR",
89 "EPC",
"EMA",
"TLBLOCK",
"TLBPT",
"PEADDR",
90 "TLBRPT",
"PEVN",
"PECTX",
"LIMPFN",
"LDMPFN",
91 "PREV",
"DREG",
"PC",
"DSAVE",
"COUNTER",
92 "LDCR",
"STCR",
"CEH",
"CEL",
96 return score_register_names[
regnum];
102 const char *score_register_names[] = {
103 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
104 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
105 "r16",
"r17",
"r18",
"r19",
"r20",
"r21",
"r22",
"r23",
106 "r24",
"r25",
"r26",
"r27",
"r28",
"r29",
"r30",
"r31",
108 "PSR",
"COND",
"ECR",
"EXCPVEC",
"CCR",
109 "EPC",
"EMA",
"PREV",
"DREG",
"DSAVE",
110 "COUNTER",
"LDCR",
"STCR",
"CEH",
"CEL",
115 return score_register_names[
regnum];
120 score_register_sim_regno (
struct gdbarch *gdbarch,
int regnum)
123 && regnum < ((target_mach == bfd_mach_score7)
132 if (info->endian == BFD_ENDIAN_BIG)
133 return print_insn_big_score (memaddr, info);
135 return print_insn_little_score (memaddr, info);
142 static inst_t inst = { 0, 0, 0 };
158 error (
_(
"Error: target_read_memory in file:%s, line:%d!"),
165 inst.
len = (inst.
raw & 0x80008000) ? 4 : 2;
166 inst.
v = ((inst.
raw >> 16 & 0x7FFF) << 15) | (inst.
raw & 0x7FFF);
167 big = (byte_order == BFD_ENDIAN_BIG);
170 if (big ^ ((addr & 0x2) == 2))
171 inst.
v =
G_FLD (inst.
v, 29, 15);
173 inst.
v =
G_FLD (inst.
v, 14, 0);
180 enum bfd_endian byte_order)
182 static inst_t inst = { 0, 0, 0 };
199 static const struct breakplace bk_table[16] =
221 #define EXTRACT_LEN 2
233 unsigned int cbits = 0;
242 for (i = 0; i < 5; i++)
250 error (
_(
"Error: target_read_memory in file:%s, line:%d!"),
255 cbits = (cbits << 1) | (raw >> 15);
262 cbits = (cbits >> 1) & 0x7;
268 cbits = (cbits >> 2) & 0x7;
269 bk_index = cbits + 8;
272 gdb_assert (!((bk_table[bk_index].break_offset == 0)
273 && (bk_table[bk_index].inst_len == 0)));
275 inst.
len = bk_table[bk_index].inst_len;
277 i = (bk_table[bk_index].break_offset + 4) / 2;
278 count = inst.
len / 2;
279 for (; count > 0; i++, count--)
281 inst.
raw = (inst.
raw << 16)
288 inst.
v = inst.
raw & 0x7FFF;
291 inst.
v = ((inst.
raw >> 16 & 0x7FFF) << 15) | (inst.
raw & 0x7FFF);
294 inst.
v = ((inst.
raw >> 32 & 0x7FFF) << 30)
295 | ((inst.
raw >> 16 & 0x7FFF) << 15) | (inst.
raw & 0x7FFF);
300 *pcptr = adjust_pc + bk_table[bk_index].break_offset;
302 *lenptr = bk_table[bk_index].inst_len;
320 error (
_(
"Error: target_read_memory in file:%s, line:%d!"),
325 if (byte_order == BFD_ENDIAN_BIG)
327 if (!(raw & 0x80008000))
330 static gdb_byte big_breakpoint16[] = { 0x60, 0x02 };
332 *lenptr =
sizeof (big_breakpoint16);
333 return big_breakpoint16;
338 static gdb_byte big_breakpoint32[] = { 0x80, 0x00, 0x80, 0x06 };
340 *lenptr =
sizeof (big_breakpoint32);
341 return big_breakpoint32;
346 if (!(raw & 0x80008000))
349 static gdb_byte little_breakpoint16[] = { 0x02, 0x60 };
351 *lenptr =
sizeof (little_breakpoint16);
352 return little_breakpoint16;
357 static gdb_byte little_breakpoint32[] = { 0x06, 0x80, 0x00, 0x80 };
359 *lenptr =
sizeof (little_breakpoint32);
360 return little_breakpoint32;
372 static gdb_byte score_break_insns[6][6] = {
375 { 0x80, 0x00, 0x00, 0x06 },
376 { 0x80, 0x00, 0x80, 0x00, 0x00, 0x00 },
379 { 0x00, 0x80, 0x06, 0x00 },
380 { 0x00, 0x80, 0x00, 0x80, 0x00, 0x00 }};
387 index = ((byte_order == BFD_ENDIAN_BIG) ? 0 : 3) + (len / 2 - 1);
388 p = score_break_insns[index];
401 if (target_mach == bfd_mach_score3)
418 enum bfd_endian endian,
gdb_byte *readbuf,
419 const gdb_byte *writebuf,
int buf_offset)
423 && regnum < ((target_mach == bfd_mach_score7)
431 case BFD_ENDIAN_LITTLE:
434 case BFD_ENDIAN_UNKNOWN:
438 error (
_(
"Error: score_xfer_register in file:%s, line:%d!"),
444 readbuf + buf_offset);
445 if (writebuf != NULL)
447 writebuf + buf_offset);
469 if (offset + xfer > TYPE_LENGTH (type))
470 xfer = TYPE_LENGTH (type) -
offset;
473 readbuf, writebuf, offset);
500 for (i = 0; i < n; i++)
527 for (argnum = 0; argnum < nargs; argnum++)
545 for (argnum = 0; argnum < nargs; argnum++)
547 struct value *arg = args[argnum];
551 int downward_offset = 0;
552 int odd_sized_struct_p;
553 int arg_last_part_p = 0;
597 if (byte_order == BFD_ENDIAN_BIG
598 && arg_last_part_p == 1
604 addr = sp + stack_offset + downward_offset;
615 arglen -= partial_len;
630 int iscan = 32, stack_sub = 0;
636 if ((inst->
len == 4) && !stack_sub
637 && (
G_FLD (inst->
v, 29, 25) == 0x1
638 &&
G_FLD (inst->
v, 24, 20) == 0x0))
644 else if ((inst->
len == 4)
645 && (
G_FLD (inst->
v, 29, 25) == 0x0)
646 && (
G_FLD (inst->
v, 24, 20) == 0x2)
647 && (
G_FLD (inst->
v, 19, 15) == 0x0)
648 && (
G_FLD (inst->
v, 14, 10) == 0xF)
649 && (
G_FLD (inst->
v, 9, 0) == 0x56))
655 else if ((inst->
len == 2)
656 && (
G_FLD (inst->
v, 14, 12) == 0x0)
657 && (
G_FLD (inst->
v, 11, 8) == 0x2)
658 && (
G_FLD (inst->
v, 7, 4) == 0x0)
659 && (
G_FLD (inst->
v, 3, 0) == 0x3))
665 else if ((inst->
len == 2)
666 && ((
G_FLD (inst->
v, 14, 12) == 3)
667 || (
G_FLD (inst->
v, 14, 12) == 4)
668 || (
G_FLD (inst->
v, 14, 12) == 0x0
669 &&
G_FLD (inst->
v, 3, 0) == 0x4)))
671 else if ((inst->
len == 4)
672 && ((
G_FLD (inst->
v, 29, 25) == 2)
673 || (
G_FLD (inst->
v, 29, 25) == 4)
674 || (
G_FLD (inst->
v, 29, 25) == 0x0
675 &&
G_FLD (inst->
v, 6, 1) == 0x4)))
687 int iscan = 32, stack_sub = 0;
696 if (inst->
len == 4 && !stack_sub
697 && (
G_FLD (inst->
v, 29, 25) == 0x1)
698 && (
G_FLD (inst->
v, 19, 17) == 0x0)
699 && (
G_FLD (inst->
v, 24, 20) == 0x0))
702 stack_sub = cpc + inst->
len;
703 pc = cpc + inst->
len;
705 else if (inst->
len == 4
706 && (
G_FLD (inst->
v, 29, 25) == 0x0)
707 && (
G_FLD (inst->
v, 24, 20) == 0x2)
708 && (
G_FLD (inst->
v, 19, 15) == 0x0)
709 && (
G_FLD (inst->
v, 14, 10) == 0xF)
710 && (
G_FLD (inst->
v, 9, 0) == 0x56))
713 pc = cpc + inst->
len;
716 else if ((inst->
len == 2)
717 && (
G_FLD (inst->
v, 14, 10) == 0x10)
718 && (
G_FLD (inst->
v, 9, 5) == 0x2)
719 && (
G_FLD (inst->
v, 4, 0) == 0x0))
722 pc = cpc + inst->
len;
725 else if (inst->
len == 2
726 && ((
G_FLD (inst->
v, 14, 12) == 3)
727 || (
G_FLD (inst->
v, 14, 12) == 0x0
728 &&
G_FLD (inst->
v, 11, 5) == 0x4)))
730 else if (inst->
len == 4
731 && ((
G_FLD (inst->
v, 29, 25) == 2)
732 || (
G_FLD (inst->
v, 29, 25) == 4)))
749 else if (
G_FLD (inst->
v, 14, 12) == 0x2
750 &&
G_FLD (inst->
v, 3, 0) == 0xa)
752 else if (
G_FLD (inst->
v, 14, 12) == 0x0
753 &&
G_FLD (inst->
v, 7, 0) == 0x34)
755 else if (
G_FLD (inst->
v, 29, 15) == 0x2
756 &&
G_FLD (inst->
v, 6, 1) == 0x2b)
758 else if (
G_FLD (inst->
v, 29, 25) == 0x0
759 &&
G_FLD (inst->
v, 6, 1) == 0x4
760 &&
G_FLD (inst->
v, 19, 15) == 0x3)
777 && (
G_FLD (inst->
v, 14, 10) == 0x10)
778 && (
G_FLD (inst->
v, 9, 5) == 0x0)
779 && (
G_FLD (inst->
v, 4, 0) == 0x2))
781 else if (inst->
len == 4
782 && (
G_FLD (inst->
v, 29, 25) == 0x0)
783 && (
G_FLD (inst->
v, 24, 20) == 0x2)
784 && (
G_FLD (inst->
v, 19, 15) == 0x0)
785 && (
G_FLD (inst->
v, 14, 10) == 0xF)
786 && (
G_FLD (inst->
v, 9, 0) == 0x56))
788 else if (inst->
len == 2
789 && (
G_FLD (inst->
v, 14, 12) == 0x0)
790 && (
G_FLD (inst->
v, 11, 5) == 0x2))
792 else if (inst->
len == 2
793 && (
G_FLD (inst->
v, 14, 12) == 0x0)
794 && (
G_FLD (inst->
v, 11, 7) == 0x0)
795 && (
G_FLD (inst->
v, 6, 5) == 0x2))
797 else if (inst->
len == 2
798 && (
G_FLD (inst->
v, 14, 12) == 0x0)
799 && (
G_FLD (inst->
v, 11, 5) == 0x4)
800 && (
G_FLD (inst->
v, 4, 0) == 0x3))
802 else if (inst->
len == 4
803 && (
G_FLD (inst->
v, 29, 25) == 0x0)
804 && (
G_FLD (inst->
v, 24, 20) == 0x0)
805 && (
G_FLD (inst->
v, 19, 15) == 0x3)
806 && (
G_FLD (inst->
v, 14, 10) == 0xF)
807 && (
G_FLD (inst->
v, 9, 0) == 0x8))
821 error (
_(
"Error: malloc size < 0 in file:%s, line:%d!"),
829 memset (memblock, 0, size);
833 error (
_(
"Error: target_read_memory in file:%s, line:%d!"),
854 else if (cur_pc - prev_pc == 2 && (cur_pc & 0x3) == 0)
859 else if (cur_pc - prev_pc == 4)
888 memblock_ptr = memblock =
894 for (; cur_pc < pc; prev_pc = cur_pc, cur_pc += inst_len)
897 if (memblock != NULL)
916 if (
G_FLD (inst->
v, 14, 12) == 0x2
917 &&
G_FLD (inst->
v, 3, 0) == 0xe)
922 if (
G_FLD (inst->
v, 11, 7) == 0x6
926 ra_offset = sp_offset;
929 else if (
G_FLD (inst->
v, 11, 7) == 0x4
933 fp_offset = sp_offset;
937 else if (
G_FLD (inst->
v, 14, 12) == 0x2
938 &&
G_FLD (inst->
v, 3, 0) == 0xa)
943 else if (
G_FLD (inst->
v, 14, 7) == 0xc1
944 &&
G_FLD (inst->
v, 2, 0) == 0x0)
947 sp_offset += (
int) pow (2,
G_FLD (inst->
v, 6, 3));
949 else if (
G_FLD (inst->
v, 14, 7) == 0xc0
950 &&
G_FLD (inst->
v, 2, 0) == 0x0)
953 sp_offset -= (
int) pow (2,
G_FLD (inst->
v, 6, 3));
960 if (
G_FLD(inst->
v, 29, 25) == 0x3
961 &&
G_FLD(inst->
v, 2, 0) == 0x4
962 &&
G_FLD(inst->
v, 19, 15) == 0)
967 if (
G_FLD(inst->
v, 24, 20) == 0x3)
970 if (ra_offset_p == 0)
972 ra_offset = sp_offset;
976 else if (
G_FLD(inst->
v, 24, 20) == 0x2)
979 if (fp_offset_p == 0)
981 fp_offset = sp_offset;
986 else if (
G_FLD(inst->
v, 29, 25) == 0x14
987 &&
G_FLD(inst->
v, 19,15) == 0)
990 if (
G_FLD(inst->
v, 24, 20) == 0x3)
993 ra_offset = sp_offset -
G_FLD(inst->
v, 14, 0);
996 else if (
G_FLD(inst->
v, 24, 20) == 0x2)
999 fp_offset = sp_offset -
G_FLD(inst->
v, 14, 0);
1003 else if (
G_FLD (inst->
v, 29, 15) == 0x1c60
1004 &&
G_FLD (inst->
v, 2, 0) == 0x0)
1010 else if (
G_FLD (inst->
v, 29, 15) == 0x1c40
1011 &&
G_FLD (inst->
v, 2, 0) == 0x0)
1018 else if (
G_FLD (inst->
v, 29, 17) == 0x100
1019 &&
G_FLD (inst->
v, 0, 0) == 0x0)
1022 sp_offset += 65536 -
G_FLD (inst->
v, 16, 1);
1024 else if (
G_FLD (inst->
v, 29, 17) == 0x110
1025 &&
G_FLD (inst->
v, 0, 0) == 0x0)
1028 if (pc - cur_pc > 4)
1030 unsigned int save_v = inst->
v;
1033 if (inst2->
v == 0x23)
1036 sp_offset -=
G_FLD (save_v, 16, 1);
1044 if (ra_offset_p == 1)
1048 sp + sp_offset - ra_offset;
1057 if (fp_offset_p == 1)
1061 sp + sp_offset - fp_offset;
1065 this_cache->
base = sp + sp_offset;
1066 this_cache->
fp = fp;
1069 if (memblock_ptr != NULL)
1087 int ra_offset_p = 0;
1088 int fp_offset_p = 0;
1096 for (; cur_pc < pc; prev_pc = cur_pc, cur_pc += inst_len)
1105 if (
G_FLD (inst->
v, 14, 12) == 0x0
1106 &&
G_FLD (inst->
v, 11, 7) == 0x0
1107 &&
G_FLD (inst->
v, 6, 5) == 0x3)
1112 if (
G_FLD (inst->
v, 4, 0) == 0x3
1113 && ra_offset_p == 0)
1116 ra_offset = sp_offset;
1119 else if (
G_FLD (inst->
v, 4, 0) == 0x2
1120 && fp_offset_p == 0)
1123 fp_offset = sp_offset;
1127 else if (
G_FLD (inst->
v, 14, 12) == 0x6
1128 &&
G_FLD (inst->
v, 11, 10) == 0x3)
1131 int start_r =
G_FLD (inst->
v, 9, 5);
1132 int cnt =
G_FLD (inst->
v, 4, 0);
1134 if ((ra_offset_p == 0)
1143 if ((fp_offset_p == 0)
1152 sp_offset += 4 * cnt;
1154 else if (
G_FLD (inst->
v, 14, 12) == 0x0
1155 &&
G_FLD (inst->
v, 11, 7) == 0x0
1156 &&
G_FLD (inst->
v, 6, 5) == 0x2)
1161 else if (
G_FLD (inst->
v, 14, 12) == 0x6
1162 &&
G_FLD (inst->
v, 11, 10) == 0x2)
1165 sp_offset -= 4 *
G_FLD (inst->
v, 4, 0);
1167 else if (
G_FLD (inst->
v, 14, 12) == 0x5
1168 &&
G_FLD (inst->
v, 11, 10) == 0x3
1169 &&
G_FLD (inst->
v, 9, 6) == 0x0)
1172 int imm =
G_FLD (inst->
v, 5, 0);
1174 imm = -(0x3F - imm + 1);
1177 else if (
G_FLD (inst->
v, 14, 12) == 0x5
1178 &&
G_FLD (inst->
v, 11, 10) == 0x3
1179 &&
G_FLD (inst->
v, 9, 6) == 0x2)
1182 if (pc - cur_pc >= 2)
1184 unsigned int save_v = inst->
v;
1187 cur_pc += inst->
len;
1192 &&
G_FLD (inst2->
v, 14, 10) == 0x10
1193 &&
G_FLD (inst2->
v, 9, 5) == 0x0
1194 &&
G_FLD (inst2->
v, 4, 0) == 0x2)
1197 int imm =
G_FLD (inst->
v, 5, 0);
1199 imm = -(0x3F - imm + 1);
1205 else if (inst->
len == 4)
1207 if (
G_FLD (inst->
v, 29, 25) == 0x3
1208 &&
G_FLD (inst->
v, 2, 0) == 0x4
1209 &&
G_FLD (inst->
v, 24, 20) == 0x3
1210 &&
G_FLD (inst->
v, 19, 15) == 0x0)
1213 sp_offset += inst->
len;
1214 if (ra_offset_p == 0)
1216 ra_offset = sp_offset;
1220 else if (
G_FLD (inst->
v, 29, 25) == 0x3
1221 &&
G_FLD (inst->
v, 2, 0) == 0x4
1222 &&
G_FLD (inst->
v, 24, 20) == 0x2
1223 &&
G_FLD (inst->
v, 19, 15) == 0x0)
1226 sp_offset += inst->
len;
1227 if (fp_offset_p == 0)
1229 fp_offset = sp_offset;
1233 else if (
G_FLD (inst->
v, 29, 25) == 0x7
1234 &&
G_FLD (inst->
v, 2, 0) == 0x0
1235 &&
G_FLD (inst->
v, 24, 20) == 0x3
1236 &&
G_FLD (inst->
v, 19, 15) == 0x0)
1239 sp_offset -= inst->
len;
1242 else if (
G_FLD (inst->
v, 29, 25) == 0x7
1243 &&
G_FLD (inst->
v, 2, 0) == 0x0
1244 &&
G_FLD (inst->
v, 24, 20) == 0x2
1245 &&
G_FLD (inst->
v, 19, 15) == 0x0)
1248 sp_offset -= inst->
len;
1251 else if (
G_FLD (inst->
v, 29, 25) == 0x1
1252 &&
G_FLD (inst->
v, 19, 17) == 0x0
1253 &&
G_FLD (inst->
v, 24, 20) == 0x0
1254 &&
G_FLD (inst->
v, 0, 0) == 0x0)
1257 int imm =
G_FLD (inst->
v, 16, 1);
1259 imm = -(0xFFFF - imm + 1);
1262 else if (
G_FLD (inst->
v, 29, 25) == 0x1
1263 &&
G_FLD (inst->
v, 19, 17) == 0x0
1264 &&
G_FLD (inst->
v, 24, 20) == 0x2
1265 &&
G_FLD (inst->
v, 0, 0) == 0x0)
1268 if (pc - cur_pc >= 2)
1270 unsigned int save_v = inst->
v;
1273 cur_pc += inst->
len;
1278 &&
G_FLD (inst2->
v, 14, 10) == 0x10
1279 &&
G_FLD (inst2->
v, 9, 5) == 0x0
1280 &&
G_FLD (inst2->
v, 4, 0) == 0x2)
1283 int imm =
G_FLD (inst->
v, 16, 1);
1285 imm = -(0xFFFF - imm + 1);
1294 if (ra_offset_p == 1)
1298 sp + sp_offset - ra_offset;
1307 if (fp_offset_p == 1)
1311 sp + sp_offset - fp_offset;
1315 this_cache->
base = sp + sp_offset;
1316 this_cache->
fp = fp;
1324 if ((*this_cache) != NULL)
1325 return (*this_cache);
1328 (*this_cache) = cache;
1337 if (start_addr == 0)
1340 if (target_mach == bfd_mach_score3)
1349 return (*this_cache);
1361 static struct value *
1363 void **this_cache,
int regnum)
1425 #define SCORE7_LINUX_EPC_OFFSET (44 * 4)
1426 #define SCORE7_LINUX_SIZEOF_GREGSET (49 * 4)
1431 int regnum,
const void *buf,
1445 static const struct regset score7_linux_gregset =
1464 static struct gdbarch *
1467 struct gdbarch *gdbarch;
1496 switch (target_mach)
1498 case bfd_mach_score7:
1510 case bfd_mach_score3:
void set_gdbarch_num_regs(struct gdbarch *gdbarch, int num_regs)
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_have_nonsteppable_watchpoint(struct gdbarch *gdbarch, int have_nonsteppable_watchpoint)
ULONGEST extract_unsigned_integer(const gdb_byte *, int, enum bfd_endian)
static CORE_ADDR score7_skip_prologue(struct gdbarch *gdbarch, CORE_ADDR pc)
static const gdb_byte * score3_breakpoint_from_pc(struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
static int score3_stack_frame_destroyed_p(struct gdbarch *gdbarch, CORE_ADDR cur_pc)
struct frame_id frame_id_build(CORE_ADDR stack_addr, CORE_ADDR code_addr)
static int score_type_needs_double_align(struct type *type)
struct trad_frame_saved_reg * saved_regs
void set_gdbarch_float_bit(struct gdbarch *gdbarch, int float_bit)
CORE_ADDR get_frame_pc(struct frame_info *frame)
struct value * trad_frame_get_prev_register(struct frame_info *this_frame, struct trad_frame_saved_reg this_saved_regs[], int regnum)
void trad_frame_set_value(struct trad_frame_saved_reg this_saved_regs[], int regnum, LONGEST val)
ULONGEST align_down(ULONGEST v, int n)
ULONGEST frame_unwind_register_unsigned(struct frame_info *frame, int regnum)
void set_gdbarch_short_bit(struct gdbarch *gdbarch, int short_bit)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
void regcache_supply_regset(const struct regset *regset, struct regcache *regcache, int regnum, const void *buf, size_t size)
static void score7_linux_iterate_over_regset_sections(struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
static struct frame_id score_dummy_id(struct gdbarch *gdbarch, struct frame_info *this_frame)
void regcache_cooked_write_part(struct regcache *regcache, int regnum, int offset, int len, const gdb_byte *buf)
struct gdbarch_list * gdbarch_list_lookup_by_info(struct gdbarch_list *arches, const struct gdbarch_info *info)
static struct gdbarch * score_gdbarch_init(struct gdbarch_info info, struct gdbarch_list *arches)
#define SCORE7_LINUX_EPC_OFFSET
const struct bfd_arch_info * bfd_arch_info
static CORE_ADDR score3_skip_prologue(struct gdbarch *gdbarch, CORE_ADDR pc)
#define TYPE_FIELD_TYPE(thistype, n)
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
static const gdb_byte * score7_breakpoint_from_pc(struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
#define SCORE_BEGIN_ARG_REGNUM
#define FRAME_OBSTACK_ZALLOC(TYPE)
void gdbarch_register(enum bfd_architecture bfd_architecture, gdbarch_init_ftype *init, gdbarch_dump_tdep_ftype *dump_tdep)
static const struct frame_base * score_prologue_frame_base_sniffer(struct frame_info *this_frame)
static gdb_byte * score7_malloc_and_get_memblock(CORE_ADDR addr, CORE_ADDR size)
static CORE_ADDR score_unwind_pc(struct gdbarch *gdbarch, struct frame_info *next_frame)
#define SCORE_LAST_ARG_REGNUM
void set_gdbarch_register_type(struct gdbarch *gdbarch, gdbarch_register_type_ftype register_type)
struct type * check_typedef(struct type *type)
const struct frame_base * dwarf2_frame_base_sniffer(struct frame_info *this_frame)
const gdb_byte * value_contents(struct value *value)
void initialize_file_ftype(void)
static const struct frame_base score_prologue_frame_base
static const char * score3_register_name(struct gdbarch *gdbarch, int regnum)
void set_gdbarch_stack_frame_destroyed_p(struct gdbarch *gdbarch, gdbarch_stack_frame_destroyed_p_ftype stack_frame_destroyed_p)
void set_gdbarch_sp_regnum(struct gdbarch *gdbarch, int sp_regnum)
void set_gdbarch_dummy_id(struct gdbarch *gdbarch, gdbarch_dummy_id_ftype dummy_id)
static struct value * score_prologue_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
void set_gdbarch_adjust_breakpoint_address(struct gdbarch *gdbarch, gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
static void score_prologue_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
static CORE_ADDR score_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_register_sim_regno(struct gdbarch *gdbarch, gdbarch_register_sim_regno_ftype register_sim_regno)
static void score3_analyze_prologue(CORE_ADDR startaddr, CORE_ADDR pc, struct frame_info *this_frame, struct score_frame_cache *this_cache)
#define SCORE7_LINUX_SIZEOF_GREGSET
int find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr)
void regcache_collect_regset(const struct regset *regset, const struct regcache *regcache, int regnum, void *buf, size_t size)
void set_gdbarch_unwind_pc(struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype unwind_pc)
static void score_xfer_register(struct regcache *regcache, int regnum, int length, enum bfd_endian endian, gdb_byte *readbuf, const gdb_byte *writebuf, int buf_offset)
void set_gdbarch_breakpoint_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
struct type * builtin_uint32
int default_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
static int score_print_insn(bfd_vma memaddr, struct disassemble_info *info)
void set_gdbarch_unwind_sp(struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype unwind_sp)
#define target_has_execution
static const struct regcache_map_entry score7_linux_gregmap[]
static CORE_ADDR score_frame_align(struct gdbarch *gdbarch, CORE_ADDR addr)
void( iterate_over_regset_sections_cb)(const char *sect_name, int size, const struct regset *regset, const char *human_name, void *cb_data)
static void score7_free_memblock(gdb_byte *memblock)
ULONGEST get_frame_register_unsigned(struct frame_info *frame, int regnum)
static struct score_frame_cache * score_make_prologue_cache(struct frame_info *this_frame, void **this_cache)
static CORE_ADDR score_prologue_frame_base_address(struct frame_info *this_frame, void **this_cache)
static const char * score7_register_name(struct gdbarch *gdbarch, int regnum)
struct trad_frame_saved_reg * trad_frame_alloc_saved_regs(struct frame_info *this_frame)
const char const char int
int core_addr_lessthan(CORE_ADDR lhs, CORE_ADDR rhs)
ULONGEST align_up(ULONGEST v, int n)
static CORE_ADDR score_unwind_sp(struct gdbarch *gdbarch, struct frame_info *next_frame)
#define TYPE_CODE(thistype)
static struct type * score_register_type(struct gdbarch *gdbarch, int regnum)
static int score7_stack_frame_destroyed_p(struct gdbarch *gdbarch, CORE_ADDR cur_pc)
void regcache_cooked_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
static const struct frame_unwind score_prologue_unwind
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
void set_gdbarch_int_bit(struct gdbarch *gdbarch, int int_bit)
initialize_file_ftype _initialize_score_tdep
#define TYPE_NFIELDS(thistype)
void dwarf2_append_unwinders(struct gdbarch *gdbarch)
static CORE_ADDR score_adjust_breakpoint_address(struct gdbarch *gdbarch, CORE_ADDR bpaddr)
void regcache_raw_supply(struct regcache *regcache, int regnum, const void *buf)
void frame_base_append_sniffer(struct gdbarch *gdbarch, frame_base_sniffer_ftype *sniffer)
void set_gdbarch_call_dummy_location(struct gdbarch *gdbarch, int call_dummy_location)
unsigned long long ULONGEST
enum unwind_stop_reason default_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
void set_gdbarch_long_double_bit(struct gdbarch *gdbarch, int long_double_bit)
#define G_FLD(_i, _ms, _ls)
struct type * value_type(const struct value *value)
enum register_status regcache_cooked_read_part(struct regcache *regcache, int regnum, int offset, int len, gdb_byte *buf)
void set_gdbarch_return_value(struct gdbarch *gdbarch, gdbarch_return_value_ftype return_value)
#define TYPE_LENGTH(thistype)
void set_gdbarch_push_dummy_call(struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype push_dummy_call)
static inst_t * score3_adjust_pc_and_fetch_inst(CORE_ADDR *pcptr, int *lenptr, enum bfd_endian byte_order)
void set_gdbarch_iterate_over_regset_sections(struct gdbarch *gdbarch, gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections)
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)
static void score7_adjust_memblock_ptr(gdb_byte **memblock, CORE_ADDR prev_pc, CORE_ADDR cur_pc)
static enum return_value_convention score_return_value(struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
enum bfd_endian byte_order
void set_gdbarch_pc_regnum(struct gdbarch *gdbarch, int pc_regnum)
void set_gdbarch_register_name(struct gdbarch *gdbarch, gdbarch_register_name_ftype register_name)
CORE_ADDR get_frame_func(struct frame_info *this_frame)
static void score7_linux_supply_gregset(const struct regset *regset, struct regcache *regcache, int regnum, const void *buf, size_t size)
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 void score7_analyze_prologue(CORE_ADDR startaddr, CORE_ADDR pc, struct frame_info *this_frame, struct score_frame_cache *this_cache)
struct gdbarch * get_frame_arch(struct frame_info *this_frame)
void set_gdbarch_print_insn(struct gdbarch *gdbarch, gdbarch_print_insn_ftype print_insn)
static inst_t * score7_fetch_inst(struct gdbarch *gdbarch, CORE_ADDR addr, gdb_byte *memblock)
const ULONGEST const LONGEST len