1 /* HP SOM Shared library declarations for GDB, the GNU Debugger.
2 Copyright (C) 1992 Free Software Foundation, Inc.
4 This file is part of GDB.
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
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.
21 Written by the Center for Software Science at the Univerity of Utah
22 and by Cygnus Support. */
24 /* Forward decl's for prototypes */
27 struct section_offsets
;
29 /* Called to add symbols from a shared library to gdb's symbol table. */
31 #define SOLIB_ADD(filename, from_tty, targ) \
32 som_solib_add (filename, from_tty, targ)
34 extern void som_solib_add (char *, int, struct target_ops
*);
36 extern CORE_ADDR
som_solib_get_got_by_pc (CORE_ADDR
);
39 som_solib_section_offsets (struct objfile
*, struct section_offsets
*);
41 /* Function to be called when the inferior starts up, to discover the names
42 of shared libraries that are dynamically linked, the base addresses to
43 which they are linked, and sufficient information to read in their symbols
46 #define SOLIB_CREATE_INFERIOR_HOOK(PID) som_solib_create_inferior_hook()
48 extern void som_solib_create_inferior_hook (void);
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.)
55 #define SOLIB_REMOVE_INFERIOR_HOOK(PID) som_solib_remove_inferior_hook(PID)
57 extern void som_solib_remove_inferior_hook (int);
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.
63 #define SOLIB_CREATE_CATCH_LOAD_HOOK(pid,tempflag, filename,cond_string) \
64 som_solib_create_catch_load_hook (pid, tempflag, filename, cond_string)
66 extern void som_solib_create_catch_load_hook (int, int, char *, char *);
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.
72 #define SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid,tempflag,filename, cond_string) \
73 som_solib_create_catch_unload_hook (pid, tempflag, filename, cond_string)
75 extern void som_solib_create_catch_unload_hook (int, int, char *, char *);
77 /* This function returns TRUE if the dynamic linker has just reported
80 This function must be used only when the inferior has stopped in
81 the dynamic linker hook, or undefined results are guaranteed.
83 #define SOLIB_HAVE_LOAD_EVENT(pid) \
84 som_solib_have_load_event (pid)
86 extern int som_solib_have_load_event (int);
88 /* This function returns a pointer to the string representation of the
89 pathname of the dynamically-linked library that has just been loaded.
91 This function must be used only when SOLIB_HAVE_LOAD_EVENT is TRUE,
92 or undefined results are guaranteed.
94 This string's contents are only valid immediately after the inferior
95 has stopped in the dynamic linker hook, and becomes invalid as soon
96 as the inferior is continued. Clients should make a copy of this
97 string if they wish to continue the inferior and then access the string.
99 #define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \
100 som_solib_loaded_library_pathname (pid)
102 extern char *som_solib_loaded_library_pathname (int);
104 /* This function returns TRUE if the dynamic linker has just reported
105 an unload of a library.
107 This function must be used only when the inferior has stopped in
108 the dynamic linker hook, or undefined results are guaranteed.
110 #define SOLIB_HAVE_UNLOAD_EVENT(pid) \
111 som_solib_have_unload_event (pid)
113 extern int som_solib_have_unload_event (int);
115 /* This function returns a pointer to the string representation of the
116 pathname of the dynamically-linked library that has just been unloaded.
118 This function must be used only when SOLIB_HAVE_UNLOAD_EVENT is TRUE,
119 or undefined results are guaranteed.
121 This string's contents are only valid immediately after the inferior
122 has stopped in the dynamic linker hook, and becomes invalid as soon
123 as the inferior is continued. Clients should make a copy of this
124 string if they wish to continue the inferior and then access the string.
126 #define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) \
127 som_solib_unloaded_library_pathname (pid)
129 extern char *som_solib_unloaded_library_pathname (int);
131 /* This function returns TRUE if pc is the address of an instruction that
132 lies within the dynamic linker (such as the event hook, or the dld
135 This function must be used only when a dynamic linker event has been
136 caught, and the inferior is being stepped out of the hook, or undefined
137 results are guaranteed.
139 #define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \
140 som_solib_in_dynamic_linker (pid, pc)
142 extern int som_solib_in_dynamic_linker (int, CORE_ADDR
);
144 /* This function must be called when the inferior is killed, and the program
145 restarted. This is not the same as CLEAR_SOLIB, in that it doesn't discard
148 Presently, this functionality is not implemented.
150 #define SOLIB_RESTART() \
153 extern void som_solib_restart (void);
155 /* If we can't set a breakpoint, and it's in a shared library, just
158 #define DISABLE_UNSETTABLE_BREAK(addr) (som_solib_address(addr) != NULL)
160 extern char *som_solib_address (CORE_ADDR
); /* somsolib.c */
162 /* If ADDR lies in a shared library, return its name. */
164 #define PC_SOLIB(addr) som_solib_address (addr)
This page took 0.035137 seconds and 4 git commands to generate.