2013-06-04 Gary Benson <gbenson@redhat.com>
[deliverable/binutils-gdb.git] / gdb / solib.h
CommitLineData
c906108c 1/* Shared library declarations for GDB, the GNU Debugger.
42a6e6a0 2
28e7fd62 3 Copyright (C) 1992-2013 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
a9762ec7 9 the Free Software Foundation; either version 3 of the License, or
c5aa993b 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 17 You should have received a copy of the GNU General Public License
a9762ec7 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
c906108c 19
010f3b2f
JT
20#ifndef SOLIB_H
21#define SOLIB_H
22
104c1213 23/* Forward decl's for prototypes */
42a6e6a0 24struct so_list;
c906108c 25struct target_ops;
7d522c90 26struct target_so_ops;
6c95b8df 27struct program_space;
c906108c
SS
28
29/* Called when we free all symtabs, to free the shared library information
c378eb4e 30 as well. */
c906108c 31
a14ed312 32extern void clear_solib (void);
c906108c 33
c378eb4e 34/* Called to add symbols from a shared library to gdb's symbol table. */
c906108c 35
990f9fe3 36extern void solib_add (char *, int, struct target_ops *, int);
42a6e6a0 37extern int solib_read_symbols (struct so_list *, int);
c906108c 38
7095b863
MS
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. */
c906108c 43
268a4a75 44extern void solib_create_inferior_hook (int from_tty);
c906108c
SS
45
46/* If ADDR lies in a shared library, return its name. */
47
6c95b8df 48extern char *solib_name_from_address (struct program_space *, CORE_ADDR);
c906108c 49
5fd1a349
PP
50/* Return 1 if ADDR lies within SOLIB. */
51
52extern int solib_contains_address_p (const struct so_list *, CORE_ADDR);
53
de18c1d8
JM
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
c906108c 62/* Return 1 if PC lies in the dynamic symbol resolution code of the
d7fa2ae2 63 run time loader. */
c906108c 64
a77053c2 65extern int in_solib_dynsym_resolve_code (CORE_ADDR);
1dd1751e 66
c378eb4e 67/* Discard symbols that were auto-loaded from shared libraries. */
cb0ba49e 68
183a2f1a 69extern void no_shared_libraries (char *ignored, int from_tty);
010f3b2f 70
7d522c90
DJ
71/* Set the solib operations for GDBARCH to NEW_OPS. */
72
73extern void set_solib_ops (struct gdbarch *gdbarch,
3641da11 74 const struct target_so_ops *new_ops);
7d522c90 75
17a37d48
PP
76/* Return non-zero if NAME is the libpthread shared library. */
77
78extern int libpthread_name_p (const char *name);
79
cb457ae2
YQ
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
e009ee71
TT
88extern CORE_ADDR gdb_bfd_lookup_symbol_from_symtab (bfd *abfd,
89 int (*match_sym) (asymbol *,
90 void *),
91 void *data);
cb457ae2 92
010f3b2f 93#endif /* SOLIB_H */
This page took 1.298238 seconds and 4 git commands to generate.