72 result = dlopen (filename, RTLD_NOW);
74 result = (
void *) LoadLibrary (filename);
80 error (
_(
"Could not load %s: %s"), filename, dlerror());
88 FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
89 FORMAT_MESSAGE_IGNORE_INSERTS,
90 NULL, dw, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
94 error (
_(
"Could not load %s: %s"), filename, (
char *) buffer);
103 return dlsym (handle, symbol);
105 return (
void *) GetProcAddress (handle, symbol);
113 return dlclose (handle);
115 return !((
int) FreeLibrary (handle));
int gdb_dlclose(void *handle)
void * gdb_dlopen(const char *filename)
int is_dl_available(void)
void * gdb_dlsym(void *handle, const char *symbol)
struct cleanup * make_cleanup_dlclose(void *handle)
#define gdb_assert_not_reached(message)
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
const char const char int
static void do_dlclose_cleanup(void *handle)
void error(const char *fmt,...)