2000-12-19 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
[deliverable/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,
19 Boston, MA 02111-1307, USA.
20
21 Written by the Center for Software Science at the Univerity of Utah
22 and by Cygnus Support. */
23
24 /* Forward decl's for prototypes */
25 struct target_ops;
26 struct objfile;
27 struct section_offsets;
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 som_solib_add (char *, int, struct target_ops *);
35
36 extern CORE_ADDR som_solib_get_got_by_pc (CORE_ADDR);
37
38 extern int
39 som_solib_section_offsets (struct objfile *, struct section_offsets *);
40
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
44 at a later time. */
45
46 #define SOLIB_CREATE_INFERIOR_HOOK(PID) som_solib_create_inferior_hook()
47
48 extern void som_solib_create_inferior_hook (void);
49
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.)
54 */
55 #define SOLIB_REMOVE_INFERIOR_HOOK(PID) som_solib_remove_inferior_hook(PID)
56
57 extern void som_solib_remove_inferior_hook (int);
58
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.
62 */
63 #define SOLIB_CREATE_CATCH_LOAD_HOOK(pid,tempflag, filename,cond_string) \
64 som_solib_create_catch_load_hook (pid, tempflag, filename, cond_string)
65
66 extern void som_solib_create_catch_load_hook (int, int, char *, char *);
67
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.
71 */
72 #define SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid,tempflag,filename, cond_string) \
73 som_solib_create_catch_unload_hook (pid, tempflag, filename, cond_string)
74
75 extern void som_solib_create_catch_unload_hook (int, int, char *, char *);
76
77 /* This function returns TRUE if the dynamic linker has just reported
78 a load of a library.
79
80 This function must be used only when the inferior has stopped in
81 the dynamic linker hook, or undefined results are guaranteed.
82 */
83 #define SOLIB_HAVE_LOAD_EVENT(pid) \
84 som_solib_have_load_event (pid)
85
86 extern int som_solib_have_load_event (int);
87
88 /* This function returns a pointer to the string representation of the
89 pathname of the dynamically-linked library that has just been loaded.
90
91 This function must be used only when SOLIB_HAVE_LOAD_EVENT is TRUE,
92 or undefined results are guaranteed.
93
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.
98 */
99 #define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \
100 som_solib_loaded_library_pathname (pid)
101
102 extern char *som_solib_loaded_library_pathname (int);
103
104 /* This function returns TRUE if the dynamic linker has just reported
105 an unload of a library.
106
107 This function must be used only when the inferior has stopped in
108 the dynamic linker hook, or undefined results are guaranteed.
109 */
110 #define SOLIB_HAVE_UNLOAD_EVENT(pid) \
111 som_solib_have_unload_event (pid)
112
113 extern int som_solib_have_unload_event (int);
114
115 /* This function returns a pointer to the string representation of the
116 pathname of the dynamically-linked library that has just been unloaded.
117
118 This function must be used only when SOLIB_HAVE_UNLOAD_EVENT is TRUE,
119 or undefined results are guaranteed.
120
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.
125 */
126 #define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) \
127 som_solib_unloaded_library_pathname (pid)
128
129 extern char *som_solib_unloaded_library_pathname (int);
130
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
133 itself).
134
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.
138 */
139 #define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \
140 som_solib_in_dynamic_linker (pid, pc)
141
142 extern int som_solib_in_dynamic_linker (int, CORE_ADDR);
143
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
146 any symbol tables.
147
148 Presently, this functionality is not implemented.
149 */
150 #define SOLIB_RESTART() \
151 som_solib_restart ()
152
153 extern void som_solib_restart (void);
154
155 /* If we can't set a breakpoint, and it's in a shared library, just
156 disable it. */
157
158 #define DISABLE_UNSETTABLE_BREAK(addr) (som_solib_address(addr) != NULL)
159
160 extern char *som_solib_address (CORE_ADDR); /* somsolib.c */
161
162 /* If ADDR lies in a shared library, return its name. */
163
164 #define PC_SOLIB(addr) som_solib_address (addr)
This page took 0.031635 seconds and 4 git commands to generate.