public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: gdb-patches@sourceware.org
Cc: Thiago Jung Bauermann <thiago.bauermann@linaro.org>,
	Simon Marchi <simark@simark.ca>
Subject: [PATCH v2 0/2] Fix tab vs spaces in generated gdbarch.c
Date: Fri,  2 Dec 2022 19:21:58 +0000	[thread overview]
Message-ID: <20221202192200.405379-1-thiago.bauermann@linaro.org> (raw)

Hello,

This version addresses Simon's review comments. It generates the same
gdbarch.c as v1. There are only minor formatting and code reorganization
changes in gdbarch.py.

Changes since v1:

- gdbarch.py: Fix indentation in the generated gdbarch_dump function
  - Formatted with black.
- gdbarch.py: Fix indentation in the generated set_gdbarch_* definitions
  - Formatted with black.
  - Added separate function to avoid duplicating the computation of the
    indentation characters, as proposed by Simon.

Original cover letter:

If you change gdbarch-components.py and submit a patch containing the
generated gdbarch.c file, git will point out that it contains whitespace
errors, e.g.:

Applying: gdb/aarch64: Detect vector length changes when debugging remotely
.git/rebase-apply/patch:164: indent with spaces.
                       "gdbarch_dump: update_architecture = <%s>\n",
.git/rebase-apply/patch:165: indent with spaces.
                       host_address_to_string (gdbarch->update_architecture));
.git/rebase-apply/patch:186: indent with spaces.
                                  gdbarch_update_architecture_ftype update_architecture)
warning: 3 lines add whitespace errors.

These patches make gdbarch.py generate indentation using tabs and spaces
as required by the GNU coding style. The first patch also takes the
opportunity to align the function arguments with the opening parenthesis
in the line above.

In both patches, “git show --ignore-all-space” confirms that gdbarch.c has
only whitespace changes.

Thiago Jung Bauermann (2):
  gdbarch.py: Fix indentation in the generated gdbarch_dump function
  gdbarch.py: Fix indentation in the generated set_gdbarch_* definitions

 gdb/gdbarch.c  | 1502 ++++++++++++++++++++++++------------------------
 gdb/gdbarch.py |   41 +-
 2 files changed, 773 insertions(+), 770 deletions(-)


base-commit: 55fc1623f942fba10362cb199f9356d75ca5835b

             reply	other threads:[~2022-12-02 19:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 19:21 Thiago Jung Bauermann [this message]
2022-12-02 19:22 ` [PATCH v2 1/2] gdbarch.py: Fix indentation in the generated gdbarch_dump function Thiago Jung Bauermann
2022-12-02 19:22 ` [PATCH v2 2/2] gdbarch.py: Fix indentation in the generated set_gdbarch_* definitions Thiago Jung Bauermann
2022-12-02 19:32 ` [PATCH v2 0/2] Fix tab vs spaces in generated gdbarch.c Simon Marchi
2022-12-05 14:05   ` Thiago Jung Bauermann

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=20221202192200.405379-1-thiago.bauermann@linaro.org \
    --to=thiago.bauermann@linaro.org \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).