hotspot/agent/doc/jsdb.html
author serb
Mon, 31 Aug 2015 16:56:09 +0300
changeset 32493 31bd2a308840
parent 1 489c9b5090e2
permissions -rw-r--r--
8076178: [macosx] Few open swing and awt reg-tests fail after their update to avoid SunToolkit.realSync Reviewed-by: azvegint, yan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
<html>
489c9b5090e2 Initial load
duke
parents:
diff changeset
     2
<head>
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
<title>
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
JavaScript interface to Hotspot Serviceability Agent
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
</title>
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
</head>
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
<body>
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
<h1>JavaScript interface to Hotspot Serviceability Agent</h1>
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
<p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
Serviceability Agent (SA) provides Java API and tools to diagnose HotSpot Virtual Machine and 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
Java apps running on it. SA is a snapshot debugger -- can be used to observe state of a frozen java process or java core dump.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
</p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
<h2>Existing SA APIs</h2>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
<p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
There are two application programmer interfaces (APIs) for SA:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
<dl>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
<dt>1. Private java API
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    21
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
This tries to mimic hotspot VM's internal C++ classes and methods. Because VM data structures
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
are a moving target, this API can never be 'stable'! Besides, to use SA's private API knowledge of
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
HotSpot code base is essential.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
<dt>2. SA-JDI -- Java Debugger Interface read-only subset API
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
This is read-only subset of JDI (Java Debugger Interface)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
This is a standardized interface to get java level state of a java process or java core dump. While this
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
interface is useful, this misses parts of java level state from target process or core such as
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
<ul>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
<li>heap walking interface -- only objects traceable to static variables (of classes) and local
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
variables of stack frames can be accessed.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
<li>re-constructing .class from debuggee are missing.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
<li>re-constructing object mirrors for Java objects of the debuggee.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
</ul>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
</dl>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
</p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
<h2>SA Scripting interface</h2>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
<p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
Traditionally, platform debuggers such as dbx, gdb and Solaris mdb (Module Debugger), provide a scripting
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
language interface. Scripting language interface provides easy-to-use, dynamically typed
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
interface to access data structures from debuggee. dbx and mdb even allow user to write
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
C/C++ modules to extend the scripting language commands. 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
</p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
<p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
SA provides SOQL - Simple Object Query Language -- a SQL-like query language to access
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
Java heap as an object database. SA's main GUI (HSDB) also exposes scripting interface of underlying debugger such as dbx, windbg. 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
But to use this interface, user has to learn scripting interface of multiple debugger back-ends such as dbx, windbg. 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
And these scripting interfaces are 'raw' in the sense that no java state is exposed -- only C/C++ state of VM is exposed.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
Higher level SA services are not available through scripting interface.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
</p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
<p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
<b>jsdb -- JavaScript Debugger</b> attempts to provide JavaScript interface to SA. 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
jsdb provides
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
<ul>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
<li>high-level hotspot (and SA) independent scripting interface
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
<li>low-level SA-aware scripting interface. 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
</ul>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
</p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
<h2>High level interface (Java State)</h2>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
<b>jsdb</b> is a command line <a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">JavaScript</a> shell based on 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
<a href="http://www.mozilla.org/rhino/">Mozilla's Rhino JavaScript Engine</a>. 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
This command line utility attaches to Java process or core file or remote debug server and waits for user input.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
This shell supports the following global functions and objects in addition to the standard JavaScript functions and 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
objects:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
<h3>jdsb globals</h3>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
<table border="1">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
<th>Function/Variable</th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
<th>Description</th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
address(jobject)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
function that returns the address of the Java object as a string
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
classof(jobject)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
function that returns the JavaScript object that represents class object of the Java object
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
dumpClass(jclass,[dir])
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
function that writes .class for the given Java Class. Optionally (second arg) accepts the directory where the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
.class has to be written.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
help()
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
function that prints help message for global functions and objects
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
identityHash(jobject)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
function that returns the identity hashCode of the Java object
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
mirror(jobject)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
function that returns a local mirror of the Java object.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
load([file1, file2,...])
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
function that loads zero or more JavaScript file(s). With no arguments, reads <stdin> for
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
JavaScript code.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
object(string) 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
function that converts a string address into Java object
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
owner(jobject)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
function that returns the owner thread of this monitor or null
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
sizeof(jobject)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
function that returns the size of Java object in bytes
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
staticof(jclass, field)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
function that returns the value of given field of the given Java class
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
print(expr1, expr2,...)  
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
function that prints zero or more JavaScript expressions after converting those as strings
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
println(expr1, expr2..)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
function that same as print, but prints a newline at the end
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
read([prompt])
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
function that reads a single line from standard input
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
quit()
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
function that quits the interactive load call as well as the shell
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
jvm
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
variable -- a JavaScript object that represents the target jvm that is being debugged
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
</table>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
<h3>jvm object</h3>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
<p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
jvm object supports the following read-only properties.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
</p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
<table border="1">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
<th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
Property name
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
</th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
<th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
Description
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
</th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
threads
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
array of Java threads from the debuggee
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
heap
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   241
object representing the heap of the debuggee
489c9b5090e2 Initial load
duke
parents:
diff changeset
   242
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   243
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
type
489c9b5090e2 Initial load
duke
parents:
diff changeset
   247
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
string value that is either "Server" or "Client" or "Core" -- the flavour of debuggee VM
489c9b5090e2 Initial load
duke
parents:
diff changeset
   250
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   251
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   252
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   253
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   254
bootClassPath
489c9b5090e2 Initial load
duke
parents:
diff changeset
   255
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   256
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   257
string value of bootclasspath of the debuggee
489c9b5090e2 Initial load
duke
parents:
diff changeset
   258
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   259
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   260
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   261
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   262
cpu
489c9b5090e2 Initial load
duke
parents:
diff changeset
   263
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   264
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   265
string value of cpu on which the debuggee runs/ran
489c9b5090e2 Initial load
duke
parents:
diff changeset
   266
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   267
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   268
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   269
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   270
sysProps
489c9b5090e2 Initial load
duke
parents:
diff changeset
   271
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   272
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   273
name-value pairs (JavaScript associative array) of Java System properties of the debuggee
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   275
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   276
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   277
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   278
addressSize
489c9b5090e2 Initial load
duke
parents:
diff changeset
   279
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   280
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   281
int value -- 32 for 32 bit debuggee, 64 for 64 bit debuggee
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   283
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   284
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   285
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   286
os
489c9b5090e2 Initial load
duke
parents:
diff changeset
   287
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   288
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   289
string value of OS on which the debuggee runs/ran
489c9b5090e2 Initial load
duke
parents:
diff changeset
   290
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   291
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   292
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   293
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   294
buildInfo
489c9b5090e2 Initial load
duke
parents:
diff changeset
   295
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   296
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   297
internal build info string from debuggee
489c9b5090e2 Initial load
duke
parents:
diff changeset
   298
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   299
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   300
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   301
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   302
flags
489c9b5090e2 Initial load
duke
parents:
diff changeset
   303
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   304
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   305
name-value pairs (JavaScript associative array) of JVM command line flags of the debuggee
489c9b5090e2 Initial load
duke
parents:
diff changeset
   306
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   307
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   308
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   309
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   310
classPath
489c9b5090e2 Initial load
duke
parents:
diff changeset
   311
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   312
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   313
string value of classpath of the debuggee
489c9b5090e2 Initial load
duke
parents:
diff changeset
   314
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   315
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   316
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   317
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   318
userDir
489c9b5090e2 Initial load
duke
parents:
diff changeset
   319
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   320
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   321
string value of user.dir System property of the debuggee
489c9b5090e2 Initial load
duke
parents:
diff changeset
   322
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   323
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   324
</table>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   325
489c9b5090e2 Initial load
duke
parents:
diff changeset
   326
