40 #define G_FLD(_i,_ms,_ls) \ 41 ((unsigned)((_i) << (31 - (_ms))) >> (31 - (_ms) + (_ls))) 45 unsigned long long raw;
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];
133 static inst_t inst = { 0, 0, 0 };
149 error (
_(
"Error: target_read_memory in file:%s, line:%d!"),
156 inst.
len = (inst.
raw & 0x80008000) ? 4 : 2;
157 inst.
v = ((inst.
raw >> 16 & 0x7FFF) << 15) | (inst.
raw & 0x7FFF);
158 big = (byte_order == BFD_ENDIAN_BIG);
161 if (big ^ ((addr & 0x2) == 2))
162 inst.
v =
G_FLD (inst.
v, 29, 15);
164 inst.
v =
G_FLD (inst.
v, 14, 0);
171 enum bfd_endian byte_order)
173 static inst_t inst = { 0, 0, 0 };
190 static const struct breakplace bk_table[16] =
212 #define EXTRACT_LEN 2 224 unsigned int cbits = 0;
233 for (i = 0; i < 5; i++)
241 error (
_(
"Error: target_read_memory in file:%s, line:%d!"),
246 cbits = (cbits << 1) | (raw >> 15);
253 cbits = (cbits >> 1) & 0x7;
259 cbits = (cbits >> 2) & 0x7;
260 bk_index = cbits + 8;
263 gdb_assert (!((bk_table[bk_index].break_offset == 0)
264 && (bk_table[bk_index].inst_len == 0)));
266 inst.
len = bk_table[bk_index].inst_len;
268 i = (bk_table[bk_index].break_offset + 4) / 2;
269 count = inst.
len / 2;
270 for (; count > 0; i++, count--)
272 inst.
raw = (inst.
raw << 16)
279 inst.
v = inst.
raw & 0x7FFF;
282 inst.
v = ((inst.
raw >> 16 & 0x7FFF) << 15) | (inst.
raw & 0x7FFF);
285 inst.
v = ((inst.
raw >> 32 & 0x7FFF) << 30)
286 | ((inst.
raw >> 16 & 0x7FFF) << 15) | (inst.
raw & 0x7FFF);
291 *pcptr = adjust_pc + bk_table[bk_index].break_offset;
293 *lenptr = bk_table[bk_index].inst_len;
312 error (
_(
"Error: target_read_memory in file:%s, line:%d!"),
317 if (!(raw & 0x80008000))
342 static gdb_byte big_breakpoint32[] = { 0x80, 0x00, 0x80, 0x06 };
343 static gdb_byte little_breakpoint32[] = { 0x06, 0x80, 0x00, 0x80 };
345 if (byte_order == BFD_ENDIAN_BIG)
346 return big_breakpoint32;
348 return little_breakpoint32;
352 static gdb_byte big_breakpoint16[] = { 0x60, 0x02 };
353 static gdb_byte little_breakpoint16[] = { 0x02, 0x60 };
355 if (byte_order == BFD_ENDIAN_BIG)
356 return big_breakpoint16;
358 return little_breakpoint16;
382 static gdb_byte score_break_insns[6][6] = {
385 { 0x80, 0x00, 0x00, 0x06 },
386 { 0x80, 0x00, 0x80, 0x00, 0x00, 0x00 },
389 { 0x00, 0x80, 0x06, 0x00 },
390 { 0x00, 0x80, 0x00, 0x80, 0x00, 0x00 }};
394 index = ((byte_order == BFD_ENDIAN_BIG) ? 0 : 3) + (kind / 2 - 1);
395 return score_break_insns[index];
420 enum bfd_endian endian,
gdb_byte *readbuf,
421 const gdb_byte *writebuf,
int buf_offset)
433 case BFD_ENDIAN_LITTLE:
436 case BFD_ENDIAN_UNKNOWN:
440 error (
_(
"Error: score_xfer_register in file:%s, line:%d!"),
446 readbuf + buf_offset);
447 if (writebuf != NULL)
449 writebuf + buf_offset);
475 readbuf, writebuf,
offset);
502 for (i = 0; i < n; i++)
529 for (argnum = 0; argnum < nargs; argnum++)
547 for (argnum = 0; argnum < nargs; argnum++)
549 struct value *arg = args[argnum];
553 int downward_offset = 0;
554 int arg_last_part_p = 0;
596 if (byte_order == BFD_ENDIAN_BIG
597 && arg_last_part_p == 1
603 addr = sp + stack_offset + downward_offset;
614 arglen -= partial_len;
629 int iscan = 32, stack_sub = 0;
635 if ((inst->
len == 4) && !stack_sub
636 && (
G_FLD (inst->
v, 29, 25) == 0x1
637 &&
G_FLD (inst->
v, 24, 20) == 0x0))
643 else if ((inst->
len == 4)
644 && (
G_FLD (inst->
v, 29, 25) == 0x0)
645 && (
G_FLD (inst->
v, 24, 20) == 0x2)
646 && (
G_FLD (inst->
v, 19, 15) == 0x0)
647 && (
G_FLD (inst->
v, 14, 10) == 0xF)
648 && (
G_FLD (inst->
v, 9, 0) == 0x56))
654 else if ((inst->
len == 2)
655 && (
G_FLD (inst->
v, 14, 12) == 0x0)
656 && (
G_FLD (inst->
v, 11, 8) == 0x2)
657 && (
G_FLD (inst->
v, 7, 4) == 0x0)
658 && (
G_FLD (inst->
v, 3, 0) == 0x3))
664 else if ((inst->
len == 2)
665 && ((
G_FLD (inst->
v, 14, 12) == 3)
666 || (
G_FLD (inst->
v, 14, 12) == 4)
667 || (
G_FLD (inst->
v, 14, 12) == 0x0
668 &&
G_FLD (inst->
v, 3, 0) == 0x4)))
670 else if ((inst->
len == 4)
671 && ((
G_FLD (inst->
v, 29, 25) == 2)
672 || (
G_FLD (inst->
v, 29, 25) == 4)
673 || (
G_FLD (inst->
v, 29, 25) == 0x0
674 &&
G_FLD (inst->
v, 6, 1) == 0x4)))
686 int iscan = 32, stack_sub = 0;
695 if (inst->
len == 4 && !stack_sub
696 && (
G_FLD (inst->
v, 29, 25) == 0x1)
697 && (
G_FLD (inst->
v, 19, 17) == 0x0)
698 && (
G_FLD (inst->
v, 24, 20) == 0x0))
701 stack_sub = cpc + inst->
len;
702 pc = cpc + inst->
len;
704 else if (inst->
len == 4
705 && (
G_FLD (inst->
v, 29, 25) == 0x0)
706 && (
G_FLD (inst->
v, 24, 20) == 0x2)
707 && (
G_FLD (inst->
v, 19, 15) == 0x0)
708 && (
G_FLD (inst->
v, 14, 10) == 0xF)
709 && (
G_FLD (inst->
v, 9, 0) == 0x56))
712 pc = cpc + inst->
len;
715 else if ((inst->
len == 2)
716 && (
G_FLD (inst->
v, 14, 10) == 0x10)
717 && (
G_FLD (inst->
v, 9, 5) == 0x2)
718 && (
G_FLD (inst->
v, 4, 0) == 0x0))
721 pc = cpc + inst->
len;
724 else if (inst->
len == 2
725 && ((
G_FLD (inst->
v, 14, 12) == 3)
726 || (
G_FLD (inst->
v, 14, 12) == 0x0
727 &&
G_FLD (inst->
v, 11, 5) == 0x4)))
729 else if (inst->
len == 4
730 && ((
G_FLD (inst->
v, 29, 25) == 2)
731 || (
G_FLD (inst->
v, 29, 25) == 4)))
748 else if (
G_FLD (inst->
v, 14, 12) == 0x2
749 &&
G_FLD (inst->
v, 3, 0) == 0xa)
751 else if (
G_FLD (inst->
v, 14, 12) == 0x0
752 &&
G_FLD (inst->
v, 7, 0) == 0x34)
754 else if (
G_FLD (inst->
v, 29, 15) == 0x2
755 &&
G_FLD (inst->
v, 6, 1) == 0x2b)
757 else if (
G_FLD (inst->
v, 29, 25) == 0x0
758 &&
G_FLD (inst->
v, 6, 1) == 0x4
759 &&
G_FLD (inst->
v, 19, 15) == 0x3)
776 && (
G_FLD (inst->
v, 14, 10) == 0x10)
777 && (
G_FLD (inst->
v, 9, 5) == 0x0)
778 && (
G_FLD (inst->
v, 4, 0) == 0x2))
780 else if (inst->
len == 4
781 && (
G_FLD (inst->
v, 29, 25) == 0x0)
782 && (
G_FLD (inst->
v, 24, 20) == 0x2)
783 && (
G_FLD (inst->
v, 19, 15) == 0x0)
784 && (
G_FLD (inst->
v, 14, 10) == 0xF)
785 && (
G_FLD (inst->
v, 9, 0) == 0x56))
787 else if (inst->
len == 2
788 && (
G_FLD (inst->
v, 14, 12) == 0x0)
789 && (
G_FLD (inst->
v, 11, 5) == 0x2))
791 else if (inst->
len == 2
792 && (
G_FLD (inst->
v, 14, 12) == 0x0)
793 && (
G_FLD (inst->
v, 11, 7) == 0x0)
794 && (
G_FLD (inst->
v, 6, 5) == 0x2))
796 else if (inst->
len == 2
797 && (
G_FLD (inst->
v, 14, 12) == 0x0)
798 && (
G_FLD (inst->
v, 11, 5) == 0x4)
799 && (
G_FLD (inst->
v, 4, 0) == 0x3))
801 else if (inst->
len == 4
802 && (
G_FLD (inst->
v, 29, 25) == 0x0)
803 && (
G_FLD (inst->
v, 24, 20) == 0x0)
804 && (
G_FLD (inst->
v, 19, 15) == 0x3)
805 && (
G_FLD (inst->
v, 14, 10) == 0xF)
806 && (
G_FLD (inst->
v, 9, 0) == 0x8))
826 error (
_(
"Error: target_read_memory in file:%s, line:%d!"),
847 else if (cur_pc - prev_pc == 2 && (cur_pc & 0x3) == 0)
852 else if (cur_pc - prev_pc == 4)
881 memblock_ptr = memblock =
887 for (; cur_pc < pc; prev_pc = cur_pc, cur_pc += inst_len)
890 if (memblock != NULL)
909 if (
G_FLD (inst->
v, 14, 12) == 0x2
910 &&
G_FLD (inst->
v, 3, 0) == 0xe)
915 if (
G_FLD (inst->
v, 11, 7) == 0x6
919 ra_offset = sp_offset;
922 else if (
G_FLD (inst->
v, 11, 7) == 0x4
926 fp_offset = sp_offset;
930 else if (
G_FLD (inst->
v, 14, 12) == 0x2
931 &&
G_FLD (inst->
v, 3, 0) == 0xa)
936 else if (
G_FLD (inst->
v, 14, 7) == 0xc1
937 &&
G_FLD (inst->
v, 2, 0) == 0x0)
940 sp_offset += (int) pow (2,
G_FLD (inst->
v, 6, 3));
942 else if (
G_FLD (inst->
v, 14, 7) == 0xc0
943 &&
G_FLD (inst->
v, 2, 0) == 0x0)
946 sp_offset -= (int) pow (2,
G_FLD (inst->
v, 6, 3));
953 if (
G_FLD(inst->
v, 29, 25) == 0x3
954 &&
G_FLD(inst->
v, 2, 0) == 0x4
955 &&
G_FLD(inst->
v, 19, 15) == 0)
960 if (
G_FLD(inst->
v, 24, 20) == 0x3)
963 if (ra_offset_p == 0)
965 ra_offset = sp_offset;
969 else if (
G_FLD(inst->
v, 24, 20) == 0x2)
972 if (fp_offset_p == 0)
974 fp_offset = sp_offset;
979 else if (
G_FLD(inst->
v, 29, 25) == 0x14
980 &&
G_FLD(inst->
v, 19,15) == 0)
983 if (
G_FLD(inst->
v, 24, 20) == 0x3)
986 ra_offset = sp_offset -
G_FLD(inst->
v, 14, 0);
989 else if (
G_FLD(inst->
v, 24, 20) == 0x2)
992 fp_offset = sp_offset -
G_FLD(inst->
v, 14, 0);
996 else if (
G_FLD (inst->
v, 29, 15) == 0x1c60
997 &&
G_FLD (inst->
v, 2, 0) == 0x0)
1003 else if (
G_FLD (inst->
v, 29, 15) == 0x1c40
1004 &&
G_FLD (inst->
v, 2, 0) == 0x0)
1011 else if (
G_FLD (inst->
v, 29, 17) == 0x100
1012 &&
G_FLD (inst->
v, 0, 0) == 0x0)
1015 sp_offset += 65536 -
G_FLD (inst->
v, 16, 1);
1017 else if (
G_FLD (inst->
v, 29, 17) == 0x110
1018 &&
G_FLD (inst->
v, 0, 0) == 0x0)
1021 if (pc - cur_pc > 4)
1023 unsigned int save_v = inst->
v;
1026 if (inst2->
v == 0x23)
1029 sp_offset -=
G_FLD (save_v, 16, 1);
1037 if (ra_offset_p == 1)
1041 sp + sp_offset - ra_offset;
1050 if (fp_offset_p == 1)
1054 sp + sp_offset - fp_offset;
1058 this_cache->
base = sp + sp_offset;
1059 this_cache->
fp = fp;
1062 if (memblock_ptr != NULL)
1080 int ra_offset_p = 0;
1081 int fp_offset_p = 0;
1087 for (; cur_pc < pc; cur_pc += inst_len)
1096 if (
G_FLD (inst->
v, 14, 12) == 0x0
1097 &&
G_FLD (inst->
v, 11, 7) == 0x0
1098 &&
G_FLD (inst->
v, 6, 5) == 0x3)
1103 if (
G_FLD (inst->
v, 4, 0) == 0x3
1104 && ra_offset_p == 0)
1107 ra_offset = sp_offset;
1110 else if (
G_FLD (inst->
v, 4, 0) == 0x2
1111 && fp_offset_p == 0)
1114 fp_offset = sp_offset;
1118 else if (
G_FLD (inst->
v, 14, 12) == 0x6
1119 &&
G_FLD (inst->
v, 11, 10) == 0x3)
1122 int start_r =
G_FLD (inst->
v, 9, 5);
1123 int cnt =
G_FLD (inst->
v, 4, 0);
1125 if ((ra_offset_p == 0)
1134 if ((fp_offset_p == 0)
1143 sp_offset += 4 * cnt;
1145 else if (
G_FLD (inst->
v, 14, 12) == 0x0
1146 &&
G_FLD (inst->
v, 11, 7) == 0x0
1147 &&
G_FLD (inst->
v, 6, 5) == 0x2)
1152 else if (
G_FLD (inst->
v, 14, 12) == 0x6
1153 &&
G_FLD (inst->
v, 11, 10) == 0x2)
1156 sp_offset -= 4 *
G_FLD (inst->
v, 4, 0);
1158 else if (
G_FLD (inst->
v, 14, 12) == 0x5
1159 &&
G_FLD (inst->
v, 11, 10) == 0x3
1160 &&
G_FLD (inst->
v, 9, 6) == 0x0)
1163 int imm =
G_FLD (inst->
v, 5, 0);
1165 imm = -(0x3F - imm + 1);
1168 else if (
G_FLD (inst->
v, 14, 12) == 0x5
1169 &&
G_FLD (inst->
v, 11, 10) == 0x3
1170 &&
G_FLD (inst->
v, 9, 6) == 0x2)
1173 if (pc - cur_pc >= 2)
1177 cur_pc += inst->
len;
1182 &&
G_FLD (inst2->
v, 14, 10) == 0x10
1183 &&
G_FLD (inst2->
v, 9, 5) == 0x0
1184 &&
G_FLD (inst2->
v, 4, 0) == 0x2)
1187 int imm =
G_FLD (inst->
v, 5, 0);
1189 imm = -(0x3F - imm + 1);
1195 else if (inst->
len == 4)
1197 if (
G_FLD (inst->
v, 29, 25) == 0x3
1198 &&
G_FLD (inst->
v, 2, 0) == 0x4
1199 &&
G_FLD (inst->
v, 24, 20) == 0x3
1200 &&
G_FLD (inst->
v, 19, 15) == 0x0)
1203 sp_offset += inst->
len;
1204 if (ra_offset_p == 0)
1206 ra_offset = sp_offset;
1210 else if (
G_FLD (inst->
v, 29, 25) == 0x3
1211 &&
G_FLD (inst->
v, 2, 0) == 0x4
1212 &&
G_FLD (inst->
v, 24, 20) == 0x2
1213 &&
G_FLD (inst->
v, 19, 15) == 0x0)
1216 sp_offset += inst->
len;
1217 if (fp_offset_p == 0)
1219 fp_offset = sp_offset;
1223 else if (
G_FLD (inst->
v, 29, 25) == 0x7
1224 &&
G_FLD (inst->
v, 2, 0) == 0x0
1225 &&
G_FLD (inst->
v, 24, 20) == 0x3
1226 &&
G_FLD (inst->
v, 19, 15) == 0x0)
1229 sp_offset -= inst->
len;
1232 else if (
G_FLD (inst->
v, 29, 25) == 0x7
1233 &&
G_FLD (inst->
v, 2, 0) == 0x0
1234 &&
G_FLD (inst->
v, 24, 20) == 0x2
1235 &&
G_FLD (inst->
v, 19, 15) == 0x0)
1238 sp_offset -= inst->
len;
1241 else if (
G_FLD (inst->
v, 29, 25) == 0x1
1242 &&
G_FLD (inst->
v, 19, 17) == 0x0
1243 &&
G_FLD (inst->
v, 24, 20) == 0x0
1244 &&
G_FLD (inst->
v, 0, 0) == 0x0)
1247 int imm =
G_FLD (inst->
v, 16, 1);
1249 imm = -(0xFFFF - imm + 1);
1252 else if (
G_FLD (inst->
v, 29, 25) == 0x1
1253 &&
G_FLD (inst->
v, 19, 17) == 0x0
1254 &&
G_FLD (inst->
v, 24, 20) == 0x2
1255 &&
G_FLD (inst->
v, 0, 0) == 0x0)
1258 if (pc - cur_pc >= 2)
1262 cur_pc += inst->
len;
1267 &&
G_FLD (inst2->
v, 14, 10) == 0x10
1268 &&
G_FLD (inst2->
v, 9, 5) == 0x0
1269 &&
G_FLD (inst2->
v, 4, 0) == 0x2)
1272 int imm =
G_FLD (inst->
v, 16, 1);
1274 imm = -(0xFFFF - imm + 1);
1283 if (ra_offset_p == 1)
1287 sp + sp_offset - ra_offset;
1296 if (fp_offset_p == 1)
1300 sp + sp_offset - fp_offset;
1304 this_cache->
base = sp + sp_offset;
1305 this_cache->
fp = fp;
1313 if ((*this_cache) != NULL)
1317 (*this_cache) = cache;
1326 if (start_addr == 0)
1352 static struct value *
1354 void **this_cache,
int regnum)
1416 #define SCORE7_LINUX_EPC_OFFSET (44 * 4) 1417 #define SCORE7_LINUX_SIZEOF_GREGSET (49 * 4) 1422 int regnum,
const void *buf,
1488 case bfd_mach_score7:
1503 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)
static const struct regset score7_linux_gregset
static CORE_ADDR score7_skip_prologue(struct gdbarch *gdbarch, CORE_ADDR pc)
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() iterate_over_regset_sections_cb(const char *sect_name, int size, const struct regset *regset, const char *human_name, void *cb_data)
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 * memset(T *s, int c, size_t n)=delete
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)
#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)
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)
static ULONGEST extract_unsigned_integer(const gdb_byte *addr, int len, enum bfd_endian byte_order)
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)
struct type * builtin_uint32
int default_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
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 int score3_breakpoint_kind_from_pc(struct gdbarch *gdbarch, CORE_ADDR *pcptr)
static CORE_ADDR score_frame_align(struct gdbarch *gdbarch, CORE_ADDR addr)
static void score7_free_memblock(gdb_byte *memblock)
ULONGEST get_frame_register_unsigned(struct frame_info *frame, int regnum)
void set_gdbarch_breakpoint_kind_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_kind_from_pc_ftype breakpoint_kind_from_pc)
struct trad_frame_saved_reg * trad_frame_alloc_saved_regs(struct gdbarch *gdbarch)
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)
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)
static const gdb_byte * score7_sw_breakpoint_from_kind(struct gdbarch *gdbarch, int kind, int *size)
#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)
#define TYPE_NFIELDS(thistype)
void _initialize_score_tdep(void)
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)
static int score7_breakpoint_kind_from_pc(struct gdbarch *gdbarch, CORE_ADDR *pcptr)
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)
static const gdb_byte * score3_sw_breakpoint_from_kind(struct gdbarch *gdbarch, int kind, int *size)
void set_gdbarch_sw_breakpoint_from_kind(struct gdbarch *gdbarch, gdbarch_sw_breakpoint_from_kind_ftype sw_breakpoint_from_kind)
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)
static inst_t * score7_fetch_inst(struct gdbarch *gdbarch, CORE_ADDR addr, gdb_byte *memblock)