| 1 | /* COFF (SVR3) Shared library declarations for GDB, the GNU Debugger. |
| 2 | Copyright (C) 1992, 1993, 1998, 1999, 2000, 2003, 2007 |
| 3 | Free Software Foundation, Inc. |
| 4 | |
| 5 | This file is part of GDB. |
| 6 | |
| 7 | 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 |
| 9 | the Free Software Foundation; either version 2 of the License, or |
| 10 | (at your option) any later version. |
| 11 | |
| 12 | This program is distributed in the hope that it will be useful, |
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | GNU General Public License for more details. |
| 16 | |
| 17 | You should have received a copy of the GNU General Public License |
| 18 | along with this program; if not, write to the Free Software |
| 19 | Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 20 | Boston, MA 02110-1301, USA. */ |
| 21 | |
| 22 | /* Forward decl's for prototypes */ |
| 23 | struct target_ops; |
| 24 | |
| 25 | /* Called when we free all symtabs, to free the shared library information |
| 26 | as well. */ |
| 27 | |
| 28 | #if 0 |
| 29 | #define CLEAR_SOLIB coff_clear_solib |
| 30 | |
| 31 | extern void coff_clear_solib (void); |
| 32 | #endif |
| 33 | |
| 34 | /* Called to add symbols from a shared library to gdb's symbol table. */ |
| 35 | |
| 36 | #define SOLIB_ADD(filename, from_tty, targ, readsyms) \ |
| 37 | coff_solib_add (filename, from_tty, targ, readsyms) |
| 38 | |
| 39 | extern void coff_solib_add (char *, int, struct target_ops *, int); |
| 40 | |
| 41 | /* Function to be called when the inferior starts up, to discover the |
| 42 | names of shared libraries that are dynamically linked, the base |
| 43 | addresses to which they are linked, and sufficient information to |
| 44 | read in their symbols at a later time. */ |
| 45 | |
| 46 | #define SOLIB_CREATE_INFERIOR_HOOK(PID) coff_solib_create_inferior_hook () |
| 47 | |
| 48 | extern void coff_solib_create_inferior_hook (void); /* solib.c */ |
| 49 | |
| 50 | /* Function to be called to remove the connection between debugger and |
| 51 | dynamic linker that was established by SOLIB_CREATE_INFERIOR_HOOK. |
| 52 | (This operation does not remove shared library information from |
| 53 | the debugger, as CLEAR_SOLIB does.) |
| 54 | |
| 55 | This functionality is presently not implemented for this target. |
| 56 | */ |
| 57 | #define SOLIB_REMOVE_INFERIOR_HOOK(PID) (0) |
| 58 | |
| 59 | /* This function is called by the "catch load" command. It allows |
| 60 | the debugger to be notified by the dynamic linker when a specified |
| 61 | library file (or any library file, if filename is NULL) is loaded. |
| 62 | |
| 63 | Presently, this functionality is not implemented. |
| 64 | */ |
| 65 | #define SOLIB_CREATE_CATCH_LOAD_HOOK(pid, tempflag, filename, cond_string) \ |
| 66 | error (_("catch of library loads/unloads not yet implemented on this platform")) |
| 67 | |
| 68 | /* This function is called by the "catch unload" command. It allows |
| 69 | the debugger to be notified by the dynamic linker when a specified |
| 70 | library file (or any library file, if filename is NULL) is unloaded. |
| 71 | |
| 72 | Presently, this functionality is not implemented. |
| 73 | */ |
| 74 | #define SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid, tempflag, filename, cond_string) \ |
| 75 | error (_("catch of library loads/unloads not yet implemented on this platform")) |
| 76 | |
| 77 | /* This function returns TRUE if the dynamic linker has just reported |
| 78 | a load of a library. |
| 79 | |
| 80 | This function must be used only when the inferior has stopped in |
| 81 | the dynamic linker hook, or undefined results are guaranteed. |
| 82 | |
| 83 | Presently, this functionality is not implemented. |
| 84 | */ |
| 85 | /* |
| 86 | #define SOLIB_HAVE_LOAD_EVENT(pid) \ |
| 87 | error("catch of library loads/unloads not yet implemented on this platform") |
| 88 | */ |
| 89 | |
| 90 | #define SOLIB_HAVE_LOAD_EVENT(pid) \ |
| 91 | (0) |
| 92 | |
| 93 | /* This function returns a pointer to the string representation of the |
| 94 | pathname of the dynamically-linked library that has just been loaded. |
| 95 | |
| 96 | This function must be used only when SOLIB_HAVE_LOAD_EVENT is TRUE, |
| 97 | or undefined results are guaranteed. |
| 98 | |
| 99 | This string's contents are only valid immediately after the inferior |
| 100 | has stopped in the dynamic linker hook, and becomes invalid as soon |
| 101 | as the inferior is continued. Clients should make a copy of this |
| 102 | string if they wish to continue the inferior and then access the string. |
| 103 | |
| 104 | Presently, this functionality is not implemented. |
| 105 | */ |
| 106 | |
| 107 | /* |
| 108 | #define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \ |
| 109 | error("catch of library loads/unloads not yet implemented on this platform") |
| 110 | */ |
| 111 | |
| 112 | #define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \ |
| 113 | "" |
| 114 | |
| 115 | /* This function returns TRUE if the dynamic linker has just reported |
| 116 | an unload of a library. |
| 117 | |
| 118 | This function must be used only when the inferior has stopped in |
| 119 | the dynamic linker hook, or undefined results are guaranteed. |
| 120 | |
| 121 | Presently, this functionality is not implemented. |
| 122 | */ |
| 123 | /* |
| 124 | #define SOLIB_HAVE_UNLOAD_EVENT(pid) \ |
| 125 | error("catch of library loads/unloads not yet implemented on this platform") |
| 126 | */ |
| 127 | |
| 128 | #define SOLIB_HAVE_UNLOAD_EVENT(pid) \ |
| 129 | (0) |
| 130 | |
| 131 | /* This function returns a pointer to the string representation of the |
| 132 | pathname of the dynamically-linked library that has just been unloaded. |
| 133 | |
| 134 | This function must be used only when SOLIB_HAVE_UNLOAD_EVENT is TRUE, |
| 135 | or undefined results are guaranteed. |
| 136 | |
| 137 | This string's contents are only valid immediately after the inferior |
| 138 | has stopped in the dynamic linker hook, and becomes invalid as soon |
| 139 | as the inferior is continued. Clients should make a copy of this |
| 140 | string if they wish to continue the inferior and then access the string. |
| 141 | |
| 142 | Presently, this functionality is not implemented. |
| 143 | */ |
| 144 | /* |
| 145 | #define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) \ |
| 146 | error("catch of library loads/unloads not yet implemented on this platform") |
| 147 | */ |
| 148 | |
| 149 | #define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) \ |
| 150 | "" |
| 151 | |
| 152 | /* This function returns TRUE if pc is the address of an instruction that |
| 153 | lies within the dynamic linker (such as the event hook, or the dld |
| 154 | itself). |
| 155 | |
| 156 | This function must be used only when a dynamic linker event has been |
| 157 | caught, and the inferior is being stepped out of the hook, or undefined |
| 158 | results are guaranteed. |
| 159 | |
| 160 | Presently, this functionality is not implemented. |
| 161 | */ |
| 162 | |
| 163 | /* |
| 164 | #define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \ |
| 165 | error("catch of library loads/unloads not yet implemented on this platform") |
| 166 | */ |
| 167 | |
| 168 | #define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \ |
| 169 | (0) |
| 170 | |
| 171 | /* This function must be called when the inferior is killed, and the program |
| 172 | restarted. This is not the same as CLEAR_SOLIB, in that it doesn't discard |
| 173 | any symbol tables. |
| 174 | |
| 175 | Presently, this functionality is not implemented. |
| 176 | */ |
| 177 | #define SOLIB_RESTART() \ |
| 178 | (0) |
| 179 | |
| 180 | /* If we can't set a breakpoint, and it's in a shared library, just |
| 181 | disable it. */ |
| 182 | |
| 183 | #if 0 |
| 184 | #define DISABLE_UNSETTABLE_BREAK(addr) coff_solib_address(addr) |
| 185 | |
| 186 | extern int solib_address (CORE_ADDR); /* solib.c */ |
| 187 | #endif |