]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/somsolib.h
* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[thirdparty/binutils-gdb.git] / gdb / somsolib.h
CommitLineData
bb140953
JL
1/* HP SOM Shared library declarations for GDB, the GNU Debugger.
2 Copyright (C) 1992 Free Software Foundation, Inc.
3
4This file is part of GDB.
5
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; if not, write to the Free Software
6c9638b4 18Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
bb140953
JL
19
20Written by the Center for Software Science at the Univerity of Utah
21and by Cygnus Support. */
22
23#ifdef __STDC__ /* Forward decl's for prototypes */
24struct target_ops;
506af7a7
JL
25struct objfile;
26struct section_offsets;
bb140953
JL
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
34extern void
35som_solib_add PARAMS ((char *, int, struct target_ops *));
36
b1bbe38b
JL
37extern CORE_ADDR
38som_solib_get_got_by_pc PARAMS ((CORE_ADDR));
39
506af7a7
JL
40extern int
41som_solib_section_offsets PARAMS ((struct objfile *, struct section_offsets *));
42
bb140953
JL
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
51som_solib_create_inferior_hook PARAMS((void));
65b07ddc
DT
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
60extern void
61som_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
70extern void
71som_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
80extern void
81som_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
92extern int
93som_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
109extern char *
110som_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
121extern int
122som_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
138extern char *
139som_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
152extern int
153som_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
164extern void
165som_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
172extern char *
173som_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)