Mercurial > hg > truffle
diff truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/LineBreakpoint.java @ 22448:1c3deda60a9e
Truffle/Debugging: the REPL debugger now remembers breakpoint requests it receives from the command line client when there have been no executions yet (which means breakpoints cannot be set in the engine/debugger). When the first execution event arrives (with a reference to the Debugger), any "pending" breakpoints are created with the Debugger. This involved a bit of refactoring on the Breakpoint class hierarchy.
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Wed, 04 Nov 2015 16:33:40 -0800 |
parents | 0d36601f233e |
children | c04f6f51b9bf |
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/LineBreakpoint.java Tue Oct 27 17:44:27 2015 -0700 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/LineBreakpoint.java Wed Nov 04 16:33:40 2015 -0800 @@ -31,16 +31,25 @@ * * @see Debugger */ -abstract class LineBreakpoint extends Breakpoint { +public abstract class LineBreakpoint extends Breakpoint { + + private final LineLocation lineLocation; - LineBreakpoint(State state, int ignoreCount, boolean isOneShot) { + protected LineBreakpoint(State state, LineLocation lineLocation, int ignoreCount, boolean isOneShot) { super(state, ignoreCount, isOneShot); + this.lineLocation = lineLocation; } /** * Gets the {@linkplain LineLocation source line location} that specifies where this breakpoint * will trigger. */ - public abstract LineLocation getLineLocation(); + public final LineLocation getLineLocation() { + return lineLocation; + } + @Override + public String getLocationDescription() { + return "Line: " + lineLocation.getShortDescription(); + } }