1 /* HP PA64 ELF Shared library declarations for GDB, the GNU Debugger.
2 Copyright 1999, 2000 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, readsyms) \
29 pa64_solib_add (filename, from_tty, targ, readsyms)
31 extern void pa64_solib_add (char *, int, struct target_ops *, int);
33 extern CORE_ADDR pa64_solib_get_got_by_pc (CORE_ADDR);
35 /* Function to be called when the inferior starts up, to discover the names
36 of shared libraries that are dynamically linked, the base addresses to
37 which they are linked, and sufficient information to read in their symbols
40 #define SOLIB_CREATE_INFERIOR_HOOK(PID) pa64_solib_create_inferior_hook()
42 extern void pa64_solib_create_inferior_hook (void);
44 /* Function to be called to remove the connection between debugger and
45 dynamic linker that was established by SOLIB_CREATE_INFERIOR_HOOK.
46 (This operation does not remove shared library information from
47 the debugger, as CLEAR_SOLIB does.) */
48 #define SOLIB_REMOVE_INFERIOR_HOOK(PID) pa64_solib_remove_inferior_hook(PID)
50 extern void pa64_solib_remove_inferior_hook (int);
52 /* This function is called by the "catch load" command. It allows
53 the debugger to be notified by the dynamic linker when a specified
54 library file (or any library file, if filename is NULL) is loaded. */
55 #define SOLIB_CREATE_CATCH_LOAD_HOOK(pid,tempflag, filename,cond_string) \
56 pa64_solib_create_catch_load_hook (pid, tempflag, filename, cond_string)
58 extern void pa64_solib_create_catch_load_hook (int, int, char *, char *);
60 /* This function is called by the "catch unload" command. It allows
61 the debugger to be notified by the dynamic linker when a specified
62 library file (or any library file, if filename is NULL) is unloaded. */
63 #define SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid,tempflag,filename, cond_string) \
64 pa64_solib_create_catch_unload_hook (pid, tempflag, filename, cond_string)
66 extern void pa64_solib_create_catch_unload_hook (int, int, char *, char *);
68 /* This function returns TRUE if the dynamic linker has just reported
71 This function must be used only when the inferior has stopped in
72 the dynamic linker hook, or undefined results are guaranteed. */
73 #define SOLIB_HAVE_LOAD_EVENT(pid) \
74 pa64_solib_have_load_event (pid)
76 extern int pa64_solib_have_load_event (int);
78 /* This function returns a pointer to the string representation of the
79 pathname of the dynamically-linked library that has just been loaded.
81 This function must be used only when SOLIB_HAVE_LOAD_EVENT is TRUE,
82 or undefined results are guaranteed.
84 This string's contents are only valid immediately after the inferior
85 has stopped in the dynamic linker hook, and becomes invalid as soon
86 as the inferior is continued. Clients should make a copy of this
87 string if they wish to continue the inferior and then access the string. */
88 #define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \
89 pa64_solib_loaded_library_pathname (pid)
91 extern char *pa64_solib_loaded_library_pathname (int);
93 /* This function returns TRUE if the dynamic linker has just reported
94 an unload of a library.
96 This function must be used only when the inferior has stopped in
97 the dynamic linker hook, or undefined results are guaranteed. */
98 #define SOLIB_HAVE_UNLOAD_EVENT(pid) \
99 pa64_solib_have_unload_event (pid)
101 extern int pa64_solib_have_unload_event (int);
103 /* This function returns a pointer to the string representation of the
104 pathname of the dynamically-linked library that has just been unloaded.
106 This function must be used only when SOLIB_HAVE_UNLOAD_EVENT is TRUE,
107 or undefined results are guaranteed.
109 This string's contents are only valid immediately after the inferior
110 has stopped in the dynamic linker hook, and becomes invalid as soon
111 as the inferior is continued. Clients should make a copy of this
112 string if they wish to continue the inferior and then access the string. */
113 #define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) \
114 pa64_solib_unloaded_library_pathname (pid)
116 extern char *pa64_solib_unloaded_library_pathname (int);
118 /* This function returns TRUE if pc is the address of an instruction that
119 lies within the dynamic linker (such as the event hook, or the dld
122 This function must be used only when a dynamic linker event has been
123 caught, and the inferior is being stepped out of the hook, or undefined
124 results are guaranteed. */
125 #define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \
126 pa64_solib_in_dynamic_linker (pid, pc)
128 extern int pa64_solib_in_dynamic_linker (int, CORE_ADDR);
130 /* This function must be called when the inferior is killed, and the program
131 restarted. This is not the same as CLEAR_SOLIB, in that it doesn't discard
134 Presently, this functionality is not implemented. */
135 #define SOLIB_RESTART() \
136 pa64_solib_restart ()
138 extern void pa64_solib_restart (void);
140 /* If we can't set a breakpoint, and it's in a shared library, just
143 #define DISABLE_UNSETTABLE_BREAK(addr) (pa64_solib_address(addr) != NULL)
145 extern char *pa64_solib_address (CORE_ADDR); /* somsolib.c */
147 /* If ADDR lies in a shared library, return its name. */
149 #define PC_SOLIB(addr) pa64_solib_address (addr)