From: mbilal <mbilal@codesourcery.com>
To: <palves@redhat.com>, <hafiz_abid@mentor.com>
Cc: <gdb-patches@sourceware.org>, <tromey@redhat.com>, <schwab@suse.de>
Subject: Re: [patch] patch for review of PR gdb/10462
Date: Wed, 17 Apr 2013 16:49:00 -0000 [thread overview]
Message-ID: <516E9561.8090102@codesourcery.com> (raw)
In-Reply-To: <516E67FE.5070301@codesourcery.com>
[-- Attachment #1: Type: text/plain, Size: 393 bytes --]
On Wednesday, April 17, 2013 2:40 PM Abid, Hafiz wrote:
>I think you can break this line so that it does not go over 80 columns.
fixed.
On Wednesday, April 17, 2013 4:02 PM Pedro Alves wrote:
>How about putting the 'line' tests together?
fixed.
>I think it'd be good to test the reported case of using = instead of
space too.
fixed.
find attached updated patch.
Thanks,
-Bilal
[-- Attachment #2: PR10462.diff --]
[-- Type: text/x-patch, Size: 2568 bytes --]
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 17 Apr 2013 12:16:37 -0000
@@ -1556,6 +1556,9 @@ lookup_cmd (const char **line, struct cm
}
else
{
+ if (c->type == set_cmd && **line != '\0' && !isspace (**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.15428
diff -u -p -r1.15428 ChangeLog
--- ChangeLog 17 Apr 2013 01:02:01 -0000 1.15428
+++ ChangeLog 17 Apr 2013 08:13:56 -0000
@@ -1,3 +1,9 @@
+2013-04-17 Muhammad Bilal <mbilal@codesourcery.com>
+
+ PR gdb/10462
+ * cli/cli-decode.c (lookup_command): Show an error if there is no space
+ before argument.
+
2013-04-17 Yao Qi <yao@codesourcery.com>
* top.c (print_gdb_configuration): Print configure-time
Index: gdb.base/default.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/default.exp,v
retrieving revision 1.64
diff -u -p -r1.64 default.exp
--- gdb.base/default.exp 15 Apr 2013 18:09:02 -0000 1.64
+++ gdb.base/default.exp 17 Apr 2013 12:18:38 -0000
@@ -847,6 +847,13 @@ gdb_test "whatis" "The history is empty.
gdb_test "where" "No stack." "where"
#test x
gdb_test "x" "Argument required .starting display address.*" "x"
+#test argument must be preceded by space
+foreach x {"history file" "solib-search-path" "data-directory"} {
+ foreach y {"/home/" "." "~/home" "=home"} {
+ gdb_test "set $x$y" "Argument must be preceded by space." \
+ "check space before argument"
+ }
+}
gdb_exit
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/ChangeLog,v
retrieving revision 1.3628
diff -u -p -r1.3628 ChangeLog
--- ChangeLog 15 Apr 2013 20:37:36 -0000 1.3628
+++ ChangeLog 17 Apr 2013 08:23:11 -0000
@@ -1,3 +1,8 @@
+2013-04-17 Muhammad Bilal <mbilal@codesourcery.com>
+
+ PR gdb/10462
+ * gdb.base/default.exp: Add test case.
+
2013-04-15 Siva Chandra Reddy <sivachandra@google.com>
Add option to link testcases with Pthreads library when
next prev parent reply other threads:[~2013-04-17 12:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-16 15:45 mbilal
2013-04-16 15:45 ` Abid, Hafiz
2013-04-16 20:50 ` Tom Tromey
2013-04-17 14:52 ` Andreas Schwab
2013-04-17 15:48 ` mbilal
2013-04-17 15:53 ` Abid, Hafiz
2013-04-17 16:06 ` Pedro Alves
2013-04-17 16:49 ` mbilal [this message]
2013-04-17 17:02 ` Pedro Alves
[not found] <516EB58F.2090603@codesourcery.com>
2013-04-17 17:25 ` mbilal
2013-04-17 20:34 ` Pedro Alves
2013-04-24 18:23 ` mbilal
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=516E9561.8090102@codesourcery.com \
--to=mbilal@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=hafiz_abid@mentor.com \
--cc=palves@redhat.com \
--cc=schwab@suse.de \
--cc=tromey@redhat.com \
/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