comparison truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/package-info.java @ 22050:7a5b874b8d12

Fix checkstyle problems
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Thu, 30 Jul 2015 17:12:08 -0700
parents 02e4cf046653
children c0d4ec7e69c0
comparison
equal deleted inserted replaced
22049:6dd4ab4d76d3 22050:7a5b874b8d12
28 * is inherently capable to run in debugging mode - there is just one thing 28 * is inherently capable to run in debugging mode - there is just one thing
29 * to do - the {@link com.oracle.truffle.api.vm.TruffleVM.Builder creator of the virtual machine} 29 * to do - the {@link com.oracle.truffle.api.vm.TruffleVM.Builder creator of the virtual machine}
30 * needs to turn debugging on when constructing its Truffle virtual machine: 30 * needs to turn debugging on when constructing its Truffle virtual machine:
31 * <pre> 31 * <pre>
32 * vm = {@link com.oracle.truffle.api.vm.TruffleVM#newVM()}. 32 * vm = {@link com.oracle.truffle.api.vm.TruffleVM#newVM()}.
33 * {@link com.oracle.truffle.api.vm.TruffleVM.Builder#onEvent(com.oracle.truffle.api.vm.EventConsumer) onEvent}(<b>new</b> {@link com.oracle.truffle.api.vm.EventConsumer EventConsumer}{@code <}{@link com.oracle.truffle.api.debug.ExecutionEvent}{@code >}() { 33 * {@link com.oracle.truffle.api.vm.TruffleVM.Builder#onEvent(com.oracle.truffle.api.vm.EventConsumer) onEvent}(<b>new</b> {@link com.oracle.truffle.api.vm.EventConsumer EventConsumer}
34 * {@code <}{@link com.oracle.truffle.api.debug.ExecutionEvent}{@code >}() {
34 * <b>public void</b> handle({@link com.oracle.truffle.api.debug.ExecutionEvent} ev) { 35 * <b>public void</b> handle({@link com.oracle.truffle.api.debug.ExecutionEvent} ev) {
35 * <em>// configure the virtual machine as {@link com.oracle.truffle.api.vm.TruffleVM#eval(java.net.URI) new execution} is starting</em> 36 * <em>// configure the virtual machine as {@link com.oracle.truffle.api.vm.TruffleVM#eval(java.net.URI) new execution} is starting</em>
36 * } 37 * }
37 * }). 38 * }).
38 * {@link com.oracle.truffle.api.vm.TruffleVM.Builder#onEvent(com.oracle.truffle.api.vm.EventConsumer) onEvent}(<b>new</b> {@link com.oracle.truffle.api.vm.EventConsumer EventConsumer}{@code <}{@link com.oracle.truffle.api.debug.SuspendedEvent}{@code >}() { 39 * {@link com.oracle.truffle.api.vm.TruffleVM.Builder#onEvent(com.oracle.truffle.api.vm.EventConsumer) onEvent}(<b>new</b> {@link com.oracle.truffle.api.vm.EventConsumer EventConsumer}{@code <}
40 * {@link com.oracle.truffle.api.debug.SuspendedEvent}{@code >}() {
39 * <b>public void</b> handle({@link com.oracle.truffle.api.debug.SuspendedEvent} ev) { 41 * <b>public void</b> handle({@link com.oracle.truffle.api.debug.SuspendedEvent} ev) {
40 * <em>// execution is suspended on a breakpoint or on a step - decide what next</em> 42 * <em>// execution is suspended on a breakpoint or on a step - decide what next</em>
41 * } 43 * }
42 * }).{@link com.oracle.truffle.api.vm.TruffleVM.Builder#build() build()}; 44 * }).{@link com.oracle.truffle.api.vm.TruffleVM.Builder#build() build()};
43 * </pre> 45 * </pre>
44 * The debugging is controlled by events emitted by the Truffle virtual machine 46 * The debugging is controlled by events emitted by the Truffle virtual machine
45 * at important moments. The {@link com.oracle.truffle.api.debug.ExecutionEvent} 47 * at important moments. The {@link com.oracle.truffle.api.debug.ExecutionEvent}
46 * is sent when a call to {@link com.oracle.truffle.api.vm.TruffleVM#eval(java.net.URI) eval(...)} 48 * is sent when a call to {@link com.oracle.truffle.api.vm.TruffleVM#eval(java.net.URI) eval(...)}
47 * is made and allows one to configure {@link com.oracle.truffle.api.debug.Breakpoint breakpoints} and/or decide whether the 49 * is made and allows one to configure {@link com.oracle.truffle.api.debug.Breakpoint breakpoints} and/or decide whether the
48 * program should {@link com.oracle.truffle.api.debug.ExecutionEvent#prepareStepInto() step-into} or 50 * program should {@link com.oracle.truffle.api.debug.ExecutionEvent#prepareStepInto() step-into} or
49 * {@link com.oracle.truffle.api.debug.ExecutionEvent#prepareContinue() just run}. Once the execution is suspended a 51 * {@link com.oracle.truffle.api.debug.ExecutionEvent#prepareContinue() just run}. Once the execution is suspended a
50 * {@link com.oracle.truffle.api.debug.SuspendedEvent} is generated which 52 * {@link com.oracle.truffle.api.debug.SuspendedEvent} is generated which
51 * allows one to inspect the stack and choose the further execution mode 53 * allows one to inspect the stack and choose the further execution mode
52 * ({@link com.oracle.truffle.api.debug.SuspendedEvent#prepareStepInto(int) step-into}, {@link com.oracle.truffle.api.debug.SuspendedEvent#prepareStepOver(int) step-over}, {@link com.oracle.truffle.api.debug.SuspendedEvent#prepareStepOut() step-out}, {@link com.oracle.truffle.api.debug.SuspendedEvent#prepareContinue() continue}). 54 * ({@link com.oracle.truffle.api.debug.SuspendedEvent#prepareStepInto(int) step-into}, {@link com.oracle.truffle.api.debug.SuspendedEvent#prepareStepOver(int) step-over},
55 * {@link com.oracle.truffle.api.debug.SuspendedEvent#prepareStepOut() step-out}, {@link com.oracle.truffle.api.debug.SuspendedEvent#prepareContinue() continue}).
53 * <p> 56 * <p>
54 * The events methods are only available when the event is being delivered and 57 * The events methods are only available when the event is being delivered and
55 * shouldn't be used anytime later. Both events however provide access to 58 * shouldn't be used anytime later. Both events however provide access to
56 * {@link com.oracle.truffle.api.debug.Debugger} which can be kept and used 59 * {@link com.oracle.truffle.api.debug.Debugger} which can be kept and used
57 * during whole existence of the {@link com.oracle.truffle.api.vm.TruffleVM}. 60 * during whole existence of the {@link com.oracle.truffle.api.vm.TruffleVM}.
58 * {@link com.oracle.truffle.api.debug.Debugger} is the central class that 61 * {@link com.oracle.truffle.api.debug.Debugger} is the central class that
59 * keeps information about {@link com.oracle.truffle.api.debug.Debugger#getBreakpoints() registered breakpoints} 62 * keeps information about {@link com.oracle.truffle.api.debug.Debugger#getBreakpoints() registered breakpoints}
60 * and allows one create new {@link com.oracle.truffle.api.debug.Breakpoint ones}. 63 * and allows one create new {@link com.oracle.truffle.api.debug.Breakpoint ones}.
61 * 64 *
62 * <h4>Turning on Stepping Mode</h4> 65 * <h4>Turning on Stepping Mode</h4>
63 * 66 *
64 * In case you want your execution to pause on first statement, register for 67 * In case you want your execution to pause on first statement, register for
65 * {@link com.oracle.truffle.api.debug.ExecutionEvent} and once delivered 68 * {@link com.oracle.truffle.api.debug.ExecutionEvent} and once delivered
66 * call {@link com.oracle.truffle.api.debug.ExecutionEvent#prepareStepInto()}. 69 * call {@link com.oracle.truffle.api.debug.ExecutionEvent#prepareStepInto()}.
67 * 70 *
68 * <h4>Register a {@link com.oracle.truffle.api.debug.Breakpoint}</h4> 71 * <h4>Register a {@link com.oracle.truffle.api.debug.Breakpoint}</h4>
69 * 72 *
70 * Wait for execution to be started - which generates an 73 * Wait for execution to be started - which generates an
71 * {@link com.oracle.truffle.api.debug.ExecutionEvent}. Use its 74 * {@link com.oracle.truffle.api.debug.ExecutionEvent}. Use its
72 * {@link com.oracle.truffle.api.debug.Debugger ev.getDebugger}() 75 * {@link com.oracle.truffle.api.debug.Debugger ev.getDebugger}()
73 * methods to submit breakpoints. 76 * methods to submit breakpoints.
74 */ 77 */