From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 ; Fri, 2 Dec 2022 19:22:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4C2593858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-13bd2aea61bso6705463fac.0 for ; Fri, 02 Dec 2022 11:22:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=MU6+ij+GCMFmdXS2KzczCuY5NWk8W/6tG9WO5BJOXHo=; b=yv7XFtbMbVLEVv8Z5EDal4HkMMXAOlHeEc5vKkrutqZxIs3P+e0ppy+0LMIbHTTXLz hQy3M+ivAtyUzfmHWZ82+fnOf8WmWec+hNsxCZ8TYYHX5po07omLSSzZDHEpOnza271z UGub7/J9W/vtcjrKvf2idip3cDa4PelpvscTFLG5OZKwTXHoRnRbSj4ORZrVWlwN+1VW 6oQp3zZxfXppxmlaphoL4V6hPulCTadTtpKgiGfUCR/qwFrCjFQJCDRg4O5dUO82J5kz 7mvVW91cfhDZ0amYacAkfWFq82EJ/QFBbQOWPXSV+RoVaHZroFweaE37CHXXLnkeg3j/ 3Tig== 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) From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Cc: Thiago Jung Bauermann , Simon Marchi 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 List-Id: 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