import gdb-1999-08-30 snapshot
[deliverable/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
104c1213 24/* Forward decl's for prototypes */
c906108c
SS
25struct target_ops;
26struct objfile;
27struct section_offsets;
c906108c
SS
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
34extern void
35som_solib_add PARAMS ((char *, int, struct target_ops *));
36
37extern CORE_ADDR
c5aa993b 38 som_solib_get_got_by_pc PARAMS ((CORE_ADDR));
c906108c
SS
39
40extern int
41som_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
50extern void
c5aa993b 51som_solib_create_inferior_hook PARAMS ((void));
c906108c
SS
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.)
c5aa993b 57 */
c906108c
SS
58#define SOLIB_REMOVE_INFERIOR_HOOK(PID) som_solib_remove_inferior_hook(PID)
59
60extern void
c5aa993b 61som_solib_remove_inferior_hook PARAMS ((int));
c906108c
SS
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.
c5aa993b 66 */
c906108c
SS
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
70extern void
c5aa993b 71som_solib_create_catch_load_hook PARAMS ((int, int, char *, char *));
c906108c
SS
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.
c5aa993b 76 */
c906108c
SS
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
80extern void
c5aa993b 81som_solib_create_catch_unload_hook PARAMS ((int, int, char *, char *));
c906108c
SS
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.
c5aa993b 88 */
c906108c
SS
89#define SOLIB_HAVE_LOAD_EVENT(pid) \
90 som_solib_have_load_event (pid)
91
92extern int
c5aa993b 93som_solib_have_load_event PARAMS ((int));
c906108c
SS
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.
c5aa993b 105 */
c906108c
SS
106#define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \
107 som_solib_loaded_library_pathname (pid)
108
109extern char *
c5aa993b 110 som_solib_loaded_library_pathname PARAMS ((int));
c906108c
SS
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.
c5aa993b 117 */
c906108c
SS
118#define SOLIB_HAVE_UNLOAD_EVENT(pid) \
119 som_solib_have_unload_event (pid)
120
121extern int
c5aa993b 122som_solib_have_unload_event PARAMS ((int));
c906108c
SS
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.
c5aa993b 134 */
c906108c
SS
135#define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) \
136 som_solib_unloaded_library_pathname (pid)
137
138extern char *
c5aa993b 139 som_solib_unloaded_library_pathname PARAMS ((int));
c906108c
SS
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.
c5aa993b 148 */
c906108c
SS
149#define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \
150 som_solib_in_dynamic_linker (pid, pc)
151
152extern int
c5aa993b 153som_solib_in_dynamic_linker PARAMS ((int, CORE_ADDR));
c906108c
SS
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.
c5aa993b 160 */
c906108c
SS
161#define SOLIB_RESTART() \
162 som_solib_restart ()
163
164extern void
c5aa993b 165som_solib_restart PARAMS ((void));
c906108c
SS
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
172extern char *
c5aa993b 173 som_solib_address PARAMS ((CORE_ADDR)); /* somsolib.c */
c906108c
SS
174
175/* If ADDR lies in a shared library, return its name. */
176
177#define PC_SOLIB(addr) som_solib_address (addr)
This page took 0.040627 seconds and 4 git commands to generate.