1130812Smarcel/* COFF (SVR3) Shared library declarations for GDB, the GNU Debugger. 2130812Smarcel Copyright 1992, 1993, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. 3130812Smarcel 4130812Smarcel This file is part of GDB. 5130812Smarcel 6130812Smarcel This program is free software; you can redistribute it and/or modify 7130812Smarcel it under the terms of the GNU General Public License as published by 8130812Smarcel the Free Software Foundation; either version 2 of the License, or 9130812Smarcel (at your option) any later version. 10130812Smarcel 11130812Smarcel This program is distributed in the hope that it will be useful, 12130812Smarcel but WITHOUT ANY WARRANTY; without even the implied warranty of 13130812Smarcel MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14130812Smarcel GNU General Public License for more details. 15130812Smarcel 16130812Smarcel You should have received a copy of the GNU General Public License 17130812Smarcel along with this program; if not, write to the Free Software 18130812Smarcel Foundation, Inc., 59 Temple Place - Suite 330, 19130812Smarcel Boston, MA 02111-1307, USA. */ 20130812Smarcel 21130812Smarcel/* Forward decl's for prototypes */ 22130812Smarcelstruct target_ops; 23130812Smarcel 24130812Smarcel/* Called when we free all symtabs, to free the shared library information 25130812Smarcel as well. */ 26130812Smarcel 27130812Smarcel#if 0 28130812Smarcel#define CLEAR_SOLIB coff_clear_solib 29130812Smarcel 30130812Smarcelextern void coff_clear_solib (void); 31130812Smarcel#endif 32130812Smarcel 33130812Smarcel/* Called to add symbols from a shared library to gdb's symbol table. */ 34130812Smarcel 35130812Smarcel#define SOLIB_ADD(filename, from_tty, targ, readsyms) \ 36130812Smarcel coff_solib_add (filename, from_tty, targ, readsyms) 37130812Smarcel 38130812Smarcelextern void coff_solib_add (char *, int, struct target_ops *, int); 39130812Smarcel 40130812Smarcel/* Function to be called when the inferior starts up, to discover the names 41130812Smarcel of shared libraries that are dynamically linked, the base addresses to 42130812Smarcel which they are linked, and sufficient information to read in their symbols 43130812Smarcel at a later time. */ 44130812Smarcel 45130812Smarcel#define SOLIB_CREATE_INFERIOR_HOOK(PID) coff_solib_create_inferior_hook() 46130812Smarcel 47130812Smarcelextern void coff_solib_create_inferior_hook (void); /* solib.c */ 48130812Smarcel 49130812Smarcel/* Function to be called to remove the connection between debugger and 50130812Smarcel dynamic linker that was established by SOLIB_CREATE_INFERIOR_HOOK. 51130812Smarcel (This operation does not remove shared library information from 52130812Smarcel the debugger, as CLEAR_SOLIB does.) 53130812Smarcel 54130812Smarcel This functionality is presently not implemented for this target. 55130812Smarcel */ 56130812Smarcel#define SOLIB_REMOVE_INFERIOR_HOOK(PID) (0) 57130812Smarcel 58130812Smarcel/* This function is called by the "catch load" command. It allows 59130812Smarcel the debugger to be notified by the dynamic linker when a specified 60130812Smarcel library file (or any library file, if filename is NULL) is loaded. 61130812Smarcel 62130812Smarcel Presently, this functionality is not implemented. 63130812Smarcel */ 64130812Smarcel#define SOLIB_CREATE_CATCH_LOAD_HOOK(pid,tempflag,filename,cond_string) \ 65130812Smarcel error("catch of library loads/unloads not yet implemented on this platform") 66130812Smarcel 67130812Smarcel/* This function is called by the "catch unload" command. It allows 68130812Smarcel the debugger to be notified by the dynamic linker when a specified 69130812Smarcel library file (or any library file, if filename is NULL) is unloaded. 70130812Smarcel 71130812Smarcel Presently, this functionality is not implemented. 72130812Smarcel */ 73130812Smarcel#define SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid,tempflag,filename,cond_string) \ 74130812Smarcel error("catch of library loads/unloads not yet implemented on this platform") 75130812Smarcel 76130812Smarcel/* This function returns TRUE if the dynamic linker has just reported 77130812Smarcel a load of a library. 78130812Smarcel 79130812Smarcel This function must be used only when the inferior has stopped in 80130812Smarcel the dynamic linker hook, or undefined results are guaranteed. 81130812Smarcel 82130812Smarcel Presently, this functionality is not implemented. 83130812Smarcel */ 84130812Smarcel/* 85130812Smarcel #define SOLIB_HAVE_LOAD_EVENT(pid) \ 86130812Smarcel error("catch of library loads/unloads not yet implemented on this platform") 87130812Smarcel */ 88130812Smarcel 89130812Smarcel#define SOLIB_HAVE_LOAD_EVENT(pid) \ 90130812Smarcel(0) 91130812Smarcel 92130812Smarcel/* This function returns a pointer to the string representation of the 93130812Smarcel pathname of the dynamically-linked library that has just been loaded. 94130812Smarcel 95130812Smarcel This function must be used only when SOLIB_HAVE_LOAD_EVENT is TRUE, 96130812Smarcel or undefined results are guaranteed. 97130812Smarcel 98130812Smarcel This string's contents are only valid immediately after the inferior 99130812Smarcel has stopped in the dynamic linker hook, and becomes invalid as soon 100130812Smarcel as the inferior is continued. Clients should make a copy of this 101130812Smarcel string if they wish to continue the inferior and then access the string. 102130812Smarcel 103130812Smarcel Presently, this functionality is not implemented. 104130812Smarcel */ 105130812Smarcel 106130812Smarcel/* 107130812Smarcel #define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \ 108130812Smarcel error("catch of library loads/unloads not yet implemented on this platform") 109130812Smarcel */ 110130812Smarcel 111130812Smarcel#define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \ 112130812Smarcel"" 113130812Smarcel 114130812Smarcel/* This function returns TRUE if the dynamic linker has just reported 115130812Smarcel an unload of a library. 116130812Smarcel 117130812Smarcel This function must be used only when the inferior has stopped in 118130812Smarcel the dynamic linker hook, or undefined results are guaranteed. 119130812Smarcel 120130812Smarcel Presently, this functionality is not implemented. 121130812Smarcel */ 122130812Smarcel/* 123130812Smarcel #define SOLIB_HAVE_UNLOAD_EVENT(pid) \ 124130812Smarcel error("catch of library loads/unloads not yet implemented on this platform") 125130812Smarcel */ 126130812Smarcel 127130812Smarcel#define SOLIB_HAVE_UNLOAD_EVENT(pid) \ 128130812Smarcel(0) 129130812Smarcel 130130812Smarcel/* This function returns a pointer to the string representation of the 131130812Smarcel pathname of the dynamically-linked library that has just been unloaded. 132130812Smarcel 133130812Smarcel This function must be used only when SOLIB_HAVE_UNLOAD_EVENT is TRUE, 134130812Smarcel or undefined results are guaranteed. 135130812Smarcel 136130812Smarcel This string's contents are only valid immediately after the inferior 137130812Smarcel has stopped in the dynamic linker hook, and becomes invalid as soon 138130812Smarcel as the inferior is continued. Clients should make a copy of this 139130812Smarcel string if they wish to continue the inferior and then access the string. 140130812Smarcel 141130812Smarcel Presently, this functionality is not implemented. 142130812Smarcel */ 143130812Smarcel/* 144130812Smarcel #define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) \ 145130812Smarcel error("catch of library loads/unloads not yet implemented on this platform") 146130812Smarcel */ 147130812Smarcel 148130812Smarcel#define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) \ 149130812Smarcel(0) 150130812Smarcel 151130812Smarcel/* This function returns TRUE if pc is the address of an instruction that 152130812Smarcel lies within the dynamic linker (such as the event hook, or the dld 153130812Smarcel itself). 154130812Smarcel 155130812Smarcel This function must be used only when a dynamic linker event has been 156130812Smarcel caught, and the inferior is being stepped out of the hook, or undefined 157130812Smarcel results are guaranteed. 158130812Smarcel 159130812Smarcel Presently, this functionality is not implemented. 160130812Smarcel */ 161130812Smarcel 162130812Smarcel/* 163130812Smarcel #define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \ 164130812Smarcel error("catch of library loads/unloads not yet implemented on this platform") 165130812Smarcel */ 166130812Smarcel 167130812Smarcel#define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \ 168130812Smarcel(0) 169130812Smarcel 170130812Smarcel/* This function must be called when the inferior is killed, and the program 171130812Smarcel restarted. This is not the same as CLEAR_SOLIB, in that it doesn't discard 172130812Smarcel any symbol tables. 173130812Smarcel 174130812Smarcel Presently, this functionality is not implemented. 175130812Smarcel */ 176130812Smarcel#define SOLIB_RESTART() \ 177130812Smarcel (0) 178130812Smarcel 179130812Smarcel/* If we can't set a breakpoint, and it's in a shared library, just 180130812Smarcel disable it. */ 181130812Smarcel 182130812Smarcel#if 0 183130812Smarcel#define DISABLE_UNSETTABLE_BREAK(addr) coff_solib_address(addr) 184130812Smarcel 185130812Smarcelextern int solib_address (CORE_ADDR); /* solib.c */ 186130812Smarcel#endif 187