1 /* HP PA64 ELF Shared library declarations for GDB, the GNU Debugger.
2 Copyright (C) 1999 Free Software Foundation, Inc.
4 This file is part of GDB.
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.
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.
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. */
21 /* Forward decl's for prototypes */
24 struct section_offsets
;
26 /* Called to add symbols from a shared library to gdb's symbol table. */
28 #define SOLIB_ADD(filename, from_tty, targ) \
29 pa64_solib_add (filename, from_tty, targ)
32 pa64_solib_add
PARAMS ((char *, int, struct target_ops
*));
35 pa64_solib_get_got_by_pc
PARAMS ((CORE_ADDR
));
37 /* Function to be called when the inferior starts up, to discover the names
38 of shared libraries that are dynamically linked, the base addresses to
39 which they are linked, and sufficient information to read in their symbols
42 #define SOLIB_CREATE_INFERIOR_HOOK(PID) pa64_solib_create_inferior_hook()
45 pa64_solib_create_inferior_hook
PARAMS ((void));
47 /* Function to be called to remove the connection between debugger and
48 dynamic linker that was established by SOLIB_CREATE_INFERIOR_HOOK.
49 (This operation does not remove shared library information from
50 the debugger, as CLEAR_SOLIB does.) */
51 #define SOLIB_REMOVE_INFERIOR_HOOK(PID) pa64_solib_remove_inferior_hook(PID)
54 pa64_solib_remove_inferior_hook
PARAMS ((int));
56 /* This function is called by the "catch load" command. It allows
57 the debugger to be notified by the dynamic linker when a specified
58 library file (or any library file, if filename is NULL) is loaded. */
59 #define SOLIB_CREATE_CATCH_LOAD_HOOK(pid,tempflag, filename,cond_string) \
60 pa64_solib_create_catch_load_hook (pid, tempflag, filename, cond_string)
63 pa64_solib_create_catch_load_hook
PARAMS ((int, int, char *, char *));
65 /* This function is called by the "catch unload" command. It allows
66 the debugger to be notified by the dynamic linker when a specified
67 library file (or any library file, if filename is NULL) is unloaded. */
68 #define SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid,tempflag,filename, cond_string) \
69 pa64_solib_create_catch_unload_hook (pid, tempflag, filename, cond_string)
72 pa64_solib_create_catch_unload_hook
PARAMS ((int, int, char *, char *));
74 /* This function returns TRUE if the dynamic linker has just reported
77 This function must be used only when the inferior has stopped in
78 the dynamic linker hook, or undefined results are guaranteed. */
79 #define SOLIB_HAVE_LOAD_EVENT(pid) \
80 pa64_solib_have_load_event (pid)
83 pa64_solib_have_load_event
PARAMS ((int));
85 /* This function returns a pointer to the string representation of the
86 pathname of the dynamically-linked library that has just been loaded.
88 This function must be used only when SOLIB_HAVE_LOAD_EVENT is TRUE,
89 or undefined results are guaranteed.
91 This string's contents are only valid immediately after the inferior
92 has stopped in the dynamic linker hook, and becomes invalid as soon
93 as the inferior is continued. Clients should make a copy of this
94 string if they wish to continue the inferior and then access the string. */
95 #define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \
96 pa64_solib_loaded_library_pathname (pid)
99 pa64_solib_loaded_library_pathname
PARAMS ((int));
101 /* This function returns TRUE if the dynamic linker has just reported
102 an unload of a library.
104 This function must be used only when the inferior has stopped in
105 the dynamic linker hook, or undefined results are guaranteed. */
106 #define SOLIB_HAVE_UNLOAD_EVENT(pid) \
107 pa64_solib_have_unload_event (pid)
110 pa64_solib_have_unload_event
PARAMS ((int));
112 /* This function returns a pointer to the string representation of the
113 pathname of the dynamically-linked library that has just been unloaded.
115 This function must be used only when SOLIB_HAVE_UNLOAD_EVENT is TRUE,
116 or undefined results are guaranteed.
118 This string's contents are only valid immediately after the inferior
119 has stopped in the dynamic linker hook, and becomes invalid as soon
120 as the inferior is continued. Clients should make a copy of this
121 string if they wish to continue the inferior and then access the string. */
122 #define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) \
123 pa64_solib_unloaded_library_pathname (pid)
126 pa64_solib_unloaded_library_pathname
PARAMS ((int));
128 /* This function returns TRUE if pc is the address of an instruction that
129 lies within the dynamic linker (such as the event hook, or the dld
132 This function must be used only when a dynamic linker event has been
133 caught, and the inferior is being stepped out of the hook, or undefined
134 results are guaranteed. */
135 #define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \
136 pa64_solib_in_dynamic_linker (pid, pc)
139 pa64_solib_in_dynamic_linker
PARAMS ((int, CORE_ADDR
));
141 /* This function must be called when the inferior is killed, and the program
142 restarted. This is not the same as CLEAR_SOLIB, in that it doesn't discard
145 Presently, this functionality is not implemented. */
146 #define SOLIB_RESTART() \
147 pa64_solib_restart ()
150 pa64_solib_restart
PARAMS ((void));
152 /* If we can't set a breakpoint, and it's in a shared library, just
155 #define DISABLE_UNSETTABLE_BREAK(addr) (pa64_solib_address(addr) != NULL)
158 pa64_solib_address
PARAMS ((CORE_ADDR
)); /* somsolib.c */
160 /* If ADDR lies in a shared library, return its name. */
162 #define PC_SOLIB(addr) pa64_solib_address (addr)