Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Marco Barisione via Gdb-patches <gdb-patches@sourceware.org>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: GDB patches mailing list <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2 4/5] gdb: generate the prefix name for prefix commands on demand
Date: Wed, 12 May 2021 12:10:22 +0100	[thread overview]
Message-ID: <CAKDUT2JUvf-toodMd0EZ13Oy=tUF9juLs48JiHtax8mWvNVWUQ@mail.gmail.com> (raw)
In-Reply-To: <1b0b042b-f8f4-c350-dcbf-1f617670f24f@polymtl.ca>

On Mon, 8 Mar 2021 at 23:25, Simon Marchi <simon.marchi@polymtl.ca> wrote:
> On 2021-01-25 6:26 a.m., Marco Barisione via Gdb-patches wrote:
> > Previously, the prefixname field of struct cmd_list_element was manually
> > set for prefix commands.  This seems verbose and error prone as it
> > required every single call to functions adding prefix commands to
> > specify the prefix name while the same information can be easily
> > generated.
> >
> > Historically, this was not possible as the prefix field was null for
> > many commands, but this was fixed in commit
> > 3f4d92ebdf7f848b5ccc9e8d8e8514c64fde1183 by Philippe Waroquiers, so
> > we can rely on the prefix field being set when generating the prefix
> > name.
>
> Sounds like a good idea to me.  The patch is ok to push with these nits
> fixed.

I fixed the nits, fixed the two commands I previously forgot to update
(maintenance print arc and memory-tag), and manually double checked
all the calls to add_prefix and friends.

This is now pushed (2f822da535ba9b159174d02d7114b4fc4f7c8818).

> > gdb/ChangeLog:
> >
> > [...]
> >       * arm-tdep.c (_initialize_arm_tdep): Ditto.
> >       * auto-load.c: Ditto.
> >       * breakpoint.c: Ditto.
> >       * bsd-kvm.c: Ditto.
> >       * btrace.c: Ditto.
> >       * cli/cli-cmds.c: Ditto.
> >       * cli/cli-dump.c (_initialize_cli_dump): Ditto.
> >  [...]
>
> IMO it's not really useful to list all the spots that were just
> trivially adjusted.  It's ok to write things like:
>
>   * command.h (add_prefix_cmd): Remove prefixname parameter.  Update all
>   callers.
>
> ... and then skip listing all callers.  That will also help preserve
> your sanity.

I thought I had to list everything but glad to know I don't!

-- 
Marco Barisione

  parent reply	other threads:[~2021-05-12 11:11 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08 10:07 [PATCH 0/4] Add support for command renaming Marco Barisione via Gdb-patches
2021-01-08 10:07 ` [PATCH 1/4] gdb: add lookup_cmd_exact to simplify a common pattern Marco Barisione via Gdb-patches
2021-01-10  0:06   ` Lancelot SIX via Gdb-patches
2021-01-17 10:47     ` Marco Barisione via Gdb-patches
2021-01-17 19:02       ` Lancelot SIX via Gdb-patches
2021-01-25 11:33         ` Luis Machado via Gdb-patches
2021-01-08 10:07 ` [PATCH 2/4] gdb: prevent prefix commands from being hooks Marco Barisione via Gdb-patches
2021-01-08 10:07 ` [PATCH 3/4] gdb: update the docs for add_cmd and do_add_cmd to match reality Marco Barisione via Gdb-patches
2021-01-08 10:07 ` [PATCH 4/4] gdb: Add support for renaming commands Marco Barisione via Gdb-patches
2021-01-08 10:30   ` Eli Zaretskii via Gdb-patches
2021-01-25 11:26 ` [PATCH v2 0/5] Add support for command renaming Marco Barisione via Gdb-patches
2021-01-25 11:26   ` [PATCH v2 1/5] gdb: add lookup_cmd_exact to simplify a common pattern Marco Barisione via Gdb-patches
2021-03-08 18:58     ` Simon Marchi
2021-05-07 14:47       ` Marco Barisione via Gdb-patches
2021-01-25 11:26   ` [PATCH v2 2/5] gdb: prevent prefix commands from being hooks Marco Barisione via Gdb-patches
2021-03-08 21:32     ` Simon Marchi via Gdb-patches
2021-03-09  9:42       ` Marco Barisione via Gdb-patches
2021-03-16  3:17         ` Simon Marchi via Gdb-patches
2021-05-07 14:59           ` Marco Barisione via Gdb-patches
2021-05-07 19:30             ` Simon Marchi via Gdb-patches
2021-05-07 20:11               ` Marco Barisione via Gdb-patches
2021-05-14 20:38       ` [PATCH v3 " Marco Barisione via Gdb-patches
2021-01-25 11:26   ` [PATCH v2 3/5] gdb: update the docs for add_cmd and do_add_cmd to match reality Marco Barisione via Gdb-patches
2021-03-08 22:52     ` Simon Marchi via Gdb-patches
2021-03-08 23:10       ` Simon Marchi via Gdb-patches
2021-05-14 20:39       ` [PATCH v3 3/5] gdb: move declarations and docs for cli-decode.c to cli-decode.h Marco Barisione via Gdb-patches
2021-01-25 11:26   ` [PATCH v2 4/5] gdb: generate the prefix name for prefix commands on demand Marco Barisione via Gdb-patches
2021-03-08 23:25     ` Simon Marchi via Gdb-patches
2021-03-16 17:00       ` Simon Marchi via Gdb-patches
2021-05-12 11:10       ` Marco Barisione via Gdb-patches [this message]
2021-01-25 11:26   ` [PATCH v2 5/5] gdb: Add support for renaming commands Marco Barisione via Gdb-patches
2021-03-23 18:45     ` Simon Marchi via Gdb-patches
2021-05-14 20:41       ` [PATCH v3 5/5] gdb: add " Marco Barisione via Gdb-patches
2021-02-08 17:53   ` [PING] [PATCH v2 0/5] Add support for command renaming Marco Barisione via Gdb-patches
2021-02-15  8:27     ` [PING2] " Marco Barisione via Gdb-patches
2021-02-22  8:28       ` [PING 3] " Marco Barisione via Gdb-patches
2021-03-01  8:32         ` [PING 4] " Marco Barisione via Gdb-patches
2021-03-08  9:23           ` [PING 5] " Marco Barisione via Gdb-patches

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='CAKDUT2JUvf-toodMd0EZ13Oy=tUF9juLs48JiHtax8mWvNVWUQ@mail.gmail.com' \
    --to=gdb-patches@sourceware.org \
    --cc=mbarisione@undo.io \
    --cc=simon.marchi@polymtl.ca \
    /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