| OLD | NEW |
| 1 /* Handle FR-V (FDPIC) shared libraries for GDB, the GNU Debugger. | 1 /* Handle FR-V (FDPIC) shared libraries for GDB, the GNU Debugger. |
| 2 Copyright (C) 2004, 2007-2012 Free Software Foundation, Inc. | 2 Copyright (C) 2004, 2007-2012 Free Software Foundation, Inc. |
| 3 | 3 |
| 4 This file is part of GDB. | 4 This file is part of GDB. |
| 5 | 5 |
| 6 This program is free software; you can redistribute it and/or modify | 6 This program is free software; you can redistribute it and/or modify |
| 7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
| 8 the Free Software Foundation; either version 3 of the License, or | 8 the Free Software Foundation; either version 3 of the License, or |
| 9 (at your option) any later version. | 9 (at your option) any later version. |
| 10 | 10 |
| (...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 so = so->next; | 954 so = so->next; |
| 955 } | 955 } |
| 956 | 956 |
| 957 /* Didn't find it in any of the shared objects. So assume it's in the | 957 /* Didn't find it in any of the shared objects. So assume it's in the |
| 958 main executable. */ | 958 main executable. */ |
| 959 return main_got (); | 959 return main_got (); |
| 960 } | 960 } |
| 961 | 961 |
| 962 /* Forward declarations for frv_fdpic_find_canonical_descriptor(). */ | 962 /* Forward declarations for frv_fdpic_find_canonical_descriptor(). */ |
| 963 static CORE_ADDR find_canonical_descriptor_in_load_object | 963 static CORE_ADDR find_canonical_descriptor_in_load_object |
| 964 (CORE_ADDR, CORE_ADDR, char *, bfd *, struct lm_info *); | 964 (CORE_ADDR, CORE_ADDR, const char *, bfd *, struct lm_info *); |
| 965 | 965 |
| 966 /* Given a function entry point, attempt to find the canonical descriptor | 966 /* Given a function entry point, attempt to find the canonical descriptor |
| 967 associated with that entry point. Return 0 if no canonical descriptor | 967 associated with that entry point. Return 0 if no canonical descriptor |
| 968 could be found. */ | 968 could be found. */ |
| 969 | 969 |
| 970 CORE_ADDR | 970 CORE_ADDR |
| 971 frv_fdpic_find_canonical_descriptor (CORE_ADDR entry_point) | 971 frv_fdpic_find_canonical_descriptor (CORE_ADDR entry_point) |
| 972 { | 972 { |
| 973 char *name; | 973 const char *name; |
| 974 CORE_ADDR addr; | 974 CORE_ADDR addr; |
| 975 CORE_ADDR got_value; | 975 CORE_ADDR got_value; |
| 976 struct int_elf32_fdpic_loadmap *ldm = 0; | 976 struct int_elf32_fdpic_loadmap *ldm = 0; |
| 977 struct symbol *sym; | 977 struct symbol *sym; |
| 978 int status; | |
| 979 CORE_ADDR exec_loadmap_addr; | |
| 980 | 978 |
| 981 /* Fetch the corresponding global pointer for the entry point. */ | 979 /* Fetch the corresponding global pointer for the entry point. */ |
| 982 got_value = frv_fdpic_find_global_pointer (entry_point); | 980 got_value = frv_fdpic_find_global_pointer (entry_point); |
| 983 | 981 |
| 984 /* Attempt to find the name of the function. If the name is available, | 982 /* Attempt to find the name of the function. If the name is available, |
| 985 it'll be used as an aid in finding matching functions in the dynamic | 983 it'll be used as an aid in finding matching functions in the dynamic |
| 986 symbol table. */ | 984 symbol table. */ |
| 987 sym = find_pc_function (entry_point); | 985 sym = find_pc_function (entry_point); |
| 988 if (sym == 0) | 986 if (sym == 0) |
| 989 name = 0; | 987 name = 0; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 1012 | 1010 |
| 1013 so = so->next; | 1011 so = so->next; |
| 1014 } | 1012 } |
| 1015 } | 1013 } |
| 1016 | 1014 |
| 1017 return addr; | 1015 return addr; |
| 1018 } | 1016 } |
| 1019 | 1017 |
| 1020 static CORE_ADDR | 1018 static CORE_ADDR |
| 1021 find_canonical_descriptor_in_load_object | 1019 find_canonical_descriptor_in_load_object |
| 1022 (CORE_ADDR entry_point, CORE_ADDR got_value, char *name, bfd *abfd, | 1020 (CORE_ADDR entry_point, CORE_ADDR got_value, const char *name, bfd *abfd, |
| 1023 struct lm_info *lm) | 1021 struct lm_info *lm) |
| 1024 { | 1022 { |
| 1025 enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch); | 1023 enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch); |
| 1026 arelent *rel; | 1024 arelent *rel; |
| 1027 unsigned int i; | 1025 unsigned int i; |
| 1028 CORE_ADDR addr = 0; | 1026 CORE_ADDR addr = 0; |
| 1029 | 1027 |
| 1030 /* Nothing to do if no bfd. */ | 1028 /* Nothing to do if no bfd. */ |
| 1031 if (abfd == 0) | 1029 if (abfd == 0) |
| 1032 return 0; | 1030 return 0; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1187 /* Debug this file's internals. */ | 1185 /* Debug this file's internals. */ |
| 1188 add_setshow_zinteger_cmd ("solib-frv", class_maintenance, | 1186 add_setshow_zinteger_cmd ("solib-frv", class_maintenance, |
| 1189 &solib_frv_debug, _("\ | 1187 &solib_frv_debug, _("\ |
| 1190 Set internal debugging of shared library code for FR-V."), _("\ | 1188 Set internal debugging of shared library code for FR-V."), _("\ |
| 1191 Show internal debugging of shared library code for FR-V."), _("\ | 1189 Show internal debugging of shared library code for FR-V."), _("\ |
| 1192 When non-zero, FR-V solib specific internal debugging is enabled."), | 1190 When non-zero, FR-V solib specific internal debugging is enabled."), |
| 1193 NULL, | 1191 NULL, |
| 1194 NULL, /* FIXME: i18n: */ | 1192 NULL, /* FIXME: i18n: */ |
| 1195 &setdebuglist, &showdebuglist); | 1193 &setdebuglist, &showdebuglist); |
| 1196 } | 1194 } |
| OLD | NEW |