Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/smanonr..../lib/jvm/java/include
File: jdwpTransport.h
/*
[0] Fix | Delete
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
[1] Fix | Delete
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
[2] Fix | Delete
*
[3] Fix | Delete
* This code is free software; you can redistribute it and/or modify it
[4] Fix | Delete
* under the terms of the GNU General Public License version 2 only, as
[5] Fix | Delete
* published by the Free Software Foundation. Oracle designates this
[6] Fix | Delete
* particular file as subject to the "Classpath" exception as provided
[7] Fix | Delete
* by Oracle in the LICENSE file that accompanied this code.
[8] Fix | Delete
*
[9] Fix | Delete
* This code is distributed in the hope that it will be useful, but WITHOUT
[10] Fix | Delete
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
[11] Fix | Delete
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
[12] Fix | Delete
* version 2 for more details (a copy is included in the LICENSE file that
[13] Fix | Delete
* accompanied this code).
[14] Fix | Delete
*
[15] Fix | Delete
* You should have received a copy of the GNU General Public License version
[16] Fix | Delete
* 2 along with this work; if not, write to the Free Software Foundation,
[17] Fix | Delete
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
[18] Fix | Delete
*
[19] Fix | Delete
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
[20] Fix | Delete
* or visit www.oracle.com if you need additional information or have any
[21] Fix | Delete
* questions.
[22] Fix | Delete
*/
[23] Fix | Delete
[24] Fix | Delete
/*
[25] Fix | Delete
* Java Debug Wire Protocol Transport Service Provider Interface.
[26] Fix | Delete
*/
[27] Fix | Delete
[28] Fix | Delete
#ifndef JDWPTRANSPORT_H
[29] Fix | Delete
#define JDWPTRANSPORT_H
[30] Fix | Delete
[31] Fix | Delete
#include "jni.h"
[32] Fix | Delete
[33] Fix | Delete
enum {
[34] Fix | Delete
JDWPTRANSPORT_VERSION_1_0 = 0x00010000
[35] Fix | Delete
};
[36] Fix | Delete
[37] Fix | Delete
#ifdef __cplusplus
[38] Fix | Delete
extern "C" {
[39] Fix | Delete
#endif
[40] Fix | Delete
[41] Fix | Delete
struct jdwpTransportNativeInterface_;
[42] Fix | Delete
[43] Fix | Delete
struct _jdwpTransportEnv;
[44] Fix | Delete
[45] Fix | Delete
#ifdef __cplusplus
[46] Fix | Delete
typedef _jdwpTransportEnv jdwpTransportEnv;
[47] Fix | Delete
#else
[48] Fix | Delete
typedef const struct jdwpTransportNativeInterface_ *jdwpTransportEnv;
[49] Fix | Delete
#endif /* __cplusplus */
[50] Fix | Delete
[51] Fix | Delete
/*
[52] Fix | Delete
* Errors. Universal errors with JVMTI/JVMDI equivalents keep the
[53] Fix | Delete
* values the same.
[54] Fix | Delete
*/
[55] Fix | Delete
typedef enum {
[56] Fix | Delete
JDWPTRANSPORT_ERROR_NONE = 0,
[57] Fix | Delete
JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT = 103,
[58] Fix | Delete
JDWPTRANSPORT_ERROR_OUT_OF_MEMORY = 110,
[59] Fix | Delete
JDWPTRANSPORT_ERROR_INTERNAL = 113,
[60] Fix | Delete
JDWPTRANSPORT_ERROR_ILLEGAL_STATE = 201,
[61] Fix | Delete
JDWPTRANSPORT_ERROR_IO_ERROR = 202,
[62] Fix | Delete
JDWPTRANSPORT_ERROR_TIMEOUT = 203,
[63] Fix | Delete
JDWPTRANSPORT_ERROR_MSG_NOT_AVAILABLE = 204
[64] Fix | Delete
} jdwpTransportError;
[65] Fix | Delete
[66] Fix | Delete
[67] Fix | Delete
/*
[68] Fix | Delete
* Structure to define capabilities
[69] Fix | Delete
*/
[70] Fix | Delete
typedef struct {
[71] Fix | Delete
unsigned int can_timeout_attach :1;
[72] Fix | Delete
unsigned int can_timeout_accept :1;
[73] Fix | Delete
unsigned int can_timeout_handshake :1;
[74] Fix | Delete
unsigned int reserved3 :1;
[75] Fix | Delete
unsigned int reserved4 :1;
[76] Fix | Delete
unsigned int reserved5 :1;
[77] Fix | Delete
unsigned int reserved6 :1;
[78] Fix | Delete
unsigned int reserved7 :1;
[79] Fix | Delete
unsigned int reserved8 :1;
[80] Fix | Delete
unsigned int reserved9 :1;
[81] Fix | Delete
unsigned int reserved10 :1;
[82] Fix | Delete
unsigned int reserved11 :1;
[83] Fix | Delete
unsigned int reserved12 :1;
[84] Fix | Delete
unsigned int reserved13 :1;
[85] Fix | Delete
unsigned int reserved14 :1;
[86] Fix | Delete
unsigned int reserved15 :1;
[87] Fix | Delete
} JDWPTransportCapabilities;
[88] Fix | Delete
[89] Fix | Delete
[90] Fix | Delete
/*
[91] Fix | Delete
* Structures to define packet layout.
[92] Fix | Delete
*
[93] Fix | Delete
* See: http://java.sun.com/j2se/1.5/docs/guide/jpda/jdwp-spec.html
[94] Fix | Delete
*/
[95] Fix | Delete
[96] Fix | Delete
enum {
[97] Fix | Delete
/*
[98] Fix | Delete
* If additional flags are added that apply to jdwpCmdPacket,
[99] Fix | Delete
* then debugLoop.c: reader() will need to be updated to
[100] Fix | Delete
* accept more than JDWPTRANSPORT_FLAGS_NONE.
[101] Fix | Delete
*/
[102] Fix | Delete
JDWPTRANSPORT_FLAGS_NONE = 0x0,
[103] Fix | Delete
JDWPTRANSPORT_FLAGS_REPLY = 0x80
[104] Fix | Delete
};
[105] Fix | Delete
[106] Fix | Delete
typedef struct {
[107] Fix | Delete
jint len;
[108] Fix | Delete
jint id;
[109] Fix | Delete
jbyte flags;
[110] Fix | Delete
jbyte cmdSet;
[111] Fix | Delete
jbyte cmd;
[112] Fix | Delete
jbyte *data;
[113] Fix | Delete
} jdwpCmdPacket;
[114] Fix | Delete
[115] Fix | Delete
typedef struct {
[116] Fix | Delete
jint len;
[117] Fix | Delete
jint id;
[118] Fix | Delete
jbyte flags;
[119] Fix | Delete
jshort errorCode;
[120] Fix | Delete
jbyte *data;
[121] Fix | Delete
} jdwpReplyPacket;
[122] Fix | Delete
[123] Fix | Delete
typedef struct {
[124] Fix | Delete
union {
[125] Fix | Delete
jdwpCmdPacket cmd;
[126] Fix | Delete
jdwpReplyPacket reply;
[127] Fix | Delete
} type;
[128] Fix | Delete
} jdwpPacket;
[129] Fix | Delete
[130] Fix | Delete
/*
[131] Fix | Delete
* JDWP functions called by the transport.
[132] Fix | Delete
*/
[133] Fix | Delete
typedef struct jdwpTransportCallback {
[134] Fix | Delete
void *(*alloc)(jint numBytes); /* Call this for all allocations */
[135] Fix | Delete
void (*free)(void *buffer); /* Call this for all deallocations */
[136] Fix | Delete
} jdwpTransportCallback;
[137] Fix | Delete
[138] Fix | Delete
typedef jint (JNICALL *jdwpTransport_OnLoad_t)(JavaVM *jvm,
[139] Fix | Delete
jdwpTransportCallback *callback,
[140] Fix | Delete
jint version,
[141] Fix | Delete
jdwpTransportEnv** env);
[142] Fix | Delete
[143] Fix | Delete
[144] Fix | Delete
[145] Fix | Delete
/* Function Interface */
[146] Fix | Delete
[147] Fix | Delete
struct jdwpTransportNativeInterface_ {
[148] Fix | Delete
/* 1 : RESERVED */
[149] Fix | Delete
void *reserved1;
[150] Fix | Delete
[151] Fix | Delete
/* 2 : Get Capabilities */
[152] Fix | Delete
jdwpTransportError (JNICALL *GetCapabilities)(jdwpTransportEnv* env,
[153] Fix | Delete
JDWPTransportCapabilities *capabilities_ptr);
[154] Fix | Delete
[155] Fix | Delete
/* 3 : Attach */
[156] Fix | Delete
jdwpTransportError (JNICALL *Attach)(jdwpTransportEnv* env,
[157] Fix | Delete
const char* address,
[158] Fix | Delete
jlong attach_timeout,
[159] Fix | Delete
jlong handshake_timeout);
[160] Fix | Delete
[161] Fix | Delete
/* 4: StartListening */
[162] Fix | Delete
jdwpTransportError (JNICALL *StartListening)(jdwpTransportEnv* env,
[163] Fix | Delete
const char* address,
[164] Fix | Delete
char** actual_address);
[165] Fix | Delete
[166] Fix | Delete
/* 5: StopListening */
[167] Fix | Delete
jdwpTransportError (JNICALL *StopListening)(jdwpTransportEnv* env);
[168] Fix | Delete
[169] Fix | Delete
/* 6: Accept */
[170] Fix | Delete
jdwpTransportError (JNICALL *Accept)(jdwpTransportEnv* env,
[171] Fix | Delete
jlong accept_timeout,
[172] Fix | Delete
jlong handshake_timeout);
[173] Fix | Delete
[174] Fix | Delete
/* 7: IsOpen */
[175] Fix | Delete
jboolean (JNICALL *IsOpen)(jdwpTransportEnv* env);
[176] Fix | Delete
[177] Fix | Delete
/* 8: Close */
[178] Fix | Delete
jdwpTransportError (JNICALL *Close)(jdwpTransportEnv* env);
[179] Fix | Delete
[180] Fix | Delete
/* 9: ReadPacket */
[181] Fix | Delete
jdwpTransportError (JNICALL *ReadPacket)(jdwpTransportEnv* env,
[182] Fix | Delete
jdwpPacket *pkt);
[183] Fix | Delete
[184] Fix | Delete
/* 10: Write Packet */
[185] Fix | Delete
jdwpTransportError (JNICALL *WritePacket)(jdwpTransportEnv* env,
[186] Fix | Delete
const jdwpPacket* pkt);
[187] Fix | Delete
[188] Fix | Delete
/* 11: GetLastError */
[189] Fix | Delete
jdwpTransportError (JNICALL *GetLastError)(jdwpTransportEnv* env,
[190] Fix | Delete
char** error);
[191] Fix | Delete
[192] Fix | Delete
};
[193] Fix | Delete
[194] Fix | Delete
[195] Fix | Delete
/*
[196] Fix | Delete
* Use inlined functions so that C++ code can use syntax such as
[197] Fix | Delete
* env->Attach("mymachine:5000", 10*1000, 0);
[198] Fix | Delete
*
[199] Fix | Delete
* rather than using C's :-
[200] Fix | Delete
*
[201] Fix | Delete
* (*env)->Attach(env, "mymachine:5000", 10*1000, 0);
[202] Fix | Delete
*/
[203] Fix | Delete
struct _jdwpTransportEnv {
[204] Fix | Delete
const struct jdwpTransportNativeInterface_ *functions;
[205] Fix | Delete
#ifdef __cplusplus
[206] Fix | Delete
[207] Fix | Delete
jdwpTransportError GetCapabilities(JDWPTransportCapabilities *capabilities_ptr) {
[208] Fix | Delete
return functions->GetCapabilities(this, capabilities_ptr);
[209] Fix | Delete
}
[210] Fix | Delete
[211] Fix | Delete
jdwpTransportError Attach(const char* address, jlong attach_timeout,
[212] Fix | Delete
jlong handshake_timeout) {
[213] Fix | Delete
return functions->Attach(this, address, attach_timeout, handshake_timeout);
[214] Fix | Delete
}
[215] Fix | Delete
[216] Fix | Delete
jdwpTransportError StartListening(const char* address,
[217] Fix | Delete
char** actual_address) {
[218] Fix | Delete
return functions->StartListening(this, address, actual_address);
[219] Fix | Delete
}
[220] Fix | Delete
[221] Fix | Delete
jdwpTransportError StopListening(void) {
[222] Fix | Delete
return functions->StopListening(this);
[223] Fix | Delete
}
[224] Fix | Delete
[225] Fix | Delete
jdwpTransportError Accept(jlong accept_timeout, jlong handshake_timeout) {
[226] Fix | Delete
return functions->Accept(this, accept_timeout, handshake_timeout);
[227] Fix | Delete
}
[228] Fix | Delete
[229] Fix | Delete
jboolean IsOpen(void) {
[230] Fix | Delete
return functions->IsOpen(this);
[231] Fix | Delete
}
[232] Fix | Delete
[233] Fix | Delete
jdwpTransportError Close(void) {
[234] Fix | Delete
return functions->Close(this);
[235] Fix | Delete
}
[236] Fix | Delete
[237] Fix | Delete
jdwpTransportError ReadPacket(jdwpPacket *pkt) {
[238] Fix | Delete
return functions->ReadPacket(this, pkt);
[239] Fix | Delete
}
[240] Fix | Delete
[241] Fix | Delete
jdwpTransportError WritePacket(const jdwpPacket* pkt) {
[242] Fix | Delete
return functions->WritePacket(this, pkt);
[243] Fix | Delete
}
[244] Fix | Delete
[245] Fix | Delete
jdwpTransportError GetLastError(char** error) {
[246] Fix | Delete
return functions->GetLastError(this, error);
[247] Fix | Delete
}
[248] Fix | Delete
[249] Fix | Delete
[250] Fix | Delete
#endif /* __cplusplus */
[251] Fix | Delete
};
[252] Fix | Delete
[253] Fix | Delete
#ifdef __cplusplus
[254] Fix | Delete
} /* extern "C" */
[255] Fix | Delete
#endif /* __cplusplus */
[256] Fix | Delete
[257] Fix | Delete
#endif /* JDWPTRANSPORT_H */
[258] Fix | Delete
[259] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function