#include <vpr/vprConfig.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/types.h>#include <sys/stat.h>#include <stdarg.h>#include <limits.h>#include <mach-o/dyld.h>#include <boost/concept_check.hpp>#include <vpr/Util/Assert.h>#include <vpr/Util/Debug.h>#include <vpr/md/DARWIN/DynLoad/LibraryDYLD.h>Include dependency graph for LibraryDYLD.cpp:

Go to the source code of this file.
Namespaces | |
| namespace | vpr |
Classes | |
| struct | dl_info |
Defines | |
| #define | RTLD_LAZY 0x1 |
| #define | RTLD_NOW 0x2 |
| #define | RTLD_LOCAL 0x4 |
| #define | RTLD_GLOBAL 0x8 |
| #define | RTLD_NOLOAD 0x10 |
| #define | RTLD_NODELETE 0x80 |
| #define | RTLD_NEXT ((void *) -1) |
| #define | RTLD_DEFAULT ((void *) -2) |
Typedefs | |
| typedef dl_info | Dl_info |
Functions | |
| static const unsigned int | ERR_STR_LEN (256) |
| static const char * | error (int setget, const char *str,...) |
| #define RTLD_LAZY 0x1 |
| #define RTLD_NOW 0x2 |
Definition at line 96 of file LibraryDYLD.cpp.
Referenced by vpr::LibraryUNIX::load(), and vpr::LibraryDYLD::load().
| #define RTLD_LOCAL 0x4 |
Definition at line 97 of file LibraryDYLD.cpp.
| #define RTLD_GLOBAL 0x8 |
Definition at line 98 of file LibraryDYLD.cpp.
Referenced by vpr::LibraryDYLD::internalDlopen(), vpr::LibraryUNIX::load(), and vpr::LibraryDYLD::load().
| #define RTLD_NOLOAD 0x10 |
Definition at line 101 of file LibraryDYLD.cpp.
| #define RTLD_NODELETE 0x80 |
Definition at line 102 of file LibraryDYLD.cpp.
| #define RTLD_NEXT ((void *) -1) |
Definition at line 107 of file LibraryDYLD.cpp.
| #define RTLD_DEFAULT ((void *) -2) |
Definition at line 108 of file LibraryDYLD.cpp.
| static const unsigned int @60::ERR_STR_LEN | ( | 256 | ) | [static] |
Referenced by error().
| static const char* @60::error | ( | int | setget, | |
| const char * | str, | |||
| ... | ||||
| ) | [static] |
Definition at line 117 of file LibraryDYLD.cpp.
References ERR_STR_LEN().
Referenced by vpr::LibraryDYLD::internalDlclose(), vpr::LibraryDYLD::internalDlerror(), and vpr::LibraryDYLD::internalDlopen().
00118 { 00119 static char errstr[ERR_STR_LEN]; 00120 static int err_filled = 0; 00121 const char *retval; 00122 NSLinkEditErrors ler; 00123 int lerno; 00124 const char *dylderrstr; 00125 const char *file; 00126 va_list arg; 00127 if (setget <= 0) 00128 { 00129 va_start(arg, str); 00130 strncpy(errstr, "dlsimple: ", ERR_STR_LEN); 00131 vsnprintf(errstr + 10, ERR_STR_LEN - 10, str, arg); 00132 va_end(arg); 00133 /* We prefer to use the dyld error string if setget is 0 */ 00134 if (setget == 0) { 00135 NSLinkEditError(&ler, &lerno, &file, &dylderrstr); 00136 fprintf(stderr,"dyld: %s\n",dylderrstr); 00137 if (dylderrstr && strlen(dylderrstr)) 00138 strncpy(errstr,dylderrstr,ERR_STR_LEN); 00139 } 00140 err_filled = 1; 00141 retval = NULL; 00142 } 00143 else 00144 { 00145 if (!err_filled) 00146 retval = NULL; 00147 else 00148 retval = errstr; 00149 err_filled = 0; 00150 } 00151 return retval; 00152 }
1.5.1