Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Replace most calls to help_list and cmd_show_list
Date: Fri, 17 Apr 2020 17:02:37 -0400	[thread overview]
Message-ID: <4eba2611-ddaf-6f70-9b5d-15b12e455ee5@simark.ca> (raw)
In-Reply-To: <20200417132940.3978-1-tromey@adacore.com>

On 2020-04-17 9:29 a.m., Tom Tromey wrote:
> Currently there are many prefix commands that do nothing but call
> either help_list or cmd_show_list.  I happened to notice that one such
> call, for "set print type", used the wrong command list parameter,
> causing incorrect output.
> 
> Rather than fix this bug in isolation, I decided to eliminate this
> possibility by adding two new ways to add prefix commands, which
> simply route the call to help_list or cmd_show_list, as appropriate.
> This makes it impossible for a mismatch to occur.
> 
> In some cases, a bit of output was remove; however, I don't think this

removed

> output in general was very useful.  It seemed redundant with what's
> already printed by help_list.

Could you mention here an example of command for which the output changed?

> 
> This simplified the CLI style set/show commands quite a bit, and
> allowed the deletion of a macro.
> 
> This also cleans up some unusual code in windows-tdep.c.
> 
> Tested on x86-64 Fedora 30.  Note that I have no way to build the
> go32-nat.c change.

I did not read it all, but I glanced at some files.  It removes a lot of
duplicated code and boilerplate, and therefore chances of inconsistencies,
which is nice.

Simon


  reply	other threads:[~2020-04-17 21:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17 13:29 Tom Tromey
2020-04-17 21:02 ` Simon Marchi [this message]
2020-04-17 21:14   ` Tom Tromey

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=4eba2611-ddaf-6f70-9b5d-15b12e455ee5@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.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