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