public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
From: swagiaal@sourceware.org
To: frysk-cvs@sourceware.org
Subject: [SCM] master: swagiaal: DeclarationSearchEngine throws an exception when an object is not found
Date: Tue, 20 Nov 2007 20:01:00 -0000 [thread overview]
Message-ID: <20071120200059.6105.qmail@sourceware.org> (raw)
The branch, master has been updated
via f81881effcd7fc9c9d35bc20fbac346ca4eaa088 (commit)
via 3dc414b91a043a1692b7caec0e03ff9d2563eb0a (commit)
from 41b077c1832668f78e4a3e3503bf919ea6472ac6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit f81881effcd7fc9c9d35bc20fbac346ca4eaa088
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date: Tue Nov 20 14:46:48 2007 -0500
swagiaal: DeclarationSearchEngine throws an exception when an object is not found
frysk-core/frysk/debuginfo/ChangeLog
+2007-11-20 Sami Wagiaalla <swagiaal@redhat.com>
+
+ * ObjectDeclarationSearchEngine.java (getVariable): Now throws
+ ObjectDeclaratioinNotFoundException instead of returning null.
+ * TestObjectDeclarationSearchEngine.java (verifyVariable): Updated.
+ * ObjectDeclaratioinNotFoundException.java: New file.
+
commit 3dc414b91a043a1692b7caec0e03ff9d2563eb0a
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date: Tue Nov 20 14:10:05 2007 -0500
swagiaal: function parameter values are no longer printed
frysk-core/frysk/bindir/ChangeLog
+2007-11-20 Sami Wagiaalla <swagiaal@redhat.com>
+
+ * TestFstack.java (testBackTraceWithDashC): Removed check for
+ param values.
+ (testBackTraceWithDashA): Ditto.
+
frysk-core/frysk/scopes/ChangeLog
+2007-11-20 Sami Wagiaalla <swagiaal@redhat.com>
+
+ * Scope.java (toPrint): Added printing for variable
+ value.
+
frysk-core/frysk/value/ChangeLog
+2007-11-20 Sami Wagiaalla <swagiaal@redhat.com>
+
+ * Variable.java (toPrint): No longer prints variable values;
+ values must now be printed explicitly.
+ (printValue): Prints variable values.
+
-----------------------------------------------------------------------
Summary of changes:
frysk-core/frysk/bindir/ChangeLog | 6 ++++++
frysk-core/frysk/bindir/TestFstack.java | 4 ++--
frysk-core/frysk/debuginfo/ChangeLog | 7 +++++++
...va => ObjectDeclaratioinNotFoundException.java} | 7 ++++++-
.../debuginfo/ObjectDeclarationSearchEngine.java | 2 +-
.../TestObjectDeclarationSearchEngine.java | 10 ++++++++--
frysk-core/frysk/scopes/ChangeLog | 5 +++++
frysk-core/frysk/scopes/Scope.java | 2 ++
frysk-core/frysk/value/ChangeLog | 6 ++++++
frysk-core/frysk/value/Variable.java | 11 +++++------
10 files changed, 48 insertions(+), 12 deletions(-)
copy frysk-core/frysk/debuginfo/{ValueUavailableException.java => ObjectDeclaratioinNotFoundException.java} (92%)
First 500 lines of diff:
diff --git a/frysk-core/frysk/bindir/ChangeLog b/frysk-core/frysk/bindir/ChangeLog
index b936499..4dbced2 100644
--- a/frysk-core/frysk/bindir/ChangeLog
+++ b/frysk-core/frysk/bindir/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-20 Sami Wagiaalla <swagiaal@redhat.com>
+
+ * TestFstack.java (testBackTraceWithDashC): Removed check for
+ param values.
+ (testBackTraceWithDashA): Ditto.
+
2007-11-19 Phil Muldoon <pmuldoon@redhat.com>
* TestFhd.java (testHpdCore): Remove unresolved.
diff --git a/frysk-core/frysk/bindir/TestFstack.java b/frysk-core/frysk/bindir/TestFstack.java
index 58f1323..d45899d 100644
--- a/frysk-core/frysk/bindir/TestFstack.java
+++ b/frysk-core/frysk/bindir/TestFstack.java
@@ -115,7 +115,7 @@ public class TestFstack
public void testBackTraceWithDashA () {
Expect e = fstack("funit-stack-outlined", new String[] { "-a" });
- e.expect("\\#0 .* in third\\(int arg3 = 3\\)"
+ e.expect("\\#0 .* in third\\(int arg3\\)"
+ ".*" + Config.getRootSrcDir()
+ ".*" + "funit-stack-outlined" + "\\.c#"
+ ".*int var3.*");
@@ -124,7 +124,7 @@ public class TestFstack
public void testBackTraceWithDashC () {
Expect e = fstack("funit-stack-outlined", new String[] { "-c" });
- e.expect("\\#0 .* in third\\(int arg3 = 3\\)"
+ e.expect("\\#0 .* in third\\(int arg3\\)"
+ ".*" + Config.getRootSrcDir()
+ ".*" + "funit-stack-outlined" + "\\.c#");
e.expect("\\#1");
diff --git a/frysk-core/frysk/debuginfo/ChangeLog b/frysk-core/frysk/debuginfo/ChangeLog
index 511f81f..76f2ed8 100644
--- a/frysk-core/frysk/debuginfo/ChangeLog
+++ b/frysk-core/frysk/debuginfo/ChangeLog
@@ -1,3 +1,10 @@
+2007-11-20 Sami Wagiaalla <swagiaal@redhat.com>
+
+ * ObjectDeclarationSearchEngine.java (getVariable): Now throws
+ ObjectDeclaratioinNotFoundException instead of returning null.
+ * TestObjectDeclarationSearchEngine.java (verifyVariable): Updated.
+ * ObjectDeclaratioinNotFoundException.java: New file.
+
2007-11-19 Stan Cox <scox@redhat.com>
* TypeEntry.java (getType): Remove setTypedefFIXME from STRUCTURE_TYPE_.
diff --git a/frysk-core/frysk/debuginfo/ValueUavailableException.java b/frysk-core/frysk/debuginfo/ObjectDeclaratioinNotFoundException.java
similarity index 92%
copy from frysk-core/frysk/debuginfo/ValueUavailableException.java
copy to frysk-core/frysk/debuginfo/ObjectDeclaratioinNotFoundException.java
index 3b73bee..29df295 100644
--- a/frysk-core/frysk/debuginfo/ValueUavailableException.java
+++ b/frysk-core/frysk/debuginfo/ObjectDeclaratioinNotFoundException.java
@@ -39,11 +39,16 @@
package frysk.debuginfo;
-public class ValueUavailableException extends RuntimeException {
+public class ObjectDeclaratioinNotFoundException extends RuntimeException {
+
+ public ObjectDeclaratioinNotFoundException(String name) {
+ super("Object "+ name + " was not found");
+ }
/**
*
*/
private static final long serialVersionUID = 1L;
+
}
diff --git a/frysk-core/frysk/debuginfo/ObjectDeclarationSearchEngine.java b/frysk-core/frysk/debuginfo/ObjectDeclarationSearchEngine.java
index 62864b0..363569c 100644
--- a/frysk-core/frysk/debuginfo/ObjectDeclarationSearchEngine.java
+++ b/frysk-core/frysk/debuginfo/ObjectDeclarationSearchEngine.java
@@ -92,7 +92,7 @@ public class ObjectDeclarationSearchEngine implements ExprSymTab{
scope = scope.getOuter();
}
- return null;
+ throw new ObjectDeclaratioinNotFoundException(name);
}
public Type getType(Variable variable) {
diff --git a/frysk-core/frysk/debuginfo/TestObjectDeclarationSearchEngine.java b/frysk-core/frysk/debuginfo/TestObjectDeclarationSearchEngine.java
index b861250..804e8bd 100644
--- a/frysk-core/frysk/debuginfo/TestObjectDeclarationSearchEngine.java
+++ b/frysk-core/frysk/debuginfo/TestObjectDeclarationSearchEngine.java
@@ -166,8 +166,14 @@ public class TestObjectDeclarationSearchEngine extends TestLib{
assertTrue("Found the correct variable", variable.getLineNumber() == variableLine);
//Negative test:
- variable = (Variable) objectDeclarationSearchEngine.getVariable("NOT"+variableName);
- assertNull("Bogus object was not found", variable);
+ try {
+ variable = (Variable) objectDeclarationSearchEngine.getVariable("NOT"+variableName);
+ assertTrue("Exception was thrown", false);
+ } catch (ObjectDeclaratioinNotFoundException e) {
+ // exception was thrown
+ }
+
+
}
}
diff --git a/frysk-core/frysk/scopes/ChangeLog b/frysk-core/frysk/scopes/ChangeLog
index 499343f..2f114b5 100644
--- a/frysk-core/frysk/scopes/ChangeLog
+++ b/frysk-core/frysk/scopes/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-20 Sami Wagiaalla <swagiaal@redhat.com>
+
+ * Scope.java (toPrint): Added printing for variable
+ value.
+
2007-11-09 Sami Wagiaalla <swagiaal@redhat.com>
* Composite.java (getType): New function.
diff --git a/frysk-core/frysk/scopes/Scope.java b/frysk-core/frysk/scopes/Scope.java
index 0008ba4..d30d068 100644
--- a/frysk-core/frysk/scopes/Scope.java
+++ b/frysk-core/frysk/scopes/Scope.java
@@ -197,6 +197,8 @@ public class Scope
writer.println();
writer.print(indentString + " ");
variable.toPrint(writer, frame);
+ writer.print(" = ");
+ variable.printValue(writer, frame);
writer.print(" ");
variable.printLineCol(writer);
writer.flush();
diff --git a/frysk-core/frysk/value/ChangeLog b/frysk-core/frysk/value/ChangeLog
index a36eaef..da2438c 100644
--- a/frysk-core/frysk/value/ChangeLog
+++ b/frysk-core/frysk/value/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-20 Sami Wagiaalla <swagiaal@redhat.com>
+
+ * Variable.java (toPrint): No longer prints variable values;
+ values must now be printed explicitly.
+ (printValue): Prints variable values.
+
2007-11-19 Stan Cox <scox@redhat.com>
* Type.java (isTypedef): Delete.
diff --git a/frysk-core/frysk/value/Variable.java b/frysk-core/frysk/value/Variable.java
index 297eeca..c8050f6 100644
--- a/frysk-core/frysk/value/Variable.java
+++ b/frysk-core/frysk/value/Variable.java
@@ -51,10 +51,6 @@ import frysk.debuginfo.TypeEntry;
import frysk.debuginfo.ValueUavailableException;
import frysk.debuginfo.VariableOptimizedOutException;
import frysk.isa.ISA;
-import frysk.value.ObjectDeclaration;
-import frysk.value.Format;
-import frysk.value.Type;
-import frysk.value.Value;
/**
* This class contains the static information corresponding to a
@@ -109,7 +105,10 @@ public class Variable extends ObjectDeclaration{
type.toPrint(printWriter, 0);
printWriter.print(" ");
printWriter.print(this.getName());
- printWriter.print(" = ");
+
+ }
+
+ public void printValue(PrintWriter printWriter, DebugInfoFrame frame){
try {
Value value = getValue(frame);
value.toPrint(printWriter, frame.getTask().getMemory(),
@@ -122,7 +121,7 @@ public class Variable extends ObjectDeclaration{
printWriter.print("< ERROR >");
}
}
-
+
public void printLineCol(PrintWriter printWriter) {
printWriter.print("line#");
try {
hooks/post-receive
--
frysk system monitor/debugger
reply other threads:[~2007-11-20 20:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071120200059.6105.qmail@sourceware.org \
--to=swagiaal@sourceware.org \
--cc=frysk-cvs@sourceware.org \
--cc=frysk@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).