< prev index next >

src/jdk.jdwp.agent/share/native/libjdwp/transport.c

Print this page




  78         ERROR_MESSAGE(("transport error %d: %s",err, utf8msg));
  79     } else if ( msg!=NULL ) {
  80         ERROR_MESSAGE(("transport error %d: %s",err, utf8msg));
  81     } else {
  82         ERROR_MESSAGE(("transport error %d: %s",err, "UNKNOWN"));
  83     }
  84     jvmtiDeallocate(msg);
  85     jvmtiDeallocate(utf8msg);
  86 }
  87 
  88 /* Find OnLoad symbol */
  89 static jdwpTransport_OnLoad_t
  90 findTransportOnLoad(void *handle)
  91 {
  92     jdwpTransport_OnLoad_t onLoad;
  93 
  94     onLoad = (jdwpTransport_OnLoad_t)NULL;
  95     if (handle == NULL) {
  96         return onLoad;
  97     }







  98     onLoad = (jdwpTransport_OnLoad_t)
  99                  dbgsysFindLibraryEntry(handle, "jdwpTransport_OnLoad");
 100     return onLoad;
 101 }
 102 
 103 /* Load transport library (directory=="" means do system search) */
 104 static void *
 105 loadTransportLibrary(const char *libdir, const char *name)
 106 {
 107     char buf[MAXPATHLEN*2+100];
 108 #ifndef STATIC_BUILD
 109     void *handle;
 110     char libname[MAXPATHLEN+2];
 111     const char *plibdir;
 112 
 113     /* Convert libdir from UTF-8 to platform encoding */
 114     plibdir = NULL;
 115     if ( libdir != NULL ) {
 116         int  len;
 117 




  78         ERROR_MESSAGE(("transport error %d: %s",err, utf8msg));
  79     } else if ( msg!=NULL ) {
  80         ERROR_MESSAGE(("transport error %d: %s",err, utf8msg));
  81     } else {
  82         ERROR_MESSAGE(("transport error %d: %s",err, "UNKNOWN"));
  83     }
  84     jvmtiDeallocate(msg);
  85     jvmtiDeallocate(utf8msg);
  86 }
  87 
  88 /* Find OnLoad symbol */
  89 static jdwpTransport_OnLoad_t
  90 findTransportOnLoad(void *handle)
  91 {
  92     jdwpTransport_OnLoad_t onLoad;
  93 
  94     onLoad = (jdwpTransport_OnLoad_t)NULL;
  95     if (handle == NULL) {
  96         return onLoad;
  97     }
  98 #if defined(_WIN32) && !defined(_WIN64)
  99     onLoad = (jdwpTransport_OnLoad_t)
 100                  dbgsysFindLibraryEntry(handle, "_jdwpTransport_OnLoad@16");
 101     if (onLoad != NULL) {
 102         return onLoad;
 103     }
 104 #endif
 105     onLoad = (jdwpTransport_OnLoad_t)
 106                  dbgsysFindLibraryEntry(handle, "jdwpTransport_OnLoad");
 107     return onLoad;
 108 }
 109 
 110 /* Load transport library (directory=="" means do system search) */
 111 static void *
 112 loadTransportLibrary(const char *libdir, const char *name)
 113 {
 114     char buf[MAXPATHLEN*2+100];
 115 #ifndef STATIC_BUILD
 116     void *handle;
 117     char libname[MAXPATHLEN+2];
 118     const char *plibdir;
 119 
 120     /* Convert libdir from UTF-8 to platform encoding */
 121     plibdir = NULL;
 122     if ( libdir != NULL ) {
 123         int  len;
 124 


< prev index next >