2013-06-04 Gary Benson <gbenson@redhat.com>
[deliverable/binutils-gdb.git] / gdb / solib.h
... / ...
CommitLineData
1/* Shared library declarations for GDB, the GNU Debugger.
2
3 Copyright (C) 1992-2013 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
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 3 of the License, or
10 (at your option) any later version.
11
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.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20#ifndef SOLIB_H
21#define SOLIB_H
22
23/* Forward decl's for prototypes */
24struct so_list;
25struct target_ops;
26struct target_so_ops;
27struct program_space;
28
29/* Called when we free all symtabs, to free the shared library information
30 as well. */
31
32extern void clear_solib (void);
33
34/* Called to add symbols from a shared library to gdb's symbol table. */
35
36extern void solib_add (char *, int, struct target_ops *, int);
37extern int solib_read_symbols (struct so_list *, int);
38
39/* Function to be called when the inferior starts up, to discover the
40 names of shared libraries that are dynamically linked, the base
41 addresses to which they are linked, and sufficient information to
42 read in their symbols at a later time. */
43
44extern void solib_create_inferior_hook (int from_tty);
45
46/* If ADDR lies in a shared library, return its name. */
47
48extern char *solib_name_from_address (struct program_space *, CORE_ADDR);
49
50/* Return 1 if ADDR lies within SOLIB. */
51
52extern int solib_contains_address_p (const struct so_list *, CORE_ADDR);
53
54/* Return whether the data starting at VADDR, size SIZE, must be kept
55 in a core file for shared libraries loaded before "gcore" is used
56 to be handled correctly when the core file is loaded. This only
57 applies when the section would otherwise not be kept in the core
58 file (in particular, for readonly sections). */
59
60extern int solib_keep_data_in_core (CORE_ADDR vaddr, unsigned long size);
61
62/* Return 1 if PC lies in the dynamic symbol resolution code of the
63 run time loader. */
64
65extern int in_solib_dynsym_resolve_code (CORE_ADDR);
66
67/* Discard symbols that were auto-loaded from shared libraries. */
68
69extern void no_shared_libraries (char *ignored, int from_tty);
70
71/* Set the solib operations for GDBARCH to NEW_OPS. */
72
73extern void set_solib_ops (struct gdbarch *gdbarch,
74 const struct target_so_ops *new_ops);
75
76/* Return non-zero if NAME is the libpthread shared library. */
77
78extern int libpthread_name_p (const char *name);
79
80/* Look up symbol from both symbol table and dynamic string table. */
81
82extern CORE_ADDR gdb_bfd_lookup_symbol (bfd *abfd,
83 int (*match_sym) (asymbol *, void *),
84 void *data);
85
86/* Look up symbol from symbol table. */
87
88extern CORE_ADDR gdb_bfd_lookup_symbol_from_symtab (bfd *abfd,
89 int (*match_sym) (asymbol *,
90 void *),
91 void *data);
92
93#endif /* SOLIB_H */
This page took 0.025194 seconds and 4 git commands to generate.