gas: slightly relax .startof.()/.sizeof.() testcase
[deliverable/binutils-gdb.git] / gdb / solib.h
CommitLineData
c906108c 1/* Shared library declarations for GDB, the GNU Debugger.
42a6e6a0 2
61baf725 3 Copyright (C) 1992-2017 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 28
b15cc25c
PA
29#include "symfile-add-flags.h"
30
c906108c 31/* Called when we free all symtabs, to free the shared library information
c378eb4e 32 as well. */
c906108c 33
a14ed312 34extern void clear_solib (void);
c906108c 35
c378eb4e 36/* Called to add symbols from a shared library to gdb's symbol table. */
c906108c 37
414842dc 38extern void solib_add (const char *, int, struct target_ops *, int);
b15cc25c 39extern int solib_read_symbols (struct so_list *, symfile_add_flags);
c906108c 40
7095b863
MS
41/* Function to be called when the inferior starts up, to discover the
42 names of shared libraries that are dynamically linked, the base
43 addresses to which they are linked, and sufficient information to
44 read in their symbols at a later time. */
c906108c 45
268a4a75 46extern void solib_create_inferior_hook (int from_tty);
c906108c
SS
47
48/* If ADDR lies in a shared library, return its name. */
49
6c95b8df 50extern char *solib_name_from_address (struct program_space *, CORE_ADDR);
c906108c 51
5fd1a349
PP
52/* Return 1 if ADDR lies within SOLIB. */
53
54extern int solib_contains_address_p (const struct so_list *, CORE_ADDR);
55
de18c1d8
JM
56/* Return whether the data starting at VADDR, size SIZE, must be kept
57 in a core file for shared libraries loaded before "gcore" is used
58 to be handled correctly when the core file is loaded. This only
59 applies when the section would otherwise not be kept in the core
60 file (in particular, for readonly sections). */
61
62extern int solib_keep_data_in_core (CORE_ADDR vaddr, unsigned long size);
63
c906108c 64/* Return 1 if PC lies in the dynamic symbol resolution code of the
d7fa2ae2 65 run time loader. */
c906108c 66
a77053c2 67extern int in_solib_dynsym_resolve_code (CORE_ADDR);
1dd1751e 68
c378eb4e 69/* Discard symbols that were auto-loaded from shared libraries. */
cb0ba49e 70
183a2f1a 71extern void no_shared_libraries (char *ignored, int from_tty);
010f3b2f 72
7d522c90
DJ
73/* Set the solib operations for GDBARCH to NEW_OPS. */
74
75extern void set_solib_ops (struct gdbarch *gdbarch,
3641da11 76 const struct target_so_ops *new_ops);
7d522c90 77
17a37d48
PP
78/* Return non-zero if NAME is the libpthread shared library. */
79
80extern int libpthread_name_p (const char *name);
81
cb457ae2
YQ
82/* Look up symbol from both symbol table and dynamic string table. */
83
84extern CORE_ADDR gdb_bfd_lookup_symbol (bfd *abfd,
3953f15c
SM
85 int (*match_sym) (const asymbol *,
86 const void *),
87 const void *data);
cb457ae2
YQ
88
89/* Look up symbol from symbol table. */
90
e009ee71 91extern CORE_ADDR gdb_bfd_lookup_symbol_from_symtab (bfd *abfd,
3953f15c
SM
92 int (*match_sym)
93 (const asymbol *,
94 const void *),
95 const void *data);
cb457ae2 96
f9e14852
GB
97/* Enable or disable optional solib event breakpoints as appropriate. */
98
99extern void update_solib_breakpoints (void);
100
101/* Handle an solib event by calling solib_add. */
102
103extern void handle_solib_event (void);
104
010f3b2f 105#endif /* SOLIB_H */
This page took 1.64017 seconds and 4 git commands to generate.