This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] patch for review of PR gdb/10462
- From: mbilal <mbilal at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Tue, 16 Apr 2013 16:51:12 +0500
- Subject: [patch] patch for review of PR gdb/10462
Hi,
please find attached, proposed patch for PR gdb/10462
that is, argument must be preceded by space.
Thanks,
-Bilal
Index: cli/cli-decode.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-decode.c,v
retrieving revision 1.118
diff -u -p -r1.118 cli-decode.c
--- cli/cli-decode.c 10 Apr 2013 15:11:12 -0000 1.118
+++ cli/cli-decode.c 16 Apr 2013 11:49:40 -0000
@@ -1556,6 +1556,9 @@ lookup_cmd (const char **line, struct cm
}
else
{
+ if (strlen(*line) != 0 && c->type == set_cmd && **line != ' ' )
+ error (_("Argument must be preceded by space."));
+
/* We've got something. It may still not be what the caller
wants (if this command *needs* a subcommand). */
while (**line == ' ' || **line == '\t')
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.15421
diff -u -p -r1.15421 ChangeLog
--- ChangeLog 15 Apr 2013 23:53:37 -0000 1.15421
+++ ChangeLog 16 Apr 2013 11:45:38 -0000
@@ -1,3 +1,8 @@
+2013-04-16 Muhammad Bilal <mbilal@codesourcery.com>
+
+ PR gdb/10462
+ * cli/cli-decode.c (lookup_command): Checked a space before argument.
+
2013-04-15 Doug Evans <dje@google.com>
* dwarf2read.c (struct dwo_file): Replace member "cus" with "cu".