2004-03-17 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / solib.h
CommitLineData
c906108c 1/* Shared library declarations for GDB, the GNU Debugger.
287c3240 2 Copyright 1992, 1993, 1995, 1998, 1999, 2000, 2001, 2003
b6ba6518 3 Free Software Foundation, Inc.
c906108c 4
c5aa993b 5 This file is part of GDB.
c906108c 6
c5aa993b
JM
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
c906108c 11
c5aa993b
JM
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
c906108c 16
c5aa993b
JM
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
c906108c 21
010f3b2f
JT
22#ifndef SOLIB_H
23#define SOLIB_H
24
104c1213 25/* Forward decl's for prototypes */
c906108c 26struct target_ops;
c906108c
SS
27
28/* Called when we free all symtabs, to free the shared library information
29 as well. */
30
31#define CLEAR_SOLIB clear_solib
32
a14ed312 33extern void clear_solib (void);
c906108c
SS
34
35/* Called to add symbols from a shared library to gdb's symbol table. */
36
990f9fe3
FF
37#define SOLIB_ADD(filename, from_tty, targ, readsyms) \
38 solib_add (filename, from_tty, targ, readsyms)
c906108c 39
990f9fe3 40extern void solib_add (char *, int, struct target_ops *, int);
c906108c
SS
41
42/* Function to be called when the inferior starts up, to discover the names
43 of shared libraries that are dynamically linked, the base addresses to
44 which they are linked, and sufficient information to read in their symbols
45 at a later time. */
46
47#define SOLIB_CREATE_INFERIOR_HOOK(PID) solib_create_inferior_hook()
48
49/* Function to be called to remove the connection between debugger and
50 dynamic linker that was established by SOLIB_CREATE_INFERIOR_HOOK.
51 (This operation does not remove shared library information from
52 the debugger, as CLEAR_SOLIB does.)
53
54 This functionality is presently not implemented for this target.
c5aa993b 55 */
c906108c
SS
56#define SOLIB_REMOVE_INFERIOR_HOOK(PID) (0)
57
a14ed312 58extern void solib_create_inferior_hook (void); /* solib.c */
c906108c 59
c906108c
SS
60/* This function returns TRUE if pc is the address of an instruction that
61 lies within the dynamic linker (such as the event hook, or the dld
62 itself).
63
64 This function must be used only when a dynamic linker event has been
65 caught, and the inferior is being stepped out of the hook, or undefined
66 results are guaranteed.
67
68 Presently, this functionality is not implemented.
c5aa993b 69 */
c906108c
SS
70
71/*
c5aa993b 72 #define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \
c906108c 73 error("catch of library loads/unloads not yet implemented on this platform")
c5aa993b 74 */
c906108c
SS
75
76#define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \
77(0)
78
79/* This function must be called when the inferior is killed, and the program
80 restarted. This is not the same as CLEAR_SOLIB, in that it doesn't discard
81 any symbol tables.
82
83 Presently, this functionality is not implemented.
c5aa993b 84 */
c906108c
SS
85#define SOLIB_RESTART() \
86 (0)
87
88/* If we can't set a breakpoint, and it's in a shared library, just
89 disable it. */
90
91#define DISABLE_UNSETTABLE_BREAK(addr) (solib_address(addr) != NULL)
92
a14ed312 93extern char *solib_address (CORE_ADDR); /* solib.c */
c906108c
SS
94
95/* If ADDR lies in a shared library, return its name. */
96
97#define PC_SOLIB(addr) solib_address (addr)
98
c906108c 99/* Return 1 if PC lies in the dynamic symbol resolution code of the
d7fa2ae2 100 run time loader. */
c906108c 101
d7fa2ae2 102#define IN_SOLIB_DYNSYM_RESOLVE_CODE(pc) in_solib_dynsym_resolve_code (pc)
c906108c 103
d7fa2ae2 104extern int in_solib_dynsym_resolve_code (CORE_ADDR); /* solib.c */
1dd1751e 105
cb0ba49e
MS
106/* Discard symbols that were auto-loaded from shared libraries. */
107
183a2f1a 108extern void no_shared_libraries (char *ignored, int from_tty);
010f3b2f
JT
109
110#endif /* SOLIB_H */
This page took 0.392542 seconds and 4 git commands to generate.