public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Check for no arguments in breakpoint and load commands
@ 2008-01-03 10:54 moore
  0 siblings, 0 replies; only message in thread
From: moore @ 2008-01-03 10:54 UTC (permalink / raw)
  To: frysk-cvs

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-03 10:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-03 10:54 [SCM] master: Check for no arguments in breakpoint and load commands moore

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).