| OLD | NEW |
| 1 /* Target-dependent code for GNU/Linux running on the Fujitsu FR-V, | 1 /* Target-dependent code for GNU/Linux running on the Fujitsu FR-V, |
| 2 for GDB. | 2 for GDB. |
| 3 | 3 |
| 4 Copyright (C) 2004, 2006-2012 Free Software Foundation, Inc. | 4 Copyright (C) 2004, 2006-2012 Free Software Foundation, Inc. |
| 5 | 5 |
| 6 This file is part of GDB. | 6 This file is part of GDB. |
| 7 | 7 |
| 8 This program is free software; you can redistribute it and/or modify | 8 This program is free software; you can redistribute it and/or modify |
| 9 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
| 10 the Free Software Foundation; either version 3 of the License, or | 10 the Free Software Foundation; either version 3 of the License, or |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 /* Define the size (in bytes) of an FR-V instruction. */ | 36 /* Define the size (in bytes) of an FR-V instruction. */ |
| 37 static const int frv_instr_size = 4; | 37 static const int frv_instr_size = 4; |
| 38 | 38 |
| 39 enum { | 39 enum { |
| 40 NORMAL_SIGTRAMP = 1, | 40 NORMAL_SIGTRAMP = 1, |
| 41 RT_SIGTRAMP = 2 | 41 RT_SIGTRAMP = 2 |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 static int | 44 static int |
| 45 frv_linux_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name) | 45 frv_linux_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, |
| 46 » » » const char *name) |
| 46 { | 47 { |
| 47 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); | 48 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); |
| 48 char buf[frv_instr_size]; | 49 char buf[frv_instr_size]; |
| 49 LONGEST instr; | 50 LONGEST instr; |
| 50 int retval = 0; | 51 int retval = 0; |
| 51 | 52 |
| 52 if (target_read_memory (pc, buf, sizeof buf) != 0) | 53 if (target_read_memory (pc, buf, sizeof buf) != 0) |
| 53 return 0; | 54 return 0; |
| 54 | 55 |
| 55 instr = extract_unsigned_integer (buf, sizeof buf, byte_order); | 56 instr = extract_unsigned_integer (buf, sizeof buf, byte_order); |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 return trad_frame_get_register (cache, this_frame, regnum); | 317 return trad_frame_get_register (cache, this_frame, regnum); |
| 317 } | 318 } |
| 318 | 319 |
| 319 static int | 320 static int |
| 320 frv_linux_sigtramp_frame_sniffer (const struct frame_unwind *self, | 321 frv_linux_sigtramp_frame_sniffer (const struct frame_unwind *self, |
| 321 struct frame_info *this_frame, | 322 struct frame_info *this_frame, |
| 322 void **this_cache) | 323 void **this_cache) |
| 323 { | 324 { |
| 324 struct gdbarch *gdbarch = get_frame_arch (this_frame); | 325 struct gdbarch *gdbarch = get_frame_arch (this_frame); |
| 325 CORE_ADDR pc = get_frame_pc (this_frame); | 326 CORE_ADDR pc = get_frame_pc (this_frame); |
| 326 char *name; | 327 const char *name; |
| 327 | 328 |
| 328 find_pc_partial_function (pc, &name, NULL, NULL); | 329 find_pc_partial_function (pc, &name, NULL, NULL); |
| 329 if (frv_linux_pc_in_sigtramp (gdbarch, pc, name)) | 330 if (frv_linux_pc_in_sigtramp (gdbarch, pc, name)) |
| 330 return 1; | 331 return 1; |
| 331 | 332 |
| 332 return 0; | 333 return 0; |
| 333 } | 334 } |
| 334 | 335 |
| 335 static const struct frame_unwind frv_linux_sigtramp_frame_unwind = | 336 static const struct frame_unwind frv_linux_sigtramp_frame_unwind = |
| 336 { | 337 { |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 | 528 |
| 528 void | 529 void |
| 529 _initialize_frv_linux_tdep (void) | 530 _initialize_frv_linux_tdep (void) |
| 530 { | 531 { |
| 531 gdbarch_register_osabi (bfd_arch_frv, 0, GDB_OSABI_LINUX, | 532 gdbarch_register_osabi (bfd_arch_frv, 0, GDB_OSABI_LINUX, |
| 532 frv_linux_init_abi); | 533 frv_linux_init_abi); |
| 533 gdbarch_register_osabi_sniffer (bfd_arch_frv, | 534 gdbarch_register_osabi_sniffer (bfd_arch_frv, |
| 534 bfd_target_elf_flavour, | 535 bfd_target_elf_flavour, |
| 535 frv_linux_elf_osabi_sniffer); | 536 frv_linux_elf_osabi_sniffer); |
| 536 } | 537 } |
| OLD | NEW |