This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix PR gdb/17035: "show user" doesn't list user-defined commands that have empty bodies.
- From: Pedro Alves <palves at redhat dot com>
- To: Gabriel Krisman Bertazi <gabriel at krisman dot be>, gdb-patches at sourceware dot org
- Date: Thu, 21 Aug 2014 16:52:56 +0100
- Subject: Re: [PATCH] Fix PR gdb/17035: "show user" doesn't list user-defined commands that have empty bodies.
- Authentication-results: sourceware.org; auth=none
- References: <1408515134-31165-1-git-send-email-gabriel at krisman dot be>
Hi Gabriel,
Thanks for the patch!
On 08/20/2014 07:12 AM, Gabriel Krisman Bertazi wrote:
> c = lookup_cmd (&comname, cmdlist, "", 0, 1);
> - /* c->user_commands would be NULL if it's a python/scheme command. */
> - if (c->class != class_user || !c->user_commands)
> - error (_("Not a user command."));
> + if (c->class != class_user)
> + error (_("Not a user command."));
Doesn't this mean this reverts part of 7d74f2446, and thus now we'd
show python/scheme commands?
IIUC 7d74f2446, it looks like gdb.python/py-cmd.exp is missing
a test that makes sure "show user" doesn't list the user-defined python command.
(hmm, this "show user" vs "help user-defined" difference isn't very
intuitive)
> --- a/gdb/testsuite/gdb.base/default.exp
> +++ b/gdb/testsuite/gdb.base/default.exp
> @@ -693,7 +693,7 @@ gdb_test "show prompt" "Gdb's prompt is \"$gdb_prompt \".*" "show prompt"
> #test show radix
> gdb_test "show radix" "Input and output radices set to decimal 10, hex a, octal 12." "show radix"
> #test show user
> -gdb_test_no_output "show user" "show user"
> +gdb_test "show user" "User command \"user-defined\".*" "show user"
> #test show values
What is this printing now ?
Thanks,
Pedro Alves