annotate agent/doc/jsdb.html @ 17587:561045d22599 jdk8u11-b07

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