# HG changeset patch # User Michael Van De Vanter # Date 1441070035 25200 # Node ID 64dcb0a9fabf0514a332b7060dfddc8bdd9a94d5 # Parent eaab173a0f443da7aafb64eb3286181ac17deedc Truffle/Debug REPL: more robust when execution halts at an unlocatable source diff -r eaab173a0f44 -r 64dcb0a9fabf truffle/com.oracle.truffle.tools.debug.shell/src/com/oracle/truffle/tools/debug/shell/client/SimpleREPLClient.java --- a/truffle/com.oracle.truffle.tools.debug.shell/src/com/oracle/truffle/tools/debug/shell/client/SimpleREPLClient.java Fri Aug 28 14:39:46 2015 -0700 +++ b/truffle/com.oracle.truffle.tools.debug.shell/src/com/oracle/truffle/tools/debug/shell/client/SimpleREPLClient.java Mon Aug 31 18:13:55 2015 -0700 @@ -233,9 +233,11 @@ // Information about where the execution is halted /** The source where execution, if any, is halted; null if none. */ - private Source haltedSource = null; + private Source haltedSource; /** The line number where execution, if any, is halted; 0 if none. */ private int haltedLineNumber = 0; + /** The name of a source that we can't locate. */ + private String unknownSourceName = ""; /** The stack where execution, if any, is halted; null if none. Evaluated lazily. */ private List frames = null; @@ -263,6 +265,7 @@ } catch (IOException e1) { this.haltedSource = null; this.haltedLineNumber = 0; + this.unknownSourceName = message.get(REPLMessage.SOURCE_NAME); } } updatePrompt(); @@ -400,7 +403,7 @@ whereLineNumber = frame.locationLineNumber(); } if (whereSource == null) { - displayFailReply("Frame " + selectedFrameNumber + ": source unavailable"); + displayFailReply("Unavalable source=\"" + this.unknownSourceName + "\""); return; } final int listSize = listSizeOption.getInt();