NonStop Server for Java 7.0 Programmer's Reference
To debug native code, wait until the DLL is loaded. Visual Inspect allows you to stop the program
after the DLL is loaded so that you can set breakpoints. For information on how to set the breakpoints,
see Native Inspect Manual.
You can view and debug the native routine to be debugged and other native routines that routine
calls. All other scopes above the native routine are either compiled or interpreted Java code, which
the inspect debugger has no knowledge about. For more information on debugging, see “Debugging
Java process” (page 99).
Using visual inspect to add an event breakpoint on DLL open event
Since Visual Inspect does not support deferred breakpoints, you need to ensure that a DLL is loaded
before setting a breakpoint. Visual Inspect supports the DLL open event breakpoint that suspends
the program just after a DLL is loaded, but before initialization routines are invoked.
Perform the following to add an event breakpoint on DLL open event:
1. In Visual Inspect, select View > Breakpoints in Application or Program Control view.
2. Click the Event tab.
3. Click Add Breakpoint and select DLL Open from Event Name menu.
4. Click Ok.
Debugging Java and JNI code
You can use the Native Inspect debugger tool to debug the native code and Java Debugger tool
to debug the Java code simultaneously. You need to start the Java debuggee process in a debugger.
For example, type the following command:
run -debug java -Xdebug -Xnoagent -agentlib:jdwp=sub-options
You can then use the Java Debugger tool to communicate with the debuggee process as explained
in “Debugging overview” (page 47).
Deviations in JVM specification options
The compiler specification options for both the java and jdb tools deviate from standard Java
because NSJ7 implements only the HotSpot server VM and does not implement a client VM.
Accordingly, the options that specify running the client VM are not valid.
java: Java application launcher command-line option deviations
-client
Selects the Java HotSpot Client virtual machine (VM).
NOTE: The -client option is not valid with NSJ7.
-server
Selects the Java HotSpot Server virtual machine (VM).
NOTE: The -server is the default option for NSJ7. Hence, specifying -server
is optional.
For more information about the java tool and additional deviations from standard Java, see
“Implementation of garbage collector types” (page 53) and java in the NonStop Java 7.0 Tools
Reference Pages.
jdb: Java debugger command-line option deviations
-tclient
Runs the application in the Java HotSpot client VM.
50 Implementation specifics










