GDB (xrefs)
/tmp/gdb-7.10/gdb/solib.h
Go to the documentation of this file.
1 /* Shared library declarations for GDB, the GNU Debugger.
2 
3  Copyright (C) 1992-2015 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 */
24 struct so_list;
25 struct target_ops;
26 struct target_so_ops;
27 struct program_space;
28 
29 /* Called when we free all symtabs, to free the shared library information
30  as well. */
31 
32 extern void clear_solib (void);
33 
34 /* Called to add symbols from a shared library to gdb's symbol table. */
35 
36 extern void solib_add (const char *, int, struct target_ops *, int);
37 extern 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 
44 extern void solib_create_inferior_hook (int from_tty);
45 
46 /* If ADDR lies in a shared library, return its name. */
47 
48 extern char *solib_name_from_address (struct program_space *, CORE_ADDR);
49 
50 /* Return 1 if ADDR lies within SOLIB. */
51 
52 extern 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 
60 extern 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 
66 
67 /* Discard symbols that were auto-loaded from shared libraries. */
68 
69 extern void no_shared_libraries (char *ignored, int from_tty);
70 
71 /* Set the solib operations for GDBARCH to NEW_OPS. */
72 
73 extern 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 
78 extern int libpthread_name_p (const char *name);
79 
80 /* Look up symbol from both symbol table and dynamic string table. */
81 
82 extern 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 
89  int (*match_sym) (asymbol *,
90  void *),
91  void *data);
92 
93 /* Enable or disable optional solib event breakpoints as appropriate. */
94 
95 extern void update_solib_breakpoints (void);
96 
97 /* Handle an solib event by calling solib_add. */
98 
99 extern void handle_solib_event (void);
100 
101 #endif /* SOLIB_H */
CORE_ADDR gdb_bfd_lookup_symbol_from_symtab(bfd *abfd, int(*match_sym)(asymbol *, void *), void *data)
void update_solib_breakpoints(void)
Definition: solib.c:1316
bfd_vma CORE_ADDR
Definition: common-types.h:41
void solib_create_inferior_hook(int from_tty)
Definition: solib.c:1269
int solib_read_symbols(struct so_list *, int)
Definition: solib.c:669
Definition: solist.h:30
int in_solib_dynsym_resolve_code(CORE_ADDR)
Definition: solib.c:1280
int libpthread_name_p(const char *name)
Definition: solib.c:942
void set_solib_ops(struct gdbarch *gdbarch, const struct target_so_ops *new_ops)
Definition: solib.c:76
const char *const name
Definition: aarch64-tdep.c:68
char * solib_name_from_address(struct program_space *, CORE_ADDR)
Definition: solib.c:1191
void handle_solib_event(void)
Definition: solib.c:1327
CORE_ADDR gdb_bfd_lookup_symbol(bfd *abfd, int(*match_sym)(asymbol *, void *), void *data)
Definition: solib.c:1629
void clear_solib(void)
Definition: solib.c:1222
void solib_add(const char *, int, struct target_ops *, int)
Definition: solib.c:965
void no_shared_libraries(char *ignored, int from_tty)
Definition: solib.c:1302
int solib_keep_data_in_core(CORE_ADDR vaddr, unsigned long size)
Definition: solib.c:1209
int solib_contains_address_p(const struct so_list *, CORE_ADDR)
Definition: solib.c:1167
size_t size
Definition: go32-nat.c:242