<h3>heap object</h3>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   327
489c9b5090e2 Initial load
duke
parents:
diff changeset
   328
<p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   329
heap object represents Java heap of the debuggee VM
489c9b5090e2 Initial load
duke
parents:
diff changeset
   330
</p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   331
<table border="1">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   332
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   333
<th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   334
Function or property name
489c9b5090e2 Initial load
duke
parents:
diff changeset
   335
</th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   336
<th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   337
Description
489c9b5090e2 Initial load
duke
parents:
diff changeset
   338
</th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   339
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   340
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   341
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   342
capacity
489c9b5090e2 Initial load
duke
parents:
diff changeset
   343
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   344
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   345
byte size of capacity of the heap
489c9b5090e2 Initial load
duke
parents:
diff changeset
   346
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   347
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   348
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   349
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   350
used
489c9b5090e2 Initial load
duke
parents:
diff changeset
   351
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   352
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   353
byte size of used portion (of live objects) of the heap
489c9b5090e2 Initial load
duke
parents:
diff changeset
   354
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   355
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   356
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   357
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   358
forEachObject(func, [class], [include subtypes -- true|false])
489c9b5090e2 Initial load
duke
parents:
diff changeset
   359
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   360
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   361
This function accepts a callback function 'func' and optionally class name and boolean arguments.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   362
This function calls the callback for each Java object in the debuggee's heap. The optional class
489c9b5090e2 Initial load
duke
parents:
diff changeset
   363
argument may be used to receive objects of given class only. The third arguments specifies whether
489c9b5090e2 Initial load
duke
parents:
diff changeset
   364
to include objects of subtype of given class [or interface] or not. The default value of class is "java.lang.Object"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   365
and and that of the third argument is true. i.e., by default all objects are included.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   366
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   367
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   368
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   369
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   370
forEachClass(func, [initiating loader -- true|false])
489c9b5090e2 Initial load
duke
parents:
diff changeset
   371
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   372
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   373
This function accepts a callback function 'func'. This function iterates through the classes of the debuggee and calls the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   374
callback for each class. The second parameter tells whether to pass initiating loader to the iterator callback or not.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   375
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   376
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   377
</table>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   378
489c9b5090e2 Initial load
duke
parents:
diff changeset
   379
<h3>Accessing Java objects and arrays in script</h3>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   380
489c9b5090e2 Initial load
duke
parents:
diff changeset
   381
<p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   382
From a given Java object, we can access all fields of the Java object by usual '.' operator. i.e., if you got a Java object
489c9b5090e2 Initial load
duke
parents:
diff changeset
   383
called 'o' of type java.lang.Thread from debuggee, you can access 'stackSize' field by o.stackSize syntax. Similarly, length of Java array
489c9b5090e2 Initial load
duke
parents:
diff changeset
   384
objects can be accessed by length property. And array indexing follows usual syntax. i.e., n'th element of array 'a' is 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   385
accessed by a[n].
489c9b5090e2 Initial load
duke
parents:
diff changeset
   386
</p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   387
489c9b5090e2 Initial load
duke
parents:
diff changeset
   388
<h3>jvm.threads array</h3>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   389
489c9b5090e2 Initial load
duke
parents:
diff changeset
   390
<p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   391
This is a JavaScript array of Java threads of the debuggee. As usual, 'length' property tells the number of threads and individual
489c9b5090e2 Initial load
duke
parents:
diff changeset
   392
threads may be accessed by index operator -- i.e, jvm.threads[0] returns the first thread.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   393
</p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   394
489c9b5090e2 Initial load
duke
parents:
diff changeset
   395
<h3>thread object</h3>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   396
489c9b5090e2 Initial load
duke
parents:
diff changeset
   397
489c9b5090e2 Initial load
duke
parents:
diff changeset
   398
<p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   399
In addition to the fields of java.lang.Thread (or subclass) fields, thread objects have two additional properties.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   400
489c9b5090e2 Initial load
duke
parents:
diff changeset
   401
