OLD | NEW |
1 /* SPU native-dependent code for GDB, the GNU debugger. | 1 /* SPU native-dependent code for GDB, the GNU debugger. |
2 Copyright (C) 2006-2012 Free Software Foundation, Inc. | 2 Copyright (C) 2006-2012 Free Software Foundation, Inc. |
3 | 3 |
4 Contributed by Ulrich Weigand <uweigand@de.ibm.com>. | 4 Contributed by Ulrich Weigand <uweigand@de.ibm.com>. |
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 |
11 (at your option) any later version. | 11 (at your option) any later version. |
12 | 12 |
13 This program is distributed in the hope that it will be useful, | 13 This program is distributed in the hope that it will be useful, |
14 but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 GNU General Public License for more details. | 16 GNU General Public License for more details. |
17 | 17 |
18 You should have received a copy of the GNU General Public License | 18 You should have received a copy of the GNU General Public License |
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */ | 19 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
20 | 20 |
21 #include "defs.h" | 21 #include "defs.h" |
22 #include "gdbcore.h" | 22 #include "gdbcore.h" |
23 #include "gdb_string.h" | 23 #include "gdb_string.h" |
24 #include "target.h" | 24 #include "target.h" |
25 #include "inferior.h" | 25 #include "inferior.h" |
| 26 #include "inf-child.h" |
26 #include "inf-ptrace.h" | 27 #include "inf-ptrace.h" |
27 #include "regcache.h" | 28 #include "regcache.h" |
28 #include "symfile.h" | 29 #include "symfile.h" |
29 #include "gdb_wait.h" | 30 #include "gdb_wait.h" |
30 #include "gdbthread.h" | 31 #include "gdbthread.h" |
31 | 32 |
32 #include <sys/ptrace.h> | 33 #include <sys/ptrace.h> |
33 #include <asm/ptrace.h> | 34 #include <asm/ptrace.h> |
34 #include <sys/types.h> | 35 #include <sys/types.h> |
35 #include <sys/param.h> | 36 #include <sys/param.h> |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 } | 455 } |
455 while (pid == -1 && save_errno == EINTR); | 456 while (pid == -1 && save_errno == EINTR); |
456 | 457 |
457 if (pid == -1) | 458 if (pid == -1) |
458 { | 459 { |
459 warning (_("Child process unexpectedly missing: %s"), | 460 warning (_("Child process unexpectedly missing: %s"), |
460 safe_strerror (save_errno)); | 461 safe_strerror (save_errno)); |
461 | 462 |
462 /* Claim it exited with unknown signal. */ | 463 /* Claim it exited with unknown signal. */ |
463 ourstatus->kind = TARGET_WAITKIND_SIGNALLED; | 464 ourstatus->kind = TARGET_WAITKIND_SIGNALLED; |
464 ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN; | 465 ourstatus->value.sig = GDB_SIGNAL_UNKNOWN; |
465 return inferior_ptid; | 466 return inferior_ptid; |
466 } | 467 } |
467 | 468 |
468 store_waitstatus (ourstatus, status); | 469 store_waitstatus (ourstatus, status); |
469 return pid_to_ptid (pid); | 470 return pid_to_ptid (pid); |
470 } | 471 } |
471 | 472 |
472 /* Override the fetch_inferior_register routine. */ | 473 /* Override the fetch_inferior_register routine. */ |
473 static void | 474 static void |
474 spu_fetch_inferior_registers (struct target_ops *ops, | 475 spu_fetch_inferior_registers (struct target_ops *ops, |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 t->to_post_startup_inferior = spu_child_post_startup_inferior; | 616 t->to_post_startup_inferior = spu_child_post_startup_inferior; |
616 t->to_wait = spu_child_wait; | 617 t->to_wait = spu_child_wait; |
617 t->to_fetch_registers = spu_fetch_inferior_registers; | 618 t->to_fetch_registers = spu_fetch_inferior_registers; |
618 t->to_store_registers = spu_store_inferior_registers; | 619 t->to_store_registers = spu_store_inferior_registers; |
619 t->to_xfer_partial = spu_xfer_partial; | 620 t->to_xfer_partial = spu_xfer_partial; |
620 t->to_can_use_hw_breakpoint = spu_can_use_hw_breakpoint; | 621 t->to_can_use_hw_breakpoint = spu_can_use_hw_breakpoint; |
621 | 622 |
622 /* Register SPU target. */ | 623 /* Register SPU target. */ |
623 add_target (t); | 624 add_target (t); |
624 } | 625 } |
OLD | NEW |