public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: moore@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Check for no arguments in breakpoint and load commands Date: Thu, 03 Jan 2008 10:54:00 -0000 [thread overview] Message-ID: <20080103105455.24887.qmail@sourceware.org> (raw) 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
reply other threads:[~2008-01-03 10:54 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=20080103105455.24887.qmail@sourceware.org \ --to=moore@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: linkBe 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).