This is the mail archive of the frysk-cvs@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[SCM] master: Check for no arguments in breakpoint and load commands


The branch, master has been updated
       via  168572cc6fd3eb7cefd56f110bdafe8348c253e2 (commit)
      from  3429ca4a01bdd6da988de7228fd46c7846dc91e7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 168572cc6fd3eb7cefd56f110bdafe8348c253e2
Author: Tim Moore <timoore@redhat.com>
Date:   Thu Jan 3 11:46:49 2008 +0100

    Check for no arguments in breakpoint and load commands
    
    This fixes bugzilla 5499.
    
    frysk-core/frysk/hpd/ChangeLog:
    2008-01-03  Tim Moore  <timoore@redhat.com>
    
    	* BreakpointCommand.java (interpret): Throw error if no arguments
    	are supplied.
    	* LoadCommand.java (interpret): ditto

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/hpd/BreakpointCommand.java |    4 ++++
 frysk-core/frysk/hpd/ChangeLog              |    6 ++++++
 frysk-core/frysk/hpd/LoadCommand.java       |    6 ++++--
 3 files changed, 14 insertions(+), 2 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/BreakpointCommand.java b/frysk-core/frysk/hpd/BreakpointCommand.java
index 928ab1d..832624f 100644
--- a/frysk-core/frysk/hpd/BreakpointCommand.java
+++ b/frysk-core/frysk/hpd/BreakpointCommand.java
@@ -86,6 +86,10 @@ class BreakpointCommand extends ParameterizedCommand {
     }
 
     void interpret(CLI cli, Input cmd, Object arguments) {
+        if (cmd.size() < 1) {
+            throw new InvalidCommandException
+                ("missing argument");
+        }
 	PTSet ptset = cli.getCommandPTSet(cmd);
 	String breakpt = cmd.parameter(0);
 	String fileName;
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index bb4d85c..0361312 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,3 +1,9 @@
+2008-01-03  Tim Moore  <timoore@redhat.com>
+    
+    	* BreakpointCommand.java (interpret): Throw error if no arguments
+    	are supplied.
+    	* LoadCommand.java (interpret): ditto
+	
 2008-01-02  Rick Moseley  <rmoseley@redhat.com>
 
 	* RunCommand.java: Run to breakpoint instead of first instruction.
diff --git a/frysk-core/frysk/hpd/LoadCommand.java b/frysk-core/frysk/hpd/LoadCommand.java
index 312c084..b330da9 100644
--- a/frysk-core/frysk/hpd/LoadCommand.java
+++ b/frysk-core/frysk/hpd/LoadCommand.java
@@ -66,8 +66,10 @@ public class LoadCommand extends ParameterizedCommand {
     public void interpret(CLI cli, Input cmd, Object options) {
 	if (cmd.size() > 2) {
 	    throw new InvalidCommandException("Too many parameters");
-	}
-
+	} else if (cmd.size() < 1) {
+            throw new InvalidCommandException("missing arguments");
+        }
+        
 	File executableFile = new File(cmd.parameter(0));
 
 	if (!executableFile.exists() || !executableFile.canRead()


hooks/post-receive
--
frysk system monitor/debugger


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]