<ul>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   402
<li>frames -- array of stack frame objects
489c9b5090e2 Initial load
duke
parents:
diff changeset
   403
<li>monitors -- array of monitor objects owned by the thread
489c9b5090e2 Initial load
duke
parents:
diff changeset
   404
</ul>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   405
489c9b5090e2 Initial load
duke
parents:
diff changeset
   406
</p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   407
489c9b5090e2 Initial load
duke
parents:
diff changeset
   408
<h3>stack frame object</h3>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   409
489c9b5090e2 Initial load
duke
parents:
diff changeset
   410
<table border="1">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   411
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   412
<th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   413
Property name
489c9b5090e2 Initial load
duke
parents:
diff changeset
   414
</th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   415
<th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   416
Description
489c9b5090e2 Initial load
duke
parents:
diff changeset
   417
</th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   418
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   419
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   420
thisObject
489c9b5090e2 Initial load
duke
parents:
diff changeset
   421
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   422
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   423
Object representing 'this' of the current frame [will be null for static methods]
489c9b5090e2 Initial load
duke
parents:
diff changeset
   424
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   425
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   426
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   427
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   428
locals
489c9b5090e2 Initial load
duke
parents:
diff changeset
   429
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   430
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   431
name-value pairs of local variables [JavaScript associative array]
489c9b5090e2 Initial load
duke
parents:
diff changeset
   432
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   433
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   434
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   435
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   436
line
489c9b5090e2 Initial load
duke
parents:
diff changeset
   437
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   438
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   439
Java source line number at which the frame is executing
489c9b5090e2 Initial load
duke
parents:
diff changeset
   440
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   441
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   442
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   443
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   444
bci
489c9b5090e2 Initial load
duke
parents:
diff changeset
   445
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   446
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   447
byte code index of the bytecode that the frame is executing
489c9b5090e2 Initial load
duke
parents:
diff changeset
   448
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   449
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   450
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   451
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   452
thread
489c9b5090e2 Initial load
duke
parents:
diff changeset
   453
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   454
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   455
thread to which this frame belongs
489c9b5090e2 Initial load
duke
parents:
diff changeset
   456
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   457
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   458
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   459
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   460
method
489c9b5090e2 Initial load
duke
parents:
diff changeset
   461
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   462
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   463
Java method that the frame is executing
489c9b5090e2 Initial load
duke
parents:
diff changeset
   464
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   465
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   466
</table>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   467
489c9b5090e2 Initial load
duke
parents:
diff changeset
   468
<h3>method object</h3>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   469
489c9b5090e2 Initial load
duke
parents:
diff changeset
   470
<p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   471
method object represents a Java method of debuggee
489c9b5090e2 Initial load
duke
parents:
diff changeset
   472
</p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   473
489c9b5090e2 Initial load
duke
parents:
diff changeset
   474
<table border="1">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   475
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   476
<th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   477
Property name
489c9b5090e2 Initial load
duke
parents:
diff changeset
   478
</th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   479
<th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   480
Description
489c9b5090e2 Initial load
duke
parents:
diff changeset
   481
</th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   482
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   483
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   484
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   485
isStatic
489c9b5090e2 Initial load
duke
parents:
diff changeset
   486
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   487
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   488
boolean - true for static methods and false for non-static methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   489
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   490
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   491
489c9b5090e2 Initial load
duke
parents:
diff changeset
   492
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   493
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   494
isSynchronized
489c9b5090e2 Initial load
duke
parents:
diff changeset
   495
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   496
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   497
boolean - true for synchronized methods and false for non-synchronized methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   498
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   499
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   500
489c9b5090e2 Initial load
duke
parents:
diff changeset
   501
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   502
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   503
isNative
489c9b5090e2 Initial load
duke
parents:
diff changeset
   504
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   505
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   506
boolean - true for native methods and false for non-native methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   507
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   508
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   509
489c9b5090e2 Initial load
duke
parents:
diff changeset
   510
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   511
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   512
isProtected
489c9b5090e2 Initial load
duke
parents:
diff changeset
   513
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   514
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   515
boolean - true for protected methods and false for non-protected methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   516
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   517
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   518
489c9b5090e2 Initial load
duke
parents:
diff changeset
   519
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   520
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   521
isPrivate
489c9b5090e2 Initial load
duke
parents:
diff changeset
   522
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   523
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   524
boolean - true for private methods and false for non-private methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   525
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   526
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   527
489c9b5090e2 Initial load
duke
parents:
diff changeset
   528
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   529
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   530
isSynthetic
489c9b5090e2 Initial load
duke
parents:
diff changeset
   531
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   532
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   533
boolean - true for Javac generated synthetic methods and false for non-synthetic methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   534
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   535
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   536
489c9b5090e2 Initial load
duke
parents:
diff changeset
   537
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   538
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   539
isPackagePrivate
489c9b5090e2 Initial load
duke
parents:
diff changeset
   540
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   541
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   542
boolean - true for package-private methods and false for non-package-private methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   543
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   544
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   545
489c9b5090e2 Initial load
duke
parents:
diff changeset
   546
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   547
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   548
isPublic
489c9b5090e2 Initial load
duke
parents:
diff changeset
   549
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   550
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   551
boolean - true for public methods and false for non-public methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   552
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   553
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   554
489c9b5090e2 Initial load
duke
parents:
diff changeset
   555
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   556
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   557
holder
489c9b5090e2 Initial load
duke
parents:
diff changeset
   558
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   559
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   560
an object that represents Class that contains this method
489c9b5090e2 Initial load
duke
parents:
diff changeset
   561
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   562
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   563
489c9b5090e2 Initial load
duke
parents:
diff changeset
   564
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   565
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   566
signature
489c9b5090e2 Initial load
duke
parents:
diff changeset
   567
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   568
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   569
string -- signature of this method
489c9b5090e2 Initial load
duke
parents:
diff changeset
   570
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   571
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   572
489c9b5090e2 Initial load
duke
parents:
diff changeset
   573
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   574
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   575
isObsolete
489c9b5090e2 Initial load
duke
parents:
diff changeset
   576
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   577
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   578
boolean - true for obsolete (hotswapped) methods and false for non-obsolete methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   579
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   580
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   581
489c9b5090e2 Initial load
duke
parents:
diff changeset
   582
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   583
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   584
isStrict
489c9b5090e2 Initial load
duke
parents:
diff changeset
   585
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   586
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   587
boolean - true for strictfp methods and false for non-strictfp methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   588
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   589
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   590
489c9b5090e2 Initial load
duke
parents:
diff changeset
   591
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   592
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   593
isFinal
489c9b5090e2 Initial load
duke
parents:
diff changeset
   594
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   595
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   596
boolean - true for final methods and false for non-final methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   597
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   598
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   599
489c9b5090e2 Initial load
duke
parents:
diff changeset
   600
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   601
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   602
name
489c9b5090e2 Initial load
duke
parents:
diff changeset
   603
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   604
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   605
string - name of this method
489c9b5090e2 Initial load
duke
parents:
diff changeset
   606
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   607
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   608
</table>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   609
489c9b5090e2 Initial load
duke
parents:
diff changeset
   610
