public class sun.tools.attach.WindowsVirtualMachine extends sun.tools.attach.HotSpotVirtualMachine
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: sun.tools.attach.WindowsVirtualMachine
super_class: sun.tools.attach.HotSpotVirtualMachine
{
private static byte[] stub;
descriptor: [B
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private volatile long hProcess;
descriptor: J
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lsun/tools/attach/WindowsVirtualMachine;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic sun.tools.attach.WindowsVirtualMachine.$assertionsDisabled:Z
3: ldc "attach"
invokestatic java.lang.System.loadLibrary:(Ljava/lang/String;)V
4: invokestatic sun.tools.attach.WindowsVirtualMachine.init:()V
5: invokestatic sun.tools.attach.WindowsVirtualMachine.generateStub:()[B
putstatic sun.tools.attach.WindowsVirtualMachine.stub:[B
6: return
LocalVariableTable:
Start End Slot Name Signature
void <init>(com.sun.tools.attach.spi.AttachProvider, java.lang.String);
descriptor: (Lcom/sun/tools/attach/spi/AttachProvider;Ljava/lang/String;)V
flags: (0x0000)
Code:
stack=6, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
invokespecial sun.tools.attach.HotSpotVirtualMachine.<init>:(Lcom/sun/tools/attach/spi/AttachProvider;Ljava/lang/String;)V
1: aload 2
invokestatic java.lang.Integer.parseInt:(Ljava/lang/String;)I
istore 3
start local 3 2: goto 5
end local 3 StackMap locals: sun.tools.attach.WindowsVirtualMachine com.sun.tools.attach.spi.AttachProvider java.lang.String
StackMap stack: java.lang.NumberFormatException
3: pop
4: new com.sun.tools.attach.AttachNotSupportedException
dup
ldc "Invalid process identifier"
invokespecial com.sun.tools.attach.AttachNotSupportedException.<init>:(Ljava/lang/String;)V
athrow
start local 3 5: StackMap locals: int
StackMap stack:
aload 0
iload 3
invokestatic sun.tools.attach.WindowsVirtualMachine.openProcess:(I)J
putfield sun.tools.attach.WindowsVirtualMachine.hProcess:J
6: aload 0
getfield sun.tools.attach.WindowsVirtualMachine.hProcess:J
getstatic sun.tools.attach.WindowsVirtualMachine.stub:[B
aconst_null
aconst_null
iconst_0
anewarray java.lang.Object
invokestatic sun.tools.attach.WindowsVirtualMachine.enqueue:(J[BLjava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
7: goto 10
StackMap locals:
StackMap stack: java.io.IOException
8: astore 4
start local 4 9: new com.sun.tools.attach.AttachNotSupportedException
dup
aload 4
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
invokespecial com.sun.tools.attach.AttachNotSupportedException.<init>:(Ljava/lang/String;)V
athrow
end local 4 10: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lsun/tools/attach/WindowsVirtualMachine;
0 11 1 provider Lcom/sun/tools/attach/spi/AttachProvider;
0 11 2 id Ljava/lang/String;
2 3 3 pid I
5 11 3 pid I
9 10 4 x Ljava/io/IOException;
Exception table:
from to target type
1 2 3 Class java.lang.NumberFormatException
6 7 8 Class java.io.IOException
Exceptions:
throws com.sun.tools.attach.AttachNotSupportedException, java.io.IOException
MethodParameters:
Name Flags
provider
id
public void detach();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
dup
astore 1
monitorenter
1: aload 0
getfield sun.tools.attach.WindowsVirtualMachine.hProcess:J
ldc -1
lcmp
ifeq 4
2: aload 0
getfield sun.tools.attach.WindowsVirtualMachine.hProcess:J
invokestatic sun.tools.attach.WindowsVirtualMachine.closeProcess:(J)V
3: aload 0
ldc -1
putfield sun.tools.attach.WindowsVirtualMachine.hProcess:J
4: StackMap locals: sun.tools.attach.WindowsVirtualMachine
StackMap stack:
aload 1
monitorexit
5: goto 8
StackMap locals:
StackMap stack: java.lang.Throwable
6: aload 1
monitorexit
7: athrow
8: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lsun/tools/attach/WindowsVirtualMachine;
Exception table:
from to target type
1 5 6 any
6 7 6 any
Exceptions:
throws java.io.IOException
java.io.InputStream execute(java.lang.String, java.lang.Object[]);
descriptor: (Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/InputStream;
flags: (0x0080) ACC_VARARGS
Code:
stack=6, locals=9, args_size=3
start local 0 start local 1 start local 2 0: getstatic sun.tools.attach.WindowsVirtualMachine.$assertionsDisabled:Z
ifne 1
aload 2
arraylength
iconst_3
if_icmple 1
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
1: StackMap locals:
StackMap stack:
new java.util.Random
dup
invokespecial java.util.Random.<init>:()V
invokevirtual java.util.Random.nextInt:()I
istore 3
start local 3 2: new java.lang.StringBuilder
dup
ldc "\\\\.\\pipe\\javatool"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 3
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 4
start local 4 3: aload 4
invokestatic sun.tools.attach.WindowsVirtualMachine.createPipe:(Ljava/lang/String;)J
lstore 5
start local 5 4: aload 0
getfield sun.tools.attach.WindowsVirtualMachine.hProcess:J
ldc -1
lcmp
ifne 7
5: lload 5
invokestatic sun.tools.attach.WindowsVirtualMachine.closePipe:(J)V
6: new java.io.IOException
dup
ldc "Detached from target VM"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals: int java.lang.String long
StackMap stack:
aload 0
getfield sun.tools.attach.WindowsVirtualMachine.hProcess:J
getstatic sun.tools.attach.WindowsVirtualMachine.stub:[B
aload 1
aload 4
aload 2
invokestatic sun.tools.attach.WindowsVirtualMachine.enqueue:(J[BLjava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
8: lload 5
invokestatic sun.tools.attach.WindowsVirtualMachine.connectPipe:(J)V
9: new sun.tools.attach.WindowsVirtualMachine$PipedInputStream
dup
aload 0
lload 5
invokespecial sun.tools.attach.WindowsVirtualMachine$PipedInputStream.<init>:(Lsun/tools/attach/WindowsVirtualMachine;J)V
astore 7
start local 7 10: aload 0
aload 7
invokevirtual sun.tools.attach.WindowsVirtualMachine.readInt:(Ljava/io/InputStream;)I
istore 8
start local 8 11: iload 8
ifeq 15
12: aload 1
ldc "load"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 14
13: new com.sun.tools.attach.AgentLoadException
dup
ldc "Failed to load agent library"
invokespecial com.sun.tools.attach.AgentLoadException.<init>:(Ljava/lang/String;)V
athrow
14: StackMap locals: sun.tools.attach.WindowsVirtualMachine$PipedInputStream int
StackMap stack:
new java.io.IOException
dup
ldc "Command failed in target VM"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
15: StackMap locals:
StackMap stack:
aload 7
16: areturn
end local 8 end local 7 17: StackMap locals: sun.tools.attach.WindowsVirtualMachine java.lang.String java.lang.Object[] int java.lang.String long
StackMap stack: java.io.IOException
astore 7
start local 7 18: lload 5
invokestatic sun.tools.attach.WindowsVirtualMachine.closePipe:(J)V
19: aload 7
athrow
end local 7 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 this Lsun/tools/attach/WindowsVirtualMachine;
0 20 1 cmd Ljava/lang/String;
0 20 2 args [Ljava/lang/Object;
2 20 3 r I
3 20 4 pipename Ljava/lang/String;
4 20 5 hPipe J
10 17 7 is Lsun/tools/attach/WindowsVirtualMachine$PipedInputStream;
11 17 8 status I
18 20 7 ioe Ljava/io/IOException;
Exception table:
from to target type
7 16 17 Class java.io.IOException
Exceptions:
throws com.sun.tools.attach.AgentLoadException, java.io.IOException
MethodParameters:
Name Flags
cmd
args
static native void init();
descriptor: ()V
flags: (0x0108) ACC_STATIC, ACC_NATIVE
static native byte[] generateStub();
descriptor: ()[B
flags: (0x0108) ACC_STATIC, ACC_NATIVE
static native long openProcess(int);
descriptor: (I)J
flags: (0x0108) ACC_STATIC, ACC_NATIVE
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
pid
static native void closeProcess(long);
descriptor: (J)V
flags: (0x0108) ACC_STATIC, ACC_NATIVE
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
hProcess
static native long createPipe(java.lang.String);
descriptor: (Ljava/lang/String;)J
flags: (0x0108) ACC_STATIC, ACC_NATIVE
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
name
static native void closePipe(long);
descriptor: (J)V
flags: (0x0108) ACC_STATIC, ACC_NATIVE
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
hPipe
static native void connectPipe(long);
descriptor: (J)V
flags: (0x0108) ACC_STATIC, ACC_NATIVE
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
hPipe
static native int readPipe(long, byte[], int, int);
descriptor: (J[BII)I
flags: (0x0108) ACC_STATIC, ACC_NATIVE
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
hPipe
buf
off
buflen
static native void enqueue(long, byte[], java.lang.String, java.lang.String, java.lang.Object[]);
descriptor: (J[BLjava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
flags: (0x0188) ACC_STATIC, ACC_VARARGS, ACC_NATIVE
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
hProcess
stub
cmd
pipename
args
}
SourceFile: "WindowsVirtualMachine.java"
NestMembers:
sun.tools.attach.WindowsVirtualMachine$PipedInputStream
InnerClasses:
private PipedInputStream = sun.tools.attach.WindowsVirtualMachine$PipedInputStream of sun.tools.attach.WindowsVirtualMachine