]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/somsolib.h
* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[thirdparty/binutils-gdb.git] / gdb / somsolib.h
1 /* HP SOM Shared library declarations for GDB, the GNU Debugger.
2 Copyright (C) 1992 Free Software Foundation, Inc.
3
4 This file is part of GDB.
5
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.
10
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.
15
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, Boston, MA 02111-1307, USA.
19
20 Written by the Center for Software Science at the Univerity of Utah
21 and by Cygnus Support. */
22
23 #ifdef __STDC__ /* Forward decl's for prototypes */
24 struct target_ops;
25 struct objfile;
26 struct section_offsets;
27 #endif
28
29 /* Called to add symbols from a shared library to gdb's symbol table. */
30
31 #define SOLIB_ADD(filename, from_tty, targ) \
32 som_solib_add (filename, from_tty, targ)
33
34 extern void
35 som_solib_add PARAMS ((char *, int, struct target_ops *));
36
37 extern CORE_ADDR
38 som_solib_get_got_by_pc PARAMS ((CORE_ADDR));
39
40 extern int
41 som_solib_section_offsets PARAMS ((struct objfile *, struct section_offsets *));
42
43 /* Function to be called when the inferior starts up, to discover the names
44 of shared libraries that are dynamically linked, the base addresses to
45 which they are linked, and sufficient information to read in their symbols
46 at a later time. */
47
48 #define SOLIB_CREATE_INFERIOR_HOOK(PID) som_solib_create_inferior_hook()
49
50 extern void
51 som_solib_create_inferior_hook PARAMS((void));
52
53 /* Function to be called to remove the connection between debugger and
54 dynamic linker that was established by SOLIB_CREATE_INFERIOR_HOOK.
55 (This operation does not remove shared library information from
56 the debugger, as CLEAR_SOLIB does.)
57 */
58 #define SOLIB_REMOVE_INFERIOR_HOOK(PID) som_solib_remove_inferior_hook(PID)
59
60 extern void
61 som_solib_remove_inferior_hook PARAMS((int));
62
63 /* This function is called by the "catch load" command. It allows
64 the debugger to be notified by the dynamic linker when a specified
65 library file (or any library file, if filename is NULL) is loaded.
66 */
67 #define SOLIB_CREATE_CATCH_LOAD_HOOK(pid,tempflag, filename,cond_string) \
68 som_solib_create_catch_load_hook (pid, tempflag, filename, cond_string)
69
70 extern void
71 som_solib_create_catch_load_hook PARAMS((int, int, char *, char *));
72
73 /* This function is called by the "catch unload" command. It allows
74 the debugger to be notified by the dynamic linker when a specified
75 library file (or any library file, if filename is NULL) is unloaded.
76 */
77 #define SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid,tempflag,filename, cond_string) \
78 som_solib_create_catch_unload_hook (pid, tempflag, filename, cond_string)
79
80 extern void
81 som_solib_create_catch_unload_hook PARAMS((int, int, char *, char *));
82
83 /* This function returns TRUE if the dynamic linker has just reported
84 a load of a library.
85
86 This function must be used only when the inferior has stopped in
87 the dynamic linker hook, or undefined results are guaranteed.
88 */
89 #define SOLIB_HAVE_LOAD_EVENT(pid) \
90 som_solib_have_load_event (pid)
91
92 extern int
93 som_solib_have_load_event PARAMS((int));
94
95 /* This function returns a pointer to the string representation of the
96 pathname of the dynamically-linked library that has just been loaded.
97
98 This function must be used only when SOLIB_HAVE_LOAD_EVENT is TRUE,
99 or undefined results are guaranteed.
100
101 This string's contents are only valid immediately after the inferior
102 has stopped in the dynamic linker hook, and becomes invalid as soon
103 as the inferior is continued. Clients should make a copy of this
104 string if they wish to continue the inferior and then access the string.
105 */
106 #define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \
107 som_solib_loaded_library_pathname (pid)
108
109 extern char *
110 som_solib_loaded_library_pathname PARAMS((int));
111
112 /* This function returns TRUE if the dynamic linker has just reported
113 an unload of a library.
114
115 This function must be used only when the inferior has stopped in
116 the dynamic linker hook, or undefined results are guaranteed.
117 */
118 #define SOLIB_HAVE_UNLOAD_EVENT(pid) \
119 som_solib_have_unload_event (pid)
120
121 extern int
122 som_solib_have_unload_event PARAMS((int));
123
124 /* This function returns a pointer to the string representation of the
125 pathname of the dynamically-linked library that has just been unloaded.
126
127 This function must be used only when SOLIB_HAVE_UNLOAD_EVENT is TRUE,
128 or undefined results are guaranteed.
129
130 This string's contents are only valid immediately after the inferior
131 has stopped in the dynamic linker hook, and becomes invalid as soon
132 as the inferior is continued. Clients should make a copy of this
133 string if they wish to continue the inferior and then access the string.
134 */
135 #define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) \
136 som_solib_unloaded_library_pathname (pid)
137
138 extern char *
139 som_solib_unloaded_library_pathname PARAMS((int));
140
141 /* This function returns TRUE if pc is the address of an instruction that
142 lies within the dynamic linker (such as the event hook, or the dld
143 itself).
144
145 This function must be used only when a dynamic linker event has been
146 caught, and the inferior is being stepped out of the hook, or undefined
147 results are guaranteed.
148 */
149 #define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \
150 som_solib_in_dynamic_linker (pid, pc)
151
152 extern int
153 som_solib_in_dynamic_linker PARAMS((int, CORE_ADDR));
154
155 /* This function must be called when the inferior is killed, and the program
156 restarted. This is not the same as CLEAR_SOLIB, in that it doesn't discard
157 any symbol tables.
158
159 Presently, this functionality is not implemented.
160 */
161 #define SOLIB_RESTART() \
162 som_solib_restart ()
163
164 extern void
165 som_solib_restart PARAMS((void));
166
167 /* If we can't set a breakpoint, and it's in a shared library, just
168 disable it. */
169
170 #define DISABLE_UNSETTABLE_BREAK(addr) (som_solib_address(addr) != NULL)
171
172 extern char *
173 som_solib_address PARAMS ((CORE_ADDR)); /* somsolib.c */
174
175 /* If ADDR lies in a shared library, return its name. */
176
177 #define PC_SOLIB(addr) som_solib_address (addr)