From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 455F73858D39 for ; Fri, 2 Dec 2022 19:32:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 455F73858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id C507B1E112; Fri, 2 Dec 2022 14:32:18 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1670009538; bh=JRL6mT9ECGVcPXd1X6HmW47L6CBtmfN9pD7RT2Dy2gY=; h=Date:Subject:To:References:From:In-Reply-To:From; b=laKA4qI26gvAJa0WYvx4xHIFMhdkqeIB8QdPk37qq647PXB+YMjIxIr0tjsJfnOr8 Jgqs7Dk4/unObp50zIW7ArSWZf3xgemBREk9eIYDptxoKVaCMWyNPzW3TYubUgURP8 /jLFNunhMZadshXd+Kfv01ZZS/t7rirzk1beSyfs= Message-ID: <2a5a1a46-66b9-5469-6814-12fee5441b5f@simark.ca> Date: Fri, 2 Dec 2022 14:32:18 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH v2 0/2] Fix tab vs spaces in generated gdbarch.c Content-Language: en-US To: Thiago Jung Bauermann , gdb-patches@sourceware.org References: <20221202192200.405379-1-thiago.bauermann@linaro.org> From: Simon Marchi In-Reply-To: <20221202192200.405379-1-thiago.bauermann@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 12/2/22 14:21, Thiago Jung Bauermann via Gdb-patches wrote: > 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 Thanks: Approved-By: Simon Marchi Simon