]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/pa64solib.h
2005-02-11 Andrew Cagney <cagney@gnu.org>
[thirdparty/binutils-gdb.git] / gdb / pa64solib.h
CommitLineData
53a5351d 1/* HP PA64 ELF Shared library declarations for GDB, the GNU Debugger.
b6ba6518 2 Copyright 1999, 2000 Free Software Foundation, Inc.
53a5351d
JM
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/* Forward decl's for prototypes */
53a5351d
JM
22struct target_ops;
23struct objfile;
24struct section_offsets;
89676665 25struct so_list;
53a5351d
JM
26
27/* Called to add symbols from a shared library to gdb's symbol table. */
28
990f9fe3
FF
29#define SOLIB_ADD(filename, from_tty, targ, readsyms) \
30 pa64_solib_add (filename, from_tty, targ, readsyms)
53a5351d 31
990f9fe3 32extern void pa64_solib_add (char *, int, struct target_ops *, int);
53a5351d 33
a14ed312 34extern CORE_ADDR pa64_solib_get_got_by_pc (CORE_ADDR);
53a5351d
JM
35
36/* Function to be called when the inferior starts up, to discover the names
37 of shared libraries that are dynamically linked, the base addresses to
38 which they are linked, and sufficient information to read in their symbols
39 at a later time. */
40
beda9597 41#define SOLIB_CREATE_INFERIOR_HOOK(PID) pa64_solib_create_inferior_hook ()
53a5351d 42
a14ed312 43extern void pa64_solib_create_inferior_hook (void);
53a5351d
JM
44
45/* Function to be called to remove the connection between debugger and
46 dynamic linker that was established by SOLIB_CREATE_INFERIOR_HOOK.
47 (This operation does not remove shared library information from
48 the debugger, as CLEAR_SOLIB does.) */
beda9597 49#define SOLIB_REMOVE_INFERIOR_HOOK(PID) pa64_solib_remove_inferior_hook (PID)
53a5351d 50
a14ed312 51extern void pa64_solib_remove_inferior_hook (int);
53a5351d
JM
52
53/* This function is called by the "catch load" command. It allows
54 the debugger to be notified by the dynamic linker when a specified
55 library file (or any library file, if filename is NULL) is loaded. */
beda9597 56#define SOLIB_CREATE_CATCH_LOAD_HOOK(pid, tempflag, filename, cond_string) \
53a5351d
JM
57 pa64_solib_create_catch_load_hook (pid, tempflag, filename, cond_string)
58
a14ed312 59extern void pa64_solib_create_catch_load_hook (int, int, char *, char *);
53a5351d
JM
60
61/* This function is called by the "catch unload" command. It allows
62 the debugger to be notified by the dynamic linker when a specified
63 library file (or any library file, if filename is NULL) is unloaded. */
beda9597 64#define SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid, tempflag, filename, cond_string) \
53a5351d
JM
65 pa64_solib_create_catch_unload_hook (pid, tempflag, filename, cond_string)
66
a14ed312 67extern void pa64_solib_create_catch_unload_hook (int, int, char *, char *);
53a5351d
JM
68
69/* This function returns TRUE if the dynamic linker has just reported
70 a load of a library.
71
72 This function must be used only when the inferior has stopped in
73 the dynamic linker hook, or undefined results are guaranteed. */
74#define SOLIB_HAVE_LOAD_EVENT(pid) \
75 pa64_solib_have_load_event (pid)
76
a14ed312 77extern int pa64_solib_have_load_event (int);
53a5351d
JM
78
79/* This function returns a pointer to the string representation of the
80 pathname of the dynamically-linked library that has just been loaded.
81
82 This function must be used only when SOLIB_HAVE_LOAD_EVENT is TRUE,
83 or undefined results are guaranteed.
84
85 This string's contents are only valid immediately after the inferior
86 has stopped in the dynamic linker hook, and becomes invalid as soon
87 as the inferior is continued. Clients should make a copy of this
88 string if they wish to continue the inferior and then access the string. */
89#define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \
90 pa64_solib_loaded_library_pathname (pid)
91
a14ed312 92extern char *pa64_solib_loaded_library_pathname (int);
53a5351d
JM
93
94/* This function returns TRUE if the dynamic linker has just reported
95 an unload of a library.
96
97 This function must be used only when the inferior has stopped in
98 the dynamic linker hook, or undefined results are guaranteed. */
99#define SOLIB_HAVE_UNLOAD_EVENT(pid) \
100 pa64_solib_have_unload_event (pid)
101
a14ed312 102extern int pa64_solib_have_unload_event (int);
53a5351d
JM
103
104/* This function returns a pointer to the string representation of the
105 pathname of the dynamically-linked library that has just been unloaded.
106
107 This function must be used only when SOLIB_HAVE_UNLOAD_EVENT is TRUE,
108 or undefined results are guaranteed.
109
110 This string's contents are only valid immediately after the inferior
111 has stopped in the dynamic linker hook, and becomes invalid as soon
112 as the inferior is continued. Clients should make a copy of this
113 string if they wish to continue the inferior and then access the string. */
114#define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) \
115 pa64_solib_unloaded_library_pathname (pid)
116
a14ed312 117extern char *pa64_solib_unloaded_library_pathname (int);
53a5351d
JM
118
119/* This function returns TRUE if pc is the address of an instruction that
120 lies within the dynamic linker (such as the event hook, or the dld
121 itself).
122
123 This function must be used only when a dynamic linker event has been
124 caught, and the inferior is being stepped out of the hook, or undefined
125 results are guaranteed. */
126#define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \
127 pa64_solib_in_dynamic_linker (pid, pc)
128
a14ed312 129extern int pa64_solib_in_dynamic_linker (int, CORE_ADDR);
53a5351d
JM
130
131/* This function must be called when the inferior is killed, and the program
132 restarted. This is not the same as CLEAR_SOLIB, in that it doesn't discard
133 any symbol tables.
134
135 Presently, this functionality is not implemented. */
136#define SOLIB_RESTART() \
137 pa64_solib_restart ()
138
a14ed312 139extern void pa64_solib_restart (void);
53a5351d
JM
140
141/* If we can't set a breakpoint, and it's in a shared library, just
142 disable it. */
143
144#define DISABLE_UNSETTABLE_BREAK(addr) (pa64_solib_address(addr) != NULL)
145
a14ed312 146extern char *pa64_solib_address (CORE_ADDR); /* somsolib.c */
53a5351d
JM
147
148/* If ADDR lies in a shared library, return its name. */
149
150#define PC_SOLIB(addr) pa64_solib_address (addr)
89676665
RC
151
152CORE_ADDR pa64_solib_thread_start_addr (struct so_list *so);