Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Gabriel Krisman Bertazi <gabriel@krisman.be>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix PR gdb/17035: "show user" doesn't list user-defined commands that have empty bodies.
Date: Fri, 05 Sep 2014 13:12:00 -0000	[thread overview]
Message-ID: <5409B6B2.9000202@redhat.com> (raw)
In-Reply-To: <87a96frxu5.fsf@anubis.Home>

On 09/04/2014 08:26 PM, Gabriel Krisman Bertazi wrote:
> Pedro Alves <palves@redhat.com> writes:
> 
>> Yeah.  Close now.  Only nits on the details.
> 
> Guess I fixed all the things you pointed out.

Excellent!

> 
>> cli_user_command_p (struct cmd_list_element *cmd)
> 
> I implemented that as well.  Thanks.
> 
> Updated patch below. :)

Thanks!

Ideally you'd send a 'git am'able patch, with commit log
in place too.  That is, treat the commit log as just
another part of the patch that gets updated/resent.

> 
> gdb/
> 2014-08-20  Gabriel Krisman Bertazi  <gabriel@krisman.be>
> 
> 	* cli/cli-cmds.c (show_user): Use cli_user_command_p to
> 	  decide whether we display the command on "show user".

Note that the "decide" should be indented with a tab only, under
the '*'.

> 	* cli/cli-script.c (show_user_1): Only verify cmdlines after
> 	  printing command name.
> 	* cli/cli-decode.h (cli_user_command_p): Declare new function.
> 	* cli/cli-decode.c (cli_user_command_p): Create helper function
> 	  to verify whether cmd_list_element is a user-defined command.
> 
> gdb/testsuite/
> 2014-08-20  Gabriel Krisman Bertazi  <gabriel@krisman.be>
> 
> 	* gdb.base/commands.exp: Add tests to verify user-defined
> 	  commands with empty bodies.
> 	* gdb.python/py-cmd.exp: Test that we don't show user-defined
> 	  python commands in `show user command`.
> 	* gdb.python/scm-cmd.exp: Test that we don't show user-defined
> 	  scheme commands in `show user command`.

Likewise everywhere else.

>  extern const char * const auto_boolean_enums[];
>
> +/* Verify whether a given cmd_list_element is a user-defined command.
> +   Return 1 if it is user-defined.  Return 0 otherwise.  */
> +
> +int cli_user_command_p (struct cmd_list_element *);

Note that every other declaration in the header uses explicit
"extern".  Please add that for consistency.  OK with these
little nits fixed.  Please push.

Thanks!

Pedro Alves


  parent reply	other threads:[~2014-09-05 13:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20  6:12 Gabriel Krisman Bertazi
2014-08-21 15:53 ` Pedro Alves
2014-08-23  2:27   ` Gabriel Krisman Bertazi
2014-08-27 11:56     ` Pedro Alves
2014-08-31 18:35       ` Gabriel Krisman Bertazi
2014-09-02 12:52         ` Pedro Alves
2014-09-04 19:26           ` Gabriel Krisman Bertazi
2014-09-04 19:57             ` Sergio Durigan Junior
2014-09-05 13:12             ` Pedro Alves [this message]
2014-09-08  0:44               ` Gabriel Krisman Bertazi
2014-09-09 21:19                 ` Sergio Durigan Junior
2014-08-21 21:20 ` Sergio Durigan Junior

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=5409B6B2.9000202@redhat.com \
    --to=palves@redhat.com \
    --cc=gabriel@krisman.be \
    --cc=gdb-patches@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: 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