Message ID | 20221202192200.405379-1-thiago.bauermann@linaro.org |
---|---|
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B0EAA3858425 for <patchwork@sourceware.org>; Fri, 2 Dec 2022 19:22:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B0EAA3858425 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670008957; bh=MU6+ij+GCMFmdXS2KzczCuY5NWk8W/6tG9WO5BJOXHo=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=mHb3C8W2PPEo6iTa/BeYe0snVj6g9rJCLw9QLyxTYToS5m4K9oBBA0grOPs7TWTDH inrhyg8FIkkNsO3OGMHYdwV3H7AJo7K9Ep6ROIVHsOAII7MPVub1eGCI9/4UuFzE9L ikXuC/rRihg2XDVmCEc4WMDOgI6Wg7DHkSjUTt7g= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by sourceware.org (Postfix) with ESMTPS id 4C2593858D3C for <gdb-patches@sourceware.org>; Fri, 2 Dec 2022 19:22:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4C2593858D3C Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-13bd2aea61bso6705463fac.0 for <gdb-patches@sourceware.org>; Fri, 02 Dec 2022 11:22:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MU6+ij+GCMFmdXS2KzczCuY5NWk8W/6tG9WO5BJOXHo=; b=DVqk1gbWqCD+PxqGANSz4H6p/w+hZ0N1zdNovqLJkPZIyK0iaovKBvwRwmEQ24owU0 CYXEk1ZIbDQ63FvlQXiMFtrLz93B0gH6wJzZpXG4YGzvDOSSWcpJw/H6d7rA8G6EYC9L MzrL4eOus4EURUet4lkbkgaAcdN3rSBEJ15SRXtDKjfW8eVV3/WCiEJ/c7hCCPn7l2Ym xUTeH6rRMBuLnIzg8ANElSzgzk7GF1dvUtXlfmjBG2xbKH7OZzeECyVrdV6RWC9AdWs8 JOLTtQ+/w+VKJTmkHaCvNl0aJDu/YVclv5zJiW7UrOQglMDeAqVbGRTQBo1MmfnrCvKq 2IIA== X-Gm-Message-State: ANoB5pkMIytdPLxrTdAra/53BjeG93GMdd+2lQheIl4OsKv2HMt1AUwr ysgcwWJkLfx1idsfFiTo54c6DtFHKzz5dqc/ X-Google-Smtp-Source: AA0mqf67drdjWZ4j+G8ip/ZWIPXkZ/jAISRKPsY2ofzbHD6ehQw6q5iUuMvy6QgWGFFU7LgPf5rzyw== X-Received: by 2002:a05:6870:bd44:b0:13b:dbc6:69ad with SMTP id og4-20020a056870bd4400b0013bdbc669admr42273002oab.13.1670008934530; Fri, 02 Dec 2022 11:22:14 -0800 (PST) Received: from localhost ([2804:14d:7e39:8470:2982:38ed:93ad:52f1]) by smtp.gmail.com with ESMTPSA id h4-20020a056830034400b0066dfa0d9c1dsm3787776ote.11.2022.12.02.11.22.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 11:22:14 -0800 (PST) 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 Message-Id: <20221202192200.405379-1-thiago.bauermann@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> From: Thiago Jung Bauermann via Gdb-patches <gdb-patches@sourceware.org> Reply-To: Thiago Jung Bauermann <thiago.bauermann@linaro.org> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Fix tab vs spaces in generated gdbarch.c
|
|
Message
Thiago Jung Bauermann
Dec. 2, 2022, 7:21 p.m. UTC
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
Comments
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.marchi@efficios.com> Simon
Simon Marchi <simark@simark.ca> writes: > On 12/2/22 14:21, Thiago Jung Bauermann via Gdb-patches wrote: >> >> 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.marchi@efficios.com> Thank you! I just pushed these patches.