hotspot/agent/test/jdi/README.jjh
author nloodin
Wed, 09 May 2012 16:24:07 +0200
changeset 12728 a8abd64eaa1b
parent 1 489c9b5090e2
permissions -rw-r--r--
7163117: Agent can't connect to process on Mac OSX Reviewed-by: dholmes, coleenp, sla, minqi, kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     2
This dir contains a test for the JDI-SA implementation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
sagtest.java, sagtarg.java are a normal JDI regression test
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
that uses TargetAdapter.java, TargetListener.java,  TestScaffold.java,
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
and VMConnection.java.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
This test starts the debuggee, sagtarg.java, which just does a wait.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
The test then calls sagdoit.java which calls all the JDJI interface
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
functions.  Well, it doesn't call them all yet, but that is the plan.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
At least all that are interesting to the JDI-SA client. The result of
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
each call is sent to stdout
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
The script runjpda.sh runs this test.  It then runs the targ part of
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
the test and calls gcore on it to get a core dump into file sagcore.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
Do
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
        runjpda.sh >& kk
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
to run this.  
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
489c9b5090e2 Initial load
duke
parents:
diff changeset
    21
        NOTE that this produces 1000s of lines of output
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
        so be sure to redirect to a file.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
File sagclient.java is a test program that uses the JDI-SA
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
client to connect to a core file or pid and then calls sagdoit
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
which calls the JDI methods.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
The script runsa.sh can be used to run sagclient on sagcore:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
        runsa.sh sagcore >& kk1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
You can then look at the differences between the runjpda.sh 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
and the runsa.sh run to see if there are bugs.  Note that the
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
order of things might be different.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
-----------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
runjdb.sh contains a script that will run jdb on a core file
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
using the JDI-sa binding.