| OLD | NEW |
| 1 /* Cell SPU GNU/Linux support -- shared library handling. | 1 /* Cell SPU GNU/Linux support -- shared library handling. |
| 2 Copyright (C) 2009-2012 Free Software Foundation, Inc. | 2 Copyright (C) 2009-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 "solib-spu.h" |
| 22 #include "gdbcore.h" | 23 #include "gdbcore.h" |
| 23 #include "gdb_string.h" | 24 #include "gdb_string.h" |
| 24 #include "gdb_assert.h" | 25 #include "gdb_assert.h" |
| 25 #include "gdb_stat.h" | 26 #include "gdb_stat.h" |
| 26 #include "arch-utils.h" | 27 #include "arch-utils.h" |
| 27 #include "bfd.h" | 28 #include "bfd.h" |
| 28 #include "symtab.h" | 29 #include "symtab.h" |
| 29 #include "solib.h" | 30 #include "solib.h" |
| 30 #include "solib-svr4.h" | 31 #include "solib-svr4.h" |
| 31 #include "solist.h" | 32 #include "solist.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 already running inferior instead of starting a new one, we will | 81 already running inferior instead of starting a new one, we will |
| 81 not see the extra SIGTRAP -- and we cannot readily distinguish | 82 not see the extra SIGTRAP -- and we cannot readily distinguish |
| 82 the two cases, in particular with the extended-remote target. | 83 the two cases, in particular with the extended-remote target. |
| 83 | 84 |
| 84 Thus we issue a single-step here. If no extra SIGTRAP was pending, | 85 Thus we issue a single-step here. If no extra SIGTRAP was pending, |
| 85 this will step past the first instruction of the stand-alone SPE | 86 this will step past the first instruction of the stand-alone SPE |
| 86 executable loader, but we don't care about that. */ | 87 executable loader, but we don't care about that. */ |
| 87 | 88 |
| 88 inferior_thread ()->control.in_infcall = 1; /* Suppress MI messages. */ | 89 inferior_thread ()->control.in_infcall = 1; /* Suppress MI messages. */ |
| 89 | 90 |
| 90 target_resume (inferior_ptid, 1, TARGET_SIGNAL_0); | 91 target_resume (inferior_ptid, 1, GDB_SIGNAL_0); |
| 91 target_wait (minus_one_ptid, &ws, 0); | 92 target_wait (minus_one_ptid, &ws, 0); |
| 92 set_executing (minus_one_ptid, 0); | 93 set_executing (minus_one_ptid, 0); |
| 93 | 94 |
| 94 inferior_thread ()->control.in_infcall = 0; | 95 inferior_thread ()->control.in_infcall = 0; |
| 95 } | 96 } |
| 96 } | 97 } |
| 97 | 98 |
| 98 static const struct objfile_data *ocl_program_data_key; | 99 static const struct objfile_data *ocl_program_data_key; |
| 99 | 100 |
| 100 /* Appends OpenCL programs to the list of `struct so_list' objects. */ | 101 /* Appends OpenCL programs to the list of `struct so_list' objects. */ |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 } | 535 } |
| 535 /* In case the OpenCL runtime is loaded we install a breakpoint | 536 /* In case the OpenCL runtime is loaded we install a breakpoint |
| 536 to get notified whenever an OpenCL program gets loaded. */ | 537 to get notified whenever an OpenCL program gets loaded. */ |
| 537 if (strstr (so->so_name, "CLRuntimeAccelCellSPU@") != NULL) | 538 if (strstr (so->so_name, "CLRuntimeAccelCellSPU@") != NULL) |
| 538 { | 539 { |
| 539 solib_read_symbols (so, 0); | 540 solib_read_symbols (so, 0); |
| 540 ocl_enable_break (so->objfile); | 541 ocl_enable_break (so->objfile); |
| 541 } | 542 } |
| 542 } | 543 } |
| 543 | 544 |
| 545 /* -Wmissing-prototypes */ |
| 546 extern initialize_file_ftype _initialize_spu_solib; |
| 547 |
| 544 void | 548 void |
| 545 _initialize_spu_solib (void) | 549 _initialize_spu_solib (void) |
| 546 { | 550 { |
| 547 observer_attach_solib_loaded (spu_solib_loaded); | 551 observer_attach_solib_loaded (spu_solib_loaded); |
| 548 ocl_program_data_key = register_objfile_data (); | 552 ocl_program_data_key = register_objfile_data (); |
| 549 } | 553 } |
| 550 | 554 |
| OLD | NEW |