From: Lancelot SIX <lsix@lancelotsix.com>
To: Jan Vrany <jan.vrany@labware.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 3/5] gdb/python: allow redefinition of python GDB/MI commands
Date: Sun, 6 Feb 2022 17:13:55 +0000 [thread overview]
Message-ID: <20220206171355.ldrvzh5pq46hpnom@Plymouth> (raw)
In-Reply-To: <20220117124425.2658516-4-jan.vrany@labware.com>
Hi,
> @@ -163,6 +164,9 @@ struct mi_command
> wrong. */
> void invoke (struct mi_parse *parse) const;
>
> + /* Return TRUE if the command can be redefined, FALSE otherwise. */
> + virtual bool can_be_redefined ();
It looks like that this method can be made const I think.
I also did ont pay too close attention in the previous patch, but it
looks like you use space indentation. I think GNU standard[1] and GDB
codebase uses tab indentation (tab size of 8):
The rest of this section gives our recommendations for other aspects of
C formatting style, which is also the default style of the indent
program in version 1.2 and newer. It corresponds to the options
-nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2
-ndj -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -psl -nsc -nsob
This way to tell things is not super informative in itself. Depending
on the text editor you use, there might be a configuration option to
help you automate this.
I will not point it out in every place in the patch, but there are
multiple instances where your changes lead to a indentation change (i.e.
replace 1 tab with 8 spaces). This should be avoided.
> --- a/gdb/python/py-micmd.c
> +++ b/gdb/python/py-micmd.c
> @@ -1,6 +1,6 @@
> /* MI Command Set for GDB, the GNU debugger.
>
> - Copyright (C) 2019 Free Software Foundation, Inc.
> + Copyright (C) 2019-2021 Free Software Foundation, Inc.
2021 will most probably need to become 2022 (and same goes for other new
files as well).
> class mi_command_py : public mi_command
> {
> - public:
> - /* Constructs a new mi_command_py object. NAME is command name without
> - leading dash. OBJECT is a reference to a Python object implementing
> - the command. This object should inherit from gdb.MICommand and should
> - implement method invoke (args). */
> - mi_command_py (const char *name, gdbpy_ref<> object);
> +public:
> + /* Constructs a new mi_command_py object. NAME is command name without
> + leading dash. OBJECT is a reference to a Python object implementing
> + the command. This object should inherit from gdb.MICommand and should
> + implement method invoke (args). */
> + mi_command_py (const char *name, gdbpy_ref<> object);
Here you change the indentation from the previous patch. This change
should probably be moved to it.
I understand that this is tedious to change and am sorry for that.
Best,
Lancelot.
[1] https://www.gnu.org/prep/standards/html_node/Formatting.html
next prev parent reply other threads:[~2022-02-06 17:14 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-17 12:44 [PATCH 0/5] create GDB/MI commands using python Jan Vrany
2022-01-17 12:44 ` [PATCH 1/5] gdb/mi: introduce new class mi_command_builtin Jan Vrany
2022-01-17 12:44 ` [PATCH 2/5] gdb/python: create GDB/MI commands using python Jan Vrany
2022-02-06 16:52 ` Lancelot SIX
2022-01-17 12:44 ` [PATCH 3/5] gdb/python: allow redefinition of python GDB/MI commands Jan Vrany
2022-02-06 17:13 ` Lancelot SIX [this message]
2022-02-06 20:33 ` Simon Marchi
2022-02-06 20:44 ` Jan Vrany
2022-02-06 20:46 ` Simon Marchi
2022-02-07 9:46 ` Lancelot SIX
2022-01-17 12:44 ` [PATCH 4/5] gdb/testsuite: add tests for python-defined MI commands Jan Vrany
2022-01-17 12:44 ` [PATCH 5/5] gdb/python: document GDB/MI commands in Python Jan Vrany
2022-01-17 13:15 ` Eli Zaretskii
2022-01-17 13:20 ` Eli Zaretskii
2022-01-18 12:34 ` Jan Vrany
2022-01-18 15:09 ` Eli Zaretskii
2022-01-18 13:55 ` [PATCH 0/5] create GDB/MI commands using python Andrew Burgess
2022-01-18 15:13 ` Jan Vrany
2022-01-21 15:22 ` Andrew Burgess
2022-01-24 12:59 ` Jan Vrany
2022-02-02 16:57 ` Andrew Burgess
2022-02-06 21:16 ` Simon Marchi
2022-02-07 15:56 ` [PATCHv2] gdb/python/mi: create MI " Andrew Burgess
2022-02-08 15:16 ` Simon Marchi
2022-02-09 12:25 ` [PATCHv3] " Andrew Burgess
2022-02-09 14:08 ` Simon Marchi
2022-02-10 18:26 ` Andrew Burgess
2022-02-13 14:27 ` Joel Brobecker
2022-02-13 21:46 ` Jan Vrany
2022-02-24 10:37 ` [PATCHv4] " Andrew Burgess
2022-02-25 19:22 ` Tom Tromey
2022-02-25 19:31 ` Jan Vrany
2022-02-28 16:48 ` [PATCHv5] " Andrew Burgess
2022-02-28 18:40 ` Tom Tromey
2022-03-13 4:47 ` Joel Brobecker
2022-03-14 14:13 ` Andrew Burgess
2022-03-16 8:10 ` Joel Brobecker
2022-03-16 12:29 ` Simon Marchi
2022-03-18 15:06 ` Simon Marchi
2022-03-18 16:12 ` Andrew Burgess
2022-03-18 19:57 ` Simon Marchi
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=20220206171355.ldrvzh5pq46hpnom@Plymouth \
--to=lsix@lancelotsix.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.vrany@labware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).