annotate graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/debug/RubyProbe.java @ 13569:1894412de0ed

Ruby: major upgrade in debugging support, mainly for navigation: step, next (passing over calls), return (from enclosing function), etc. Also a few bug fixes.
author Michael Van De Vanter <michael.van.de.vanter@oracle.com>
date Wed, 08 Jan 2014 14:03:36 -0800
parents 0fbee3eb71f0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13514
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
1 /*
13569
1894412de0ed Ruby: major upgrade in debugging support, mainly for navigation: step, next (passing over calls), return (from enclosing function), etc. Also a few bug fixes.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 13514
diff changeset
2 * Copyright (c) 2013, 2014 Oracle and/or its affiliates. All rights reserved. This
13514
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
3 * code is released under a tri EPL/GPL/LGPL license. You can use it,
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
4 * redistribute it and/or modify it under the terms of the:
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
5 *
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
6 * Eclipse Public License version 1.0
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
7 * GNU General Public License version 2
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
8 * GNU Lesser General Public License version 2.1
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
9 */
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
10 package com.oracle.truffle.ruby.runtime.debug;
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
11
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
12 import com.oracle.truffle.api.nodes.instrument.*;
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
13 import com.oracle.truffle.ruby.runtime.*;
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
14
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
15 /**
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
16 * A "probe node" implemented specifically for the Ruby implementation; subclasses need only
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
17 * override those members of {@link InstrumentationProbeEvents} for which some action is needed.
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
18 */
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
19 public abstract class RubyProbe extends InstrumentationProbeNode.DefaultProbeNode {
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
20
13569
1894412de0ed Ruby: major upgrade in debugging support, mainly for navigation: step, next (passing over calls), return (from enclosing function), etc. Also a few bug fixes.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 13514
diff changeset
21 protected final boolean oneShot;
1894412de0ed Ruby: major upgrade in debugging support, mainly for navigation: step, next (passing over calls), return (from enclosing function), etc. Also a few bug fixes.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 13514
diff changeset
22
13514
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
23 protected final RubyContext context;
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
24
13569
1894412de0ed Ruby: major upgrade in debugging support, mainly for navigation: step, next (passing over calls), return (from enclosing function), etc. Also a few bug fixes.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 13514
diff changeset
25 /**
1894412de0ed Ruby: major upgrade in debugging support, mainly for navigation: step, next (passing over calls), return (from enclosing function), etc. Also a few bug fixes.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 13514
diff changeset
26 * OneShot is this a one-shot (self-removing) probe?
1894412de0ed Ruby: major upgrade in debugging support, mainly for navigation: step, next (passing over calls), return (from enclosing function), etc. Also a few bug fixes.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 13514
diff changeset
27 */
1894412de0ed Ruby: major upgrade in debugging support, mainly for navigation: step, next (passing over calls), return (from enclosing function), etc. Also a few bug fixes.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 13514
diff changeset
28 public RubyProbe(RubyContext context, boolean oneShot) {
1894412de0ed Ruby: major upgrade in debugging support, mainly for navigation: step, next (passing over calls), return (from enclosing function), etc. Also a few bug fixes.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 13514
diff changeset
29 super(context);
1894412de0ed Ruby: major upgrade in debugging support, mainly for navigation: step, next (passing over calls), return (from enclosing function), etc. Also a few bug fixes.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 13514
diff changeset
30 this.oneShot = oneShot;
13514
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
31 this.context = context;
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
32 }
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
33
13569
1894412de0ed Ruby: major upgrade in debugging support, mainly for navigation: step, next (passing over calls), return (from enclosing function), etc. Also a few bug fixes.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 13514
diff changeset
34 /**
1894412de0ed Ruby: major upgrade in debugging support, mainly for navigation: step, next (passing over calls), return (from enclosing function), etc. Also a few bug fixes.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 13514
diff changeset
35 * Is this a one-shot (self-removing) probe? If so, it will remove itself the first time
1894412de0ed Ruby: major upgrade in debugging support, mainly for navigation: step, next (passing over calls), return (from enclosing function), etc. Also a few bug fixes.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 13514
diff changeset
36 * activated.
1894412de0ed Ruby: major upgrade in debugging support, mainly for navigation: step, next (passing over calls), return (from enclosing function), etc. Also a few bug fixes.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 13514
diff changeset
37 */
1894412de0ed Ruby: major upgrade in debugging support, mainly for navigation: step, next (passing over calls), return (from enclosing function), etc. Also a few bug fixes.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 13514
diff changeset
38 public boolean isOneShot() {
1894412de0ed Ruby: major upgrade in debugging support, mainly for navigation: step, next (passing over calls), return (from enclosing function), etc. Also a few bug fixes.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 13514
diff changeset
39 return oneShot;
13514
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
40 }
0fbee3eb71f0 Ruby: import project.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff changeset
41 }