--- frysk-0.0.1.2008.01.18.rh1/frysk-gui/frysk/gui/srcwin/SourceWindow.java.line-npe 2008-01-18 11:44:37.000000000 -0500
+++ frysk-0.0.1.2008.01.18.rh1/frysk-gui/frysk/gui/srcwin/SourceWindow.java 2008-01-18 11:56:55.000000000 -0500
@@ -2254,7 +2254,7 @@
DOMSource source = null;
LineXXX line = sf.getLineXXX();
- if (line != SourceLocation.UNKNOWN) {
+ if (sf.getLine() != SourceLocation.UNKNOWN) {
if (line.getDOMFunction() == null)
noDOMFunction = true;
source = line.getDOMSource();
@@ -2267,9 +2267,9 @@
}
}
- if (line == SourceLocation.UNKNOWN)
+ if (sf.getLine() == SourceLocation.UNKNOWN)
setSourceLabel("Unknown File for: ", task_name, proc_id, task_id, noDOMFunction, source);
- else if (source == null && line != SourceLocation.UNKNOWN)
+ else if (source == null && sf.getLine() != SourceLocation.UNKNOWN)
setSourceLabel(sf.getLine().getFile().getPath() + " for: ",
task_name, proc_id, task_id, noDOMFunction, source);
else
@@ -2306,7 +2306,7 @@
updateSourceLabel(selected);
- if (line != SourceLocation.UNKNOWN) {
+ if (selected.getLine() != SourceLocation.UNKNOWN) {
source = line.getDOMSource();
if (source == null)
try {
@@ -2318,7 +2318,7 @@
}
}
- if (line == SourceLocation.UNKNOWN) {
+ if (selected.getLine() == SourceLocation.UNKNOWN) {
SourceBuffer b = null;
if (mode == 2)
--- frysk-0.0.1.2008.01.18.rh1/frysk-core/frysk/rt/LineXXX.java.line-npe 2008-01-18 11:47:02.000000000 -0500
+++ frysk-0.0.1.2008.01.18.rh1/frysk-core/frysk/rt/LineXXX.java 2008-01-18 11:53:01.000000000 -0500
@@ -1,6 +1,6 @@
// This file is part of the program FRYSK.
//
-// Copyright 2007, Red Hat Inc.
+// Copyright 2007, 2008, Red Hat Inc.
//
// FRYSK is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@
package frysk.rt;
import java.io.IOException;
-
+import java.io.File;
import frysk.dom.DOMFactory;
import frysk.dom.DOMFrysk;
import frysk.dom.DOMFunction;
@@ -49,17 +49,36 @@
import frysk.proc.Proc;
import frysk.scopes.SourceLocation;
-public class LineXXX extends SourceLocation{
-
-
+public class LineXXX {
+ private final SourceLocation sourceLocation;
private final Proc proc;
-
private DOMSource source;
-
private DOMFunction function;
+ private final File file;
+ private final int line;
+ private final int column;
+
+ public File getFile () {
+ return file;
+ }
+
+ public int getLine () {
+ return line;
+ }
+
+ public int getColumn () {
+ return column;
+ }
+
+ public SourceLocation getSourceLocation() {
+ return sourceLocation;
+ }
public LineXXX(SourceLocation sourceLocation, Proc proc) {
- super(sourceLocation.getFile(), sourceLocation.getLine(), sourceLocation.getColumn());
+ this.sourceLocation = sourceLocation;
+ this.file = sourceLocation.getFile();
+ this.line = sourceLocation.getLine();
+ this.column = sourceLocation.getColumn();
this.proc = proc;
}
@@ -88,7 +107,7 @@
// source has not been parsed, go put it in the DOM and
// parse it
try {
- this.source = image.addSource(this.proc, this,
+ this.source = image.addSource(this.proc, this.sourceLocation,
DOMFactory.getDOM(this.proc));
} catch (IOException ioe) {
System.err.println(ioe.getMessage());
--- frysk-0.0.1.2008.01.18.rh1/frysk-core/frysk/debuginfo/DebugInfoFrame.java.line-npe 2008-01-18 11:42:06.000000000 -0500
+++ frysk-0.0.1.2008.01.18.rh1/frysk-core/frysk/debuginfo/DebugInfoFrame.java 2008-01-18 11:43:16.000000000 -0500
@@ -1,6 +1,6 @@
// This file is part of the program FRYSK.
//
-// Copyright 2007, Red Hat Inc.
+// Copyright 2007, 2008, Red Hat Inc.
//
// FRYSK is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
@@ -208,12 +208,13 @@
* @return
*/
public LineXXX getLineXXX(){
- if(this.lineXXX == null){
+ if (this.getLine() == SourceLocation.UNKNOWN)
+ return null;
+ if (this.lineXXX == null)
this.lineXXX = new LineXXX(this.getLine(), this.getTask().getProc());
- }
return lineXXX;
}
- LineXXX lineXXX;
+ private LineXXX lineXXX;
public void toPrint(PrintWriter writer, boolean printParameters,
boolean fullpath){