| OLD | NEW |
| 1 /* Target-dependent code for Morpho mt processor, for GDB. | 1 /* Target-dependent code for Morpho mt processor, for GDB. |
| 2 | 2 |
| 3 Copyright (C) 2005, 2007-2012 Free Software Foundation, Inc. | 3 Copyright (C) 2005, 2007-2012 Free Software Foundation, Inc. |
| 4 | 4 |
| 5 This file is part of GDB. | 5 This file is part of GDB. |
| 6 | 6 |
| 7 This program is free software; you can redistribute it and/or modify | 7 This program is free software; you can redistribute it and/or modify |
| 8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
| 9 the Free Software Foundation; either version 3 of the License, or | 9 the Free Software Foundation; either version 3 of the License, or |
| 10 (at your option) any later version. | 10 (at your option) any later version. |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 /* For any that are not handled above. */ | 328 /* For any that are not handled above. */ |
| 329 return default_register_reggroup_p (gdbarch, regnum, group); | 329 return default_register_reggroup_p (gdbarch, regnum, group); |
| 330 } | 330 } |
| 331 | 331 |
| 332 /* Return the return value convention used for a given type TYPE. | 332 /* Return the return value convention used for a given type TYPE. |
| 333 Optionally, fetch or set the return value via READBUF or | 333 Optionally, fetch or set the return value via READBUF or |
| 334 WRITEBUF respectively using REGCACHE for the register | 334 WRITEBUF respectively using REGCACHE for the register |
| 335 values. */ | 335 values. */ |
| 336 | 336 |
| 337 static enum return_value_convention | 337 static enum return_value_convention |
| 338 mt_return_value (struct gdbarch *gdbarch, struct type *func_type, | 338 mt_return_value (struct gdbarch *gdbarch, struct value *function, |
| 339 struct type *type, struct regcache *regcache, | 339 struct type *type, struct regcache *regcache, |
| 340 gdb_byte *readbuf, const gdb_byte *writebuf) | 340 gdb_byte *readbuf, const gdb_byte *writebuf) |
| 341 { | 341 { |
| 342 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); | 342 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); |
| 343 | 343 |
| 344 if (TYPE_LENGTH (type) > 4) | 344 if (TYPE_LENGTH (type) > 4) |
| 345 { | 345 { |
| 346 /* Return values > 4 bytes are returned in memory, | 346 /* Return values > 4 bytes are returned in memory, |
| 347 pointed to by R11. */ | 347 pointed to by R11. */ |
| 348 if (readbuf) | 348 if (readbuf) |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 Note: PC is likely to be the function start, since this function | 401 Note: PC is likely to be the function start, since this function |
| 402 is mainly used for advancing a breakpoint to the first line, or | 402 is mainly used for advancing a breakpoint to the first line, or |
| 403 stepping to the first line when we have stepped into a function | 403 stepping to the first line when we have stepped into a function |
| 404 call. */ | 404 call. */ |
| 405 | 405 |
| 406 static CORE_ADDR | 406 static CORE_ADDR |
| 407 mt_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) | 407 mt_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) |
| 408 { | 408 { |
| 409 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); | 409 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); |
| 410 CORE_ADDR func_addr = 0, func_end = 0; | 410 CORE_ADDR func_addr = 0, func_end = 0; |
| 411 char *func_name; | 411 const char *func_name; |
| 412 unsigned long instr; | 412 unsigned long instr; |
| 413 | 413 |
| 414 if (find_pc_partial_function (pc, &func_name, &func_addr, &func_end)) | 414 if (find_pc_partial_function (pc, &func_name, &func_addr, &func_end)) |
| 415 { | 415 { |
| 416 struct symtab_and_line sal; | 416 struct symtab_and_line sal; |
| 417 struct symbol *sym; | 417 struct symbol *sym; |
| 418 | 418 |
| 419 /* Found a function. */ | 419 /* Found a function. */ |
| 420 sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL); | 420 sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL); |
| 421 if (sym && SYMBOL_LANGUAGE (sym) != language_asm) | 421 if (sym && SYMBOL_LANGUAGE (sym) != language_asm) |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1206 } | 1206 } |
| 1207 | 1207 |
| 1208 /* Provide a prototype to silence -Wmissing-prototypes. */ | 1208 /* Provide a prototype to silence -Wmissing-prototypes. */ |
| 1209 extern initialize_file_ftype _initialize_mt_tdep; | 1209 extern initialize_file_ftype _initialize_mt_tdep; |
| 1210 | 1210 |
| 1211 void | 1211 void |
| 1212 _initialize_mt_tdep (void) | 1212 _initialize_mt_tdep (void) |
| 1213 { | 1213 { |
| 1214 register_gdbarch_init (bfd_arch_mt, mt_gdbarch_init); | 1214 register_gdbarch_init (bfd_arch_mt, mt_gdbarch_init); |
| 1215 } | 1215 } |
| OLD | NEW |