<h3>class object</h3>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   611
489c9b5090e2 Initial load
duke
parents:
diff changeset
   612
<p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   613
A class object represents loaded Java class in debuggee VM. This represents java.lang.Class instance in the debuggee.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   614
This is type of return value of classof global function. Also, method.holder property and field.holder are
489c9b5090e2 Initial load
duke
parents:
diff changeset
   615
of this type.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   616
</p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   617
489c9b5090e2 Initial load
duke
parents:
diff changeset
   618
<table border="1">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   619
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   620
<th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   621
Property name
489c9b5090e2 Initial load
duke
parents:
diff changeset
   622
</th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   623
<th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   624
Description
489c9b5090e2 Initial load
duke
parents:
diff changeset
   625
</th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   626
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   627
489c9b5090e2 Initial load
duke
parents:
diff changeset
   628
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   629
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   630
name
489c9b5090e2 Initial load
duke
parents:
diff changeset
   631
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   632
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   633
name of this class
489c9b5090e2 Initial load
duke
parents:
diff changeset
   634
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   635
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   636
489c9b5090e2 Initial load
duke
parents:
diff changeset
   637
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   638
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   639
superClass
489c9b5090e2 Initial load
duke
parents:
diff changeset
   640
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   641
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   642
class object representing super class of this class
489c9b5090e2 Initial load
duke
parents:
diff changeset
   643
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   644
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   645
489c9b5090e2 Initial load
duke
parents:
diff changeset
   646
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   647
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   648
isArrayClass
489c9b5090e2 Initial load
duke
parents:
diff changeset
   649
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   650
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   651
boolean -- is the current class an array class?
489c9b5090e2 Initial load
duke
parents:
diff changeset
   652
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   653
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   654
489c9b5090e2 Initial load
duke
parents:
diff changeset
   655
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   656
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   657
isStatic
489c9b5090e2 Initial load
duke
parents:
diff changeset
   658
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   659
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   660
boolean -- is the current class static or not
489c9b5090e2 Initial load
duke
parents:
diff changeset
   661
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   662
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   663
489c9b5090e2 Initial load
duke
parents:
diff changeset
   664
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   665
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   666
isInterface
489c9b5090e2 Initial load
duke
parents:
diff changeset
   667
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   668
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   669
boolean -- is the current class an interface
489c9b5090e2 Initial load
duke
parents:
diff changeset
   670
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   671
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   672
489c9b5090e2 Initial load
duke
parents:
diff changeset
   673
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   674
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   675
isAbstract
489c9b5090e2 Initial load
duke
parents:
diff changeset
   676
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   677
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   678
boolean -- is the current class abstract or not
489c9b5090e2 Initial load
duke
parents:
diff changeset
   679
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   680
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   681
489c9b5090e2 Initial load
duke
parents:
diff changeset
   682
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   683
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   684
isProtected
489c9b5090e2 Initial load
duke
parents:
diff changeset
   685
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   686
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   687
boolean -- is the current class protected or not
489c9b5090e2 Initial load
duke
parents:
diff changeset
   688
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   689
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   690
489c9b5090e2 Initial load
duke
parents:
diff changeset
   691
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   692
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   693
isPrivate
489c9b5090e2 Initial load
duke
parents:
diff changeset
   694
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   695
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   696
boolean -- is the current class private or not
489c9b5090e2 Initial load
duke
parents:
diff changeset
   697
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   698
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   699
489c9b5090e2 Initial load
duke
parents:
diff changeset
   700
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   701
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   702
isPackagePrivate
489c9b5090e2 Initial load
duke
parents:
diff changeset
   703
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   704
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   705
boolean -- is the current class package private or not
489c9b5090e2 Initial load
duke
parents:
diff changeset
   706
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   707
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   708
489c9b5090e2 Initial load
duke
parents:
diff changeset
   709
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   710
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   711
isSynthetic
489c9b5090e2 Initial load
duke
parents:
diff changeset
   712
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   713
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   714
boolean -- is the current class synthetic or not
489c9b5090e2 Initial load
duke
parents:
diff changeset
   715
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   716
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   717
489c9b5090e2 Initial load
duke
parents:
diff changeset
   718
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   719
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   720
classLoader
489c9b5090e2 Initial load
duke
parents:
diff changeset
   721
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   722
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   723
object that represents ClassLoader object that loaded the current class
489c9b5090e2 Initial load
duke
parents:
diff changeset
   724
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   725
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   726
489c9b5090e2 Initial load
duke
parents:
diff changeset
   727
489c9b5090e2 Initial load
duke
parents:
diff changeset
   728
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   729
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   730
fields
489c9b5090e2 Initial load
duke
parents:
diff changeset
   731
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   732
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   733
array of static and instance fields of the current class
489c9b5090e2 Initial load
duke
parents:
diff changeset
   734
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   735
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   736
489c9b5090e2 Initial load
duke
parents:
diff changeset
   737
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   738
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   739
protectionDomain
489c9b5090e2 Initial load
duke
parents:
diff changeset
   740
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   741
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   742
protection domain to which current class belongs
489c9b5090e2 Initial load
duke
parents:
diff changeset
   743
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   744
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   745
489c9b5090e2 Initial load
duke
parents:
diff changeset
   746
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   747
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   748
isPublic
489c9b5090e2 Initial load
duke
parents:
diff changeset
   749
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   750
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   751
boolean -- is the current class public or not
489c9b5090e2 Initial load
duke
parents:
diff changeset
   752
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   753
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   754
489c9b5090e2 Initial load
duke
parents:
diff changeset
   755
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   756
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   757
signers
489c9b5090e2 Initial load
duke
parents:
diff changeset
   758
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   759
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   760
array of signers for current class
489c9b5090e2 Initial load
duke
parents:
diff changeset
   761
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   762
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   763
489c9b5090e2 Initial load
duke
parents:
diff changeset
   764
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   765
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   766
sourceFile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   767
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   768
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   769
string -- name of the source file for current class
489c9b5090e2 Initial load
duke
parents:
diff changeset
   770
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   771
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   772
489c9b5090e2 Initial load
duke
parents:
diff changeset
   773
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   774
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   775
interfaces
489c9b5090e2 Initial load
duke
parents:
diff changeset
   776
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   777
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   778
array -- interfaces implemented by current class
489c9b5090e2 Initial load
duke
parents:
diff changeset
   779
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   780
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   781
489c9b5090e2 Initial load
duke
parents:
diff changeset
   782
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   783
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   784
isStrict
489c9b5090e2 Initial load
duke
parents:
diff changeset
   785
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   786
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   787
boolean -- is the current class strictfp or not
489c9b5090e2 Initial load
duke
parents:
diff changeset
   788
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   789
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   790
489c9b5090e2 Initial load
duke
parents:
diff changeset
   791
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   792
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   793
methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   794
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   795
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   796
array of methods (static and instance) of the current class
489c9b5090e2 Initial load
duke
parents:
diff changeset
   797
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   798
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   799
489c9b5090e2 Initial load
duke
parents:
diff changeset
   800
489c9b5090e2 Initial load
duke
parents:
diff changeset
   801
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   802
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   803
isFinal
489c9b5090e2 Initial load
duke
parents:
diff changeset
   804
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   805
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   806
boolean -- is the current class final or not
489c9b5090e2 Initial load
duke
parents:
diff changeset
   807
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   808
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   809
489c9b5090e2 Initial load
duke
parents:
diff changeset
   810
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   811
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   812
statics
489c9b5090e2 Initial load
duke
parents:
diff changeset
   813
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   814
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   815
name-value pairs (JavaScript associate array) of static fields of the current class
489c9b5090e2 Initial load
duke
parents:
diff changeset
   816
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   817
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   818
</table>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   819
489c9b5090e2 Initial load
duke
parents:
diff changeset
   820
<h3>field object</h3>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   821
<p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   822
field represents a static or instance field of some class in debuggee
489c9b5090e2 Initial load
duke
parents:
diff changeset
   823
</p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   824
489c9b5090e2 Initial load
duke
parents:
diff changeset
   825
<table border="1">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   826
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   827
<th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   828
Property name
489c9b5090e2 Initial load
duke
parents:
diff changeset
   829
</th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   830
<th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   831
Description
489c9b5090e2 Initial load
duke
parents:
diff changeset
   832
</th>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   833
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   834
489c9b5090e2 Initial load
duke
parents:
diff changeset
   835
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   836
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   837
isStatic
489c9b5090e2 Initial load
duke
parents:
diff changeset
   838
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   839
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   840
boolean -- is this field a static field?
489c9b5090e2 Initial load
duke
parents:
diff changeset
   841
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   842
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   843
489c9b5090e2 Initial load
duke
parents:
diff changeset
   844
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   845
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   846
holder
489c9b5090e2 Initial load
duke
parents:
diff changeset
   847
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   848
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   849
class that owns this field
489c9b5090e2 Initial load
duke
parents:
diff changeset
   850
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   851
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   852
489c9b5090e2 Initial load
duke
parents:
diff changeset
   853
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   854
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   855
signature
489c9b5090e2 Initial load
duke
parents:
diff changeset
   856
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   857
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   858
string signature of this field
489c9b5090e2 Initial load
duke
parents:
diff changeset
   859
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   860
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   861
489c9b5090e2 Initial load
duke
parents:
diff changeset
   862
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   863
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   864
isProtected
489c9b5090e2 Initial load
duke
parents:
diff changeset
   865
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   866
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   867
boolean - is this field a protected field or not?
489c9b5090e2 Initial load
duke
parents:
diff changeset
   868
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   869
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   870
489c9b5090e2 Initial load
duke
parents:
diff changeset
   871
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   872
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   873
isPrivate
489c9b5090e2 Initial load
duke
parents:
diff changeset
   874
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   875
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   876
boolean - is this field a private field or not?
489c9b5090e2 Initial load
duke
parents:
diff changeset
   877
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   878
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   879
489c9b5090e2 Initial load
duke
parents:
diff changeset
   880
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   881
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   882
isSynthetic
489c9b5090e2 Initial load
duke
parents:
diff changeset
   883
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   884
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   885
boolean - is this javac generated synthetic field or not?
489c9b5090e2 Initial load
duke
parents:
diff changeset
   886
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   887
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   888
489c9b5090e2 Initial load
duke
parents:
diff changeset
   889
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   890
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   891
isPackagePrivate
489c9b5090e2 Initial load
duke
parents:
diff changeset
   892
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   893
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   894
boolean - is this field a package private field or not?
489c9b5090e2 Initial load
duke
parents:
diff changeset
   895
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   896
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   897
489c9b5090e2 Initial load
duke
parents:
diff changeset
   898
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   899
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   900
isTransient
489c9b5090e2 Initial load
duke
parents:
diff changeset
   901
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   902
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   903
boolean - is this field a transient field or not?
489c9b5090e2 Initial load
duke
parents:
diff changeset
   904
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   905
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   906
489c9b5090e2 Initial load
duke
parents:
diff changeset
   907
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   908
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   909
isFinal
489c9b5090e2 Initial load
duke
parents:
diff changeset
   910
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   911
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   912
boolean - is this field final or not?
489c9b5090e2 Initial load
duke
parents:
diff changeset
   913
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   914
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   915
489c9b5090e2 Initial load
duke
parents:
diff changeset
   916
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   917
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   918
name
489c9b5090e2 Initial load
duke
parents:
diff changeset
   919
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   920
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   921
string - name of this field
489c9b5090e2 Initial load
duke
parents:
diff changeset
   922
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   923
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   924
489c9b5090e2 Initial load
duke
parents:
diff changeset
   925
<tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   926
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   927
isPublic
489c9b5090e2 Initial load
duke
parents:
diff changeset
   928
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   929
<td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   930
boolean - is this field public or not?
489c9b5090e2 Initial load
duke
parents:
diff changeset
   931
</td>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   932
</tr>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   933
</table>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   934
489c9b5090e2 Initial load
duke
parents:
diff changeset
   935
<h3>Initialization Script</h3>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   936
<p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   937
jsdb engine looks for initialization script file named <b>jsdb.js</b> in user's home directory. If found, it loads just after attaching to debuggee but before printing prompt for user's input. User can assume that s/he can access debuggee VM
489c9b5090e2 Initial load
duke
parents:
diff changeset
   938
state during initialization script.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   939
</p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   940
489c9b5090e2 Initial load
duke
parents:
diff changeset
   941
<h3>Sample scripts</h3>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   942
489c9b5090e2 Initial load
duke
parents:
diff changeset
   943
Semantics and knowledge of application classes (for eg. AppServer's classes) would be needed to create app specific
489c9b5090e2 Initial load
duke
parents:
diff changeset
   944
scripts. The following script samples are app-independent and provide a flavour of kind of scripts that can be written.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   945
 	
489c9b5090e2 Initial load
duke
parents:
diff changeset
   946
<h4>Script to print system properties of JVM</h4>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   947
489c9b5090e2 Initial load
duke
parents:
diff changeset
   948
<pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   949
<code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   950
jvm.sysProps.toString()
489c9b5090e2 Initial load
duke
parents:
diff changeset
   951
</code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   952
</pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   953
489c9b5090e2 Initial load
duke
parents:
diff changeset
   954
<h4>Script to print JVM command line flags</h4>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   955
<pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   956
<code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   957
jvm.flags.toString()
489c9b5090e2 Initial load
duke
parents:
diff changeset
   958
</code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   959
</pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   960
489c9b5090e2 Initial load
duke
parents:
diff changeset
   961
489c9b5090e2 Initial load
duke
parents:
diff changeset
   962
<h4>Script to print class-wise histogram of objects</h4>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   963
489c9b5090e2 Initial load
duke
parents:
diff changeset
   964
<pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   965
<code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   966
489c9b5090e2 Initial load
duke
parents:
diff changeset
   967
// associate array to hold histogram
489c9b5090e2 Initial load
duke
parents:
diff changeset
   968
var histo;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   969
function func(obj) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   970
    var classname = classof(obj).name;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   971
    if (histo[classname] == undefined) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   972
       // first time we are visiting this class type
489c9b5090e2 Initial load
duke
parents:
diff changeset
   973
       histo[classname] = 1;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   974
    } else {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   975
       histo[classname]++; 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   976
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   977
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   978
489c9b5090e2 Initial load
duke
parents:
diff changeset
   979
// iterate through java heap calling 'func' for each object
489c9b5090e2 Initial load
duke
parents:
diff changeset
   980
jvm.heap.forEachObject(func);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   981
489c9b5090e2 Initial load
duke
parents:
diff changeset
   982
// print the histogram
489c9b5090e2 Initial load
duke
parents:
diff changeset
   983
for (i in histo) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   984
   println('number of instances of ', i, ' = ', histo[i]);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   985
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   986
489c9b5090e2 Initial load
duke
parents:
diff changeset
   987
</code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   988
</pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   989
489c9b5090e2 Initial load
duke
parents:
diff changeset
   990
<h4>Script to print stack trace of all Java threads</h4>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   991
489c9b5090e2 Initial load
duke
parents:
diff changeset
   992
<pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   993
<code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   994
489c9b5090e2 Initial load
duke
parents:
diff changeset
   995
function printStackTrace(t) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   996
    println(t.name);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   997
    println('');
489c9b5090e2 Initial load
duke
parents:
diff changeset
   998
    for (i in t.frames) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   999
       println(t.frames[i]);
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1000
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1001
    println('');
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1002
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1003
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1004
// walk through the list of threads and call printStackTrace
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1005
// for each thread
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1006
for (o in jvm.threads) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1007
    printStackTrace(jvm.threads[o]);
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1008
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1009
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1010
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1011
</code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1012
</pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1013
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1014
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1015
<h4>Script to re-construct .class files for all non-bootstrap classes</h4>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1016
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1017
<pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1018
<code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1019
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1020
function dump(cl) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1021
   if (!cl.isArrayClass  && cl.classLoader != null) { 
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1022
      // not an array class and a non-bootstrap class
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1023
      // create .class files in e:\tmp dir
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1024
      dumpClass(cl, "e:\\tmp); 
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1025
   } else {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1026
      println("skipping bootstrap class ", cl.name);
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1027
   }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1028
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1029
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1030
// walk thru heap and call callback for each java.lang.Class instance
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1031
jvm.heap.forEachObject(dump, "java.lang.Class");
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1032
</code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1033
</pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1034
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1035
<h4>Script to print paths of all java.io.File's currently accessed</h4>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1036
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1037
<pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1038
<code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1039
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1040
function printFile(f) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1041
   // construct a mirror java.io.File here and
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1042
   // print absolute path here
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1043
   println(mirror(f).getAbsolutePath());
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1044
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1045
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1046
jvm.heap.forEachObject(printFile, "java.io.File");
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1047
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1048
</code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1049
</pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1050
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1051
<h4>Script to print static fields of java.lang.Thread class</h4>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1052
<pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1053
<code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1054
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1055
var threadClass = classof("java.lang.Thread");
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1056
for (i in threadClass.statics) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1057
  println(i, '=', threadClass.statics[i]);
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1058
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1059
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1060
</code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1061
</pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1062
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1063
<h3>Low level interface (VM State)</h3>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1064
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1065
<p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1066
Low level jsdb interface works by <a href="http://www.mozilla.org/rhino/ScriptingJava.html">JavaScript-to-Java (previously known as "LiveConnect")
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1067
interface</a> provided by Rhino JavaScript engine. 
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1068
</p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1069
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1070
<h2>sapkg object</h2>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1071
<p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1072
This object provides short names for SA package names. For eg. instead of writing
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1073
Packages.sun.jvm.hotspot.memory, we can write sapkg.memory.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1074
</p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1075
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1076
<h2>sa object</h2>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1077
<p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1078
This object contains all SA singleton objects such as VM, Universe, SymbolTable,
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1079
SystemDictionary, ObjectHeap, CollectedHeap, Debugger, CDebugger (if available),
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1080
Interpreter, TypeDataBase and Threads. For eg. to access SymbolTable of Java debuggee,
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1081
we can use sa.symbolTable. User can execute the following code to get fields of this object.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1082
</p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1083
<pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1084
<code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1085
for (i in sa) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1086
  println(i);
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1087
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1088
</code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1089
</pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1090
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1091
<h4>Heap Iterators</h4>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1092
<dl>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1093
<dt>forEachOop(callback)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1094
<dd>calls a callback function for each Oop in Java heap</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1095
<dt>forEachOopOfKlass(callback, klass, [includeSubtypes])</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1096
<dd>calls a callback function for each Oop of a give Klass type
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1097
Optinally, third argument can specify whether to include subtype Oops
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1098
or not.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1099
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1100
</dl>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1101
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1102
<h4>System Dictionary Access</h4>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1103
<dl>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1104
<dt>forEachKlass(callback)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1105
<dd>calls a callback function for each Klass in Java heap</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1106
<dt>forEachKlassAndLoader(callback)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1107
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1108
calls callback with Klass and initiating loader (Oop) for System dictionary
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1109
entry.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1110
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1111
<dt>forEachPrimArrayKlass(callback)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1112
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1113
calls callback with Klass and initiating loader (Oop) for each
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1114
primitive array Klass in the system.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1115
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1116
<dt>findInstanceKlass(name)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1117
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1118
finds the first instance klass with given name from System dictionary
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1119
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1120
</dl>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1121
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1122
<h4>Thread, Frame Iterators</h4>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1123
<dl>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1124
<dt>forEachJavaThread(callback)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1125
<dd>calls callback for each Java Thread</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1126
<dt>forEachFrame(javaThread, callback)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1127
<dd>calls callback for each Frame of a given JavaThread</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1128
<dt>forEachVFrame(javaThread, callback)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1129
<dd>calls callback for each JavaVFrame of a given JavaThread</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1130
<dt>forEachThread(callback)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1131
<dd>calls callback for each (native) ThreadProxy (obtained by CDebugger.getThreadList)
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1132
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1133
<dt>forEachCFrame(threadProxy, callback)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1134
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1135
calls callback for each CFrame of a given ThreadProxy object
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1136
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1137
</dl>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1138
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1139
<h4>Code blobs, Interpreter codelets</h4>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1140
<dl>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1141
<dt>forEachCodeBlob(callback)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1142
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1143
calls callback with each code blob in code cache
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1144
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1145
<dt>findCodeBlob(address)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1146
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1147
finds the code blob, if any, that contains the given address.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1148
Returns null, on failure.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1149
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1150
<dt>findNMethod(address)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1151
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1152
finds the NMethod that contains given address.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1153
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1154
<dt>pcDescAt(addr)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1155
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1156
returns PCDesc at given address or null.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1157
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1158
<dt>forEachInterpCodelet(callbacl)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1159
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1160
calls callback with each Interpreter codelet
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1161
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1162
</dl>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1163
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1164
<h4>VM structs, constants</h4>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1165
<dl>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1166
<dt>forEachType(callback)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1167
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1168
calls callback for each Type in VM's type database
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1169
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1170
<dt>forEachVMIntConst(callback)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1171
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1172
calls callback for each named integer constant. passes name 
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1173
as argument.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1174
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1175
<dt>forEachVMLongConst(callback)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1176
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1177
calls callback for each named long constant. passes name 
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1178
as argument.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1179
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1180
<dt>findVMType(name)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1181
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1182
finds a VM type by name. returns null if no known Type of given name
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1183
exists in type database.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1184
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1185
<dt>findVMIntConst(name)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1186
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1187
finds an integer constant in type data base by name.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1188
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1189
<dt>findVMLongConst(name)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1190
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1191
finds an long constant in type data base by name.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1192
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1193
<dt>vmTypeof(addr)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1194
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1195
returns VM type of object at 'addr' if any. Else, returns null.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1196
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1197
<dt>isOfVMType(addr, type)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1198
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1199
returns whether object at 'addr' is of VM type 'type' or not.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1200
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1201
<dt>printVMType(type, addr)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1202
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1203
prints 'addr' as VM object of type 'type'
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1204
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1205
<dt>print<i>XXX</i>(addr)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1206
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1207
For each VM type, these functions are defined. For eg. there is printUniverse,
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1208
printSystemDictionary etc. are available. Without 'addr' being passed static fields are printed. With 'addr' param being passed, instance fields are printed.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1209
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1210
</dl>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1211
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1212
<h4>Low level debugger facilities</h4>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1213
<dl>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1214
<dt>num2addr(number)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1215
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1216
converts a (long) number to SA Address instance
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1217
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1218
<dt>str2addr(string)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1219
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1220
converts a given hex string to SA Address instance
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1221
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1222
<dt>any2addr(any)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1223
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1224
Takes a number or a string or an Address and returns
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1225
an Address instance. For other types, returns 'undefined'
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1226
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1227
<dt>addr2str(addr)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1228
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1229
converts a given Address instance to a hex string
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1230
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1231
<dt>addr2num(addr)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1232
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1233
converts a given Address instance to a (long) number
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1234
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1235
<dt>sym2addr(library, symbol)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1236
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1237
returns Address of a given symbol in a given library (shared object or DLL)
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1238
Example: sym2addr('jvm.dll', 'JNI_CreateJavaVM')
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1239
<dt>addr2sym(addr)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1240
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1241
Returns nearest symbol to a given address (if any). If no such symbol is found,
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1242
returns the given address as a string.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1243
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1244
<dt>readBytesAt(addr, num)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1245
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1246
returns 'num' bytes at 'addr' as a Java byte[]
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1247
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1248
<dt>readWordsAt(addr, num)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1249
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1250
returns 'num' words at 'addr' as a Java long[]
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1251
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1252
<dt>readCStrAt(addr)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1253
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1254
returns 'C' String at given address
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1255
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1256
<dt>readCStrLen(addr)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1257
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1258
returns the length of the 'C' String at given address
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1259
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1260
<dt>readRegs(threadProxy)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1261
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1262
returns register set (of Thread Context) of a given thread specified
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1263
by threadProxy. return value is an associate array having name-value pairs
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1264
of registers.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1265
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1266
<dt>regs(threadProxy)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1267
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1268
prints register set of a given thread.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1269
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1270
<dt>mem(addr, [num])</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1271
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1272
prints 'num' words (address size) at 'addr'. Prints nearest symbol for address, if found.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1273
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1274
<dt>dis(addr, [num])</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1275
<dd>prints native code disassembly of 'num' bytes at given address 'addr'.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1276
Default value of 'num' is 4. This automatically detects whether the given address
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1277
inside a nmethod. If so, it prints safepoint info, entry points , method signature etc. 
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1278
of the nmethod.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1279
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1280
<dt>jdis(method [or addr])</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1281
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1282
prints Java bytecode disassembly for given method Oop or address of a method Oop.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1283
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1284
<dt>nmethoddis(nmethod)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1285
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1286
prints disassembly of given nmethod object. Note that you don't have to call this directly
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1287
instead use 'dis'.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1288
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1289
<dt>where</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1290
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1291
prints Java stack trace for all Java threads
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1292
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1293
</dl>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1294
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1295
<h4>Miscellaneous</h4>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1296
<dl>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1297
<dt>addr2oop(addr)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1298
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1299
converts a given address to a Oop object
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1300
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1301
<dt>oop2addr(oop)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1302
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1303
returns address of a given Oop object
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1304
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1305
<dt>isOfVMType(addr, type)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1306
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1307
returns whether the given 'addr' points to a (C++) VM object of specified
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1308
type. type may be specified by SA Type object or string name of the type.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1309
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1310
<dt>newVMObject(addr)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1311
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1312
returns instance of SA object for a given address (similar to SA VirtualConstructor
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1313
interface).
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1314
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1315
<dt>vmobj2addr(vmobject)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1316
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1317
returns Address represented by a given SA VMObject
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1318
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1319
<dt>addr2vmobj(addr)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1320
<dd>same as newVMObject(addr)</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1321
<dt>whatis(addr)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1322
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1323
returns string description of given address (using SA FindPointer and guess type API).
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1324
<dt>isOop(addr)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1325
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1326
returns whether a given address is a valid Oop address or not
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1327
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1328
</dl>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1329
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1330
<h4>Moving b/w jsdb low level and high level interfaces</h4>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1331
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1332
<p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1333
Java objects of debuggee are represented by different script wrappers in high level
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1334
interface. In the low-level interface these are instances of SA Oop class or its'
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1335
subclass. To move b/w low-level and high-level interfaces the following functions may
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1336
be used
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1337
</p>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1338
<dl>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1339
<dt>oop2obj(oop)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1340
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1341
converts a given Oop object to a high-level wrapper object
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1342
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1343
<dt>obj2oop(obj)</dt>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1344
<dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1345
converts a jsdb high level wrapper to underlying Oop instance
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1346
</dd>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1347
</dl>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1348
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1349
<h3>JavaScript tips</h3>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1350
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1351
<ul>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1352
<li>to know properties, functions of any object, use the script
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1353
<pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1354
<core>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1355
for(i in object) { println(i); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1356
</code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1357
</pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1358
<li>to view the source code of any function, just type the name of
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1359
function in jsdb prompt
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1360
<li>to view global functions, properties, run
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1361
<pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1362
<code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1363
for(i in this) { println(i); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1364
</code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1365
</pre>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1366
</ul>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1367
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1368
</body>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1369
</html>