GDB (API)
/home/stan/gdb/src/gdb/gdb-dlfcn.h
Go to the documentation of this file.
00001 /* Platform independent shared object routines for GDB.
00002 
00003    Copyright (C) 2011-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 GDB_DLFCN_H
00021 #define GDB_DLFCN_H
00022 
00023 #include "defs.h"
00024 
00025 /* Load the dynamic library file named FILENAME, and return a handle
00026    for that dynamic library.  Return NULL if the loading fails for any
00027    reason.  */
00028 
00029 void *gdb_dlopen (const char *filename);
00030 
00031 /* Return the address of the symbol named SYMBOL inside the shared
00032    library whose handle is HANDLE.  Return NULL when the symbol could
00033    not be found.  */
00034 
00035 void *gdb_dlsym (void *handle, const char *symbol);
00036 
00037 /* Install a cleanup routine which closes the handle HANDLE.  */
00038 
00039 struct cleanup *make_cleanup_dlclose (void *handle);
00040 
00041 /* Cleanup the shared object pointed to by HANDLE. Return 0 on success
00042    and nonzero on failure.  */
00043 
00044 int gdb_dlclose (void *handle);
00045 
00046 /* Return non-zero if the dynamic library functions are available on
00047    this platform.  */
00048 
00049 int is_dl_available(void);
00050 
00051 #endif /* GDB_DLFCN_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines