GDB (API)
/home/stan/gdb/src/gdb/solib.h
Go to the documentation of this file.
00001 /* Shared library declarations for GDB, the GNU Debugger.
00002    
00003    Copyright (C) 1992-2013 Free Software Foundation, Inc.
00004 
00005    This file is part of GDB.
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 3 of the License, or
00010    (at your option) any later version.
00011 
00012    This program is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00019 
00020 #ifndef SOLIB_H
00021 #define SOLIB_H
00022 
00023 /* Forward decl's for prototypes */
00024 struct so_list;
00025 struct target_ops;
00026 struct target_so_ops;
00027 struct program_space;
00028 
00029 /* Called when we free all symtabs, to free the shared library information
00030    as well.  */
00031 
00032 extern void clear_solib (void);
00033 
00034 /* Called to add symbols from a shared library to gdb's symbol table.  */
00035 
00036 extern void solib_add (char *, int, struct target_ops *, int);
00037 extern int solib_read_symbols (struct so_list *, int);
00038 
00039 /* Function to be called when the inferior starts up, to discover the
00040    names of shared libraries that are dynamically linked, the base
00041    addresses to which they are linked, and sufficient information to
00042    read in their symbols at a later time.  */
00043 
00044 extern void solib_create_inferior_hook (int from_tty);
00045 
00046 /* If ADDR lies in a shared library, return its name.  */
00047 
00048 extern char *solib_name_from_address (struct program_space *, CORE_ADDR);
00049 
00050 /* Return 1 if ADDR lies within SOLIB.  */
00051 
00052 extern int solib_contains_address_p (const struct so_list *, CORE_ADDR);
00053 
00054 /* Return whether the data starting at VADDR, size SIZE, must be kept
00055    in a core file for shared libraries loaded before "gcore" is used
00056    to be handled correctly when the core file is loaded.  This only
00057    applies when the section would otherwise not be kept in the core
00058    file (in particular, for readonly sections).  */
00059 
00060 extern int solib_keep_data_in_core (CORE_ADDR vaddr, unsigned long size);
00061 
00062 /* Return 1 if PC lies in the dynamic symbol resolution code of the
00063    run time loader.  */
00064 
00065 extern int in_solib_dynsym_resolve_code (CORE_ADDR);
00066 
00067 /* Discard symbols that were auto-loaded from shared libraries.  */
00068 
00069 extern void no_shared_libraries (char *ignored, int from_tty);
00070 
00071 /* Set the solib operations for GDBARCH to NEW_OPS.  */
00072 
00073 extern void set_solib_ops (struct gdbarch *gdbarch,
00074                            const struct target_so_ops *new_ops);
00075 
00076 /* Return non-zero if NAME is the libpthread shared library.  */
00077 
00078 extern int libpthread_name_p (const char *name);
00079 
00080 /* Look up symbol from both symbol table and dynamic string table.  */
00081 
00082 extern CORE_ADDR gdb_bfd_lookup_symbol (bfd *abfd,
00083                                         int (*match_sym) (asymbol *, void *),
00084                                         void *data);
00085 
00086 /* Look up symbol from symbol table.  */
00087 
00088 extern CORE_ADDR gdb_bfd_lookup_symbol_from_symtab (bfd *abfd,
00089                                                     int (*match_sym) (asymbol *,
00090                                                                       void *),
00091                                                     void *data);
00092 
00093 /* Enable or disable optional solib event breakpoints as appropriate.  */
00094 
00095 extern void update_solib_breakpoints (void);
00096 
00097 /* Handle an solib event by calling solib_add.  */
00098 
00099 extern void handle_solib_event (void);
00100 
00101 #endif /* SOLIB_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines