Fix debugging frames which don't have a pathname (Alan Ruttenberg)

Some frames don't have file names, which was leading to a null pointer
exception when a string was made for the (null) pathname.

Merges <https://github.com/armedbear/abcl/pull/15/files>.

Closes <http://abcl.org/trac/ticket/429>,
<https://github.com/armedbear/abcl/issues/20>.
parent 20e52cf9
......@@ -83,6 +83,7 @@ public class JavaStackFrame
public LispObject toLispList()
{
LispObject result = Lisp.NIL;
String fileName;
if ( javaFrame == null)
return result;
......@@ -92,7 +93,11 @@ public class JavaStackFrame
result = result.push(METHOD);
result = result.push(new SimpleString(javaFrame.getMethodName()));
result = result.push(FILE);
result = result.push(new SimpleString(javaFrame.getFileName()));
fileName=javaFrame.getFileName();
if (fileName == null)
{ result.push(new SimpleString("(Unkown source)")) ; }
else
{ result = result.push(new SimpleString(fileName)) ; }
result = result.push(LINE);
result = result.push(Fixnum.getInstance(javaFrame.getLineNumber()));
if (javaFrame.isNativeMethod()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment