| OLD | NEW |
| 1 /* Shared library declarations for GDB, the GNU Debugger. | 1 /* Shared library declarations for GDB, the GNU Debugger. |
| 2 Copyright (C) 1990-1996, 1998-2001, 2007-2012 Free Software | 2 Copyright (C) 1990-2013 Free Software Foundation, Inc. |
| 3 Foundation, Inc. | |
| 4 | 3 |
| 5 This file is part of GDB. | 4 This file is part of GDB. |
| 6 | 5 |
| 7 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 |
| 8 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 |
| 9 the Free Software Foundation; either version 3 of the License, or | 8 the Free Software Foundation; either version 3 of the License, or |
| 10 (at your option) any later version. | 9 (at your option) any later version. |
| 11 | 10 |
| 12 This program is distributed in the hope that it will be useful, | 11 This program is distributed in the hope that it will be useful, |
| 13 but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 { | 81 { |
| 83 /* Adjust the section binding addresses by the base address at | 82 /* Adjust the section binding addresses by the base address at |
| 84 which the object was actually mapped. */ | 83 which the object was actually mapped. */ |
| 85 void (*relocate_section_addresses) (struct so_list *so, | 84 void (*relocate_section_addresses) (struct so_list *so, |
| 86 struct target_section *); | 85 struct target_section *); |
| 87 | 86 |
| 88 /* Free the link map info and any other private data structures | 87 /* Free the link map info and any other private data structures |
| 89 associated with a so_list entry. */ | 88 associated with a so_list entry. */ |
| 90 void (*free_so) (struct so_list *so); | 89 void (*free_so) (struct so_list *so); |
| 91 | 90 |
| 91 /* Reset private data structures associated with SO. |
| 92 This is called when SO is about to be reloaded. |
| 93 It is also called before free_so when SO is about to be freed. */ |
| 94 void (*clear_so) (struct so_list *so); |
| 95 |
| 92 /* Reset or free private data structures not associated with | 96 /* Reset or free private data structures not associated with |
| 93 so_list entries. */ | 97 so_list entries. */ |
| 94 void (*clear_solib) (void); | 98 void (*clear_solib) (void); |
| 95 | 99 |
| 96 /* Target dependent code to run after child process fork. */ | 100 /* Target dependent code to run after child process fork. */ |
| 97 void (*solib_create_inferior_hook) (int from_tty); | 101 void (*solib_create_inferior_hook) (int from_tty); |
| 98 | 102 |
| 99 /* Do additional symbol handling, lookup, etc. after symbols for a | 103 /* Do additional symbol handling, lookup, etc. after symbols for a |
| 100 shared object have been loaded in the usual way. This is | 104 shared object have been loaded in the usual way. This is |
| 101 called to do any system specific symbol handling that might be | 105 called to do any system specific symbol handling that might be |
| (...skipping 16 matching lines...) Expand all Loading... |
| 118 catch_errors requires a pointer argument. */ | 122 catch_errors requires a pointer argument. */ |
| 119 int (*open_symbol_file_object) (void *from_ttyp); | 123 int (*open_symbol_file_object) (void *from_ttyp); |
| 120 | 124 |
| 121 /* Determine if PC lies in the dynamic symbol resolution code of | 125 /* Determine if PC lies in the dynamic symbol resolution code of |
| 122 the run time loader. */ | 126 the run time loader. */ |
| 123 int (*in_dynsym_resolve_code) (CORE_ADDR pc); | 127 int (*in_dynsym_resolve_code) (CORE_ADDR pc); |
| 124 | 128 |
| 125 /* Find and open shared library binary file. */ | 129 /* Find and open shared library binary file. */ |
| 126 bfd *(*bfd_open) (char *pathname); | 130 bfd *(*bfd_open) (char *pathname); |
| 127 | 131 |
| 128 /* Extra hook for finding and opening a solib. | 132 /* Optional extra hook for finding and opening a solib. |
| 129 Convenience function for remote debuggers finding host libs. */ | 133 If TEMP_PATHNAME is non-NULL: If the file is successfully opened a |
| 134 pointer to a malloc'd and realpath'd copy of SONAME is stored there, |
| 135 otherwise NULL is stored there. */ |
| 130 int (*find_and_open_solib) (char *soname, | 136 int (*find_and_open_solib) (char *soname, |
| 131 unsigned o_flags, char **temp_pathname); | 137 unsigned o_flags, char **temp_pathname); |
| 132 | 138 |
| 133 /* Hook for looking up global symbols in a library-specific way. */ | 139 /* Hook for looking up global symbols in a library-specific way. */ |
| 134 struct symbol * (*lookup_lib_global_symbol) (const struct objfile *objfile, | 140 struct symbol * (*lookup_lib_global_symbol) (const struct objfile *objfile, |
| 135 const char *name, | 141 const char *name, |
| 136 const domain_enum domain); | 142 const domain_enum domain); |
| 137 | 143 |
| 138 /* Given two so_list objects, one from the GDB thread list | 144 /* Given two so_list objects, one from the GDB thread list |
| 139 and another from the list returned by current_sos, return 1 | 145 and another from the list returned by current_sos, return 1 |
| 140 if they represent the same library. | 146 if they represent the same library. |
| 141 Falls back to using strcmp on so_original_name field when set | 147 Falls back to using strcmp on so_original_name field when set |
| 142 to NULL. */ | 148 to NULL. */ |
| 143 int (*same) (struct so_list *gdb, struct so_list *inferior); | 149 int (*same) (struct so_list *gdb, struct so_list *inferior); |
| 144 | 150 |
| 145 /* Return whether a region of memory must be kept in a core file | 151 /* Return whether a region of memory must be kept in a core file |
| 146 for shared libraries loaded before "gcore" is used to be | 152 for shared libraries loaded before "gcore" is used to be |
| 147 handled correctly when the core file is loaded. This only | 153 handled correctly when the core file is loaded. This only |
| 148 applies when the section would otherwise not be kept in the | 154 applies when the section would otherwise not be kept in the |
| 149 core file (in particular, for readonly sections). */ | 155 core file (in particular, for readonly sections). */ |
| 150 int (*keep_data_in_core) (CORE_ADDR vaddr, | 156 int (*keep_data_in_core) (CORE_ADDR vaddr, |
| 151 unsigned long size); | 157 unsigned long size); |
| 158 |
| 159 /* Enable or disable optional solib event breakpoints as |
| 160 appropriate. This should be called whenever |
| 161 stop_on_solib_events is changed. This pointer can be |
| 162 NULL, in which case no enabling or disabling is necessary |
| 163 for this target. */ |
| 164 void (*update_breakpoints) (void); |
| 165 |
| 166 /* Target-specific processing of solib events that will be |
| 167 performed before solib_add is called. This pointer can be |
| 168 NULL, in which case no specific preprocessing is necessary |
| 169 for this target. */ |
| 170 void (*handle_event) (void); |
| 152 }; | 171 }; |
| 153 | 172 |
| 154 /* Free the memory associated with a (so_list *). */ | 173 /* Free the memory associated with a (so_list *). */ |
| 155 void free_so (struct so_list *so); | 174 void free_so (struct so_list *so); |
| 156 | 175 |
| 157 /* Return address of first so_list entry in master shared object list. */ | 176 /* Return address of first so_list entry in master shared object list. */ |
| 158 struct so_list *master_so_list (void); | 177 struct so_list *master_so_list (void); |
| 159 | 178 |
| 160 /* Find shared library binary file. */ | 179 /* Find shared library binary file. */ |
| 161 extern char *solib_find (char *in_pathname, int *fd); | 180 extern char *solib_find (char *in_pathname, int *fd); |
| 162 | 181 |
| 163 /* Open BFD for shared library file. */ | 182 /* Open BFD for shared library file. */ |
| 164 extern bfd *solib_bfd_fopen (char *pathname, int fd); | 183 extern bfd *solib_bfd_fopen (char *pathname, int fd); |
| 165 | 184 |
| 166 /* Find solib binary file and open it. */ | 185 /* Find solib binary file and open it. */ |
| 167 extern bfd *solib_bfd_open (char *in_pathname); | 186 extern bfd *solib_bfd_open (char *in_pathname); |
| 168 | 187 |
| 169 /* FIXME: gdbarch needs to control this variable. */ | 188 /* FIXME: gdbarch needs to control this variable. */ |
| 170 extern struct target_so_ops *current_target_so_ops; | 189 extern struct target_so_ops *current_target_so_ops; |
| 171 | 190 |
| 172 /* Handler for library-specific global symbol lookup in solib.c. */ | 191 /* Handler for library-specific global symbol lookup in solib.c. */ |
| 173 struct symbol *solib_global_lookup (const struct objfile *objfile, | 192 struct symbol *solib_global_lookup (const struct objfile *objfile, |
| 174 const char *name, | 193 const char *name, |
| 175 const domain_enum domain); | 194 const domain_enum domain); |
| 176 | 195 |
| 177 #endif | 196 #endif |
| OLD | NEW |