OLD | NEW |
1 /* Target-dependent code for the S+core architecture, for GDB, | 1 /* Target-dependent code for the S+core architecture, for GDB, |
2 the GNU Debugger. | 2 the GNU Debugger. |
3 | 3 |
4 Copyright (C) 2006-2012 Free Software Foundation, Inc. | 4 Copyright (C) 2006-2012 Free Software Foundation, Inc. |
5 | 5 |
6 Contributed by Qinwei (qinwei@sunnorth.com.cn) | 6 Contributed by Qinwei (qinwei@sunnorth.com.cn) |
7 Contributed by Ching-Peng Lin (cplin@sunplus.com) | 7 Contributed by Ching-Peng Lin (cplin@sunplus.com) |
8 | 8 |
9 This file is part of GDB. | 9 This file is part of GDB. |
10 | 10 |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 {-2, 4}, | 214 {-2, 4}, |
215 {0, 0}, | 215 {0, 0}, |
216 {0, 2}, | 216 {0, 2}, |
217 {0, 0}, | 217 {0, 0}, |
218 {-4, 6}, | 218 {-4, 6}, |
219 {0, 0} | 219 {0, 0} |
220 }; | 220 }; |
221 | 221 |
222 #define EXTRACT_LEN 2 | 222 #define EXTRACT_LEN 2 |
223 CORE_ADDR adjust_pc = *pcptr & ~0x1; | 223 CORE_ADDR adjust_pc = *pcptr & ~0x1; |
224 int inst_len; | |
225 gdb_byte buf[5][EXTRACT_LEN] = | 224 gdb_byte buf[5][EXTRACT_LEN] = |
226 { | 225 { |
227 {'\0', '\0'}, | 226 {'\0', '\0'}, |
228 {'\0', '\0'}, | 227 {'\0', '\0'}, |
229 {'\0', '\0'}, | 228 {'\0', '\0'}, |
230 {'\0', '\0'}, | 229 {'\0', '\0'}, |
231 {'\0', '\0'} | 230 {'\0', '\0'} |
232 }; | 231 }; |
233 int ret; | 232 int ret; |
234 unsigned int raw; | 233 unsigned int raw; |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 | 442 |
444 if (readbuf != NULL) | 443 if (readbuf != NULL) |
445 regcache_cooked_read_part (regcache, regnum, reg_offset, length, | 444 regcache_cooked_read_part (regcache, regnum, reg_offset, length, |
446 readbuf + buf_offset); | 445 readbuf + buf_offset); |
447 if (writebuf != NULL) | 446 if (writebuf != NULL) |
448 regcache_cooked_write_part (regcache, regnum, reg_offset, length, | 447 regcache_cooked_write_part (regcache, regnum, reg_offset, length, |
449 writebuf + buf_offset); | 448 writebuf + buf_offset); |
450 } | 449 } |
451 | 450 |
452 static enum return_value_convention | 451 static enum return_value_convention |
453 score_return_value (struct gdbarch *gdbarch, struct type *func_type, | 452 score_return_value (struct gdbarch *gdbarch, struct value *function, |
454 struct type *type, struct regcache *regcache, | 453 struct type *type, struct regcache *regcache, |
455 gdb_byte * readbuf, const gdb_byte * writebuf) | 454 gdb_byte * readbuf, const gdb_byte * writebuf) |
456 { | 455 { |
457 if (TYPE_CODE (type) == TYPE_CODE_STRUCT | 456 if (TYPE_CODE (type) == TYPE_CODE_STRUCT |
458 || TYPE_CODE (type) == TYPE_CODE_UNION | 457 || TYPE_CODE (type) == TYPE_CODE_UNION |
459 || TYPE_CODE (type) == TYPE_CODE_ARRAY) | 458 || TYPE_CODE (type) == TYPE_CODE_ARRAY) |
460 return RETURN_VALUE_STRUCT_CONVENTION; | 459 return RETURN_VALUE_STRUCT_CONVENTION; |
461 else | 460 else |
462 { | 461 { |
463 int offset; | 462 int offset; |
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1549 return gdbarch; | 1548 return gdbarch; |
1550 } | 1549 } |
1551 | 1550 |
1552 extern initialize_file_ftype _initialize_score_tdep; | 1551 extern initialize_file_ftype _initialize_score_tdep; |
1553 | 1552 |
1554 void | 1553 void |
1555 _initialize_score_tdep (void) | 1554 _initialize_score_tdep (void) |
1556 { | 1555 { |
1557 gdbarch_register (bfd_arch_score, score_gdbarch_init, NULL); | 1556 gdbarch_register (bfd_arch_score, score_gdbarch_init, NULL); |
1558 } | 1557 } |
OLD | NEW |