Received: by mail.netbsd.org (Postfix, from userid 605) id E385584E77; Sat, 12 Feb 2022 15:50:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 1C11C84E7E for ; Sat, 12 Feb 2022 15:50:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id Ki3jPxXZntx9 for ; Sat, 12 Feb 2022 15:50:14 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id A2C5C84D17 for ; Sat, 12 Feb 2022 15:50:14 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 99573FB24; Sat, 12 Feb 2022 15:50:14 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Sat, 12 Feb 2022 15:50:14 +0000 From: "Roland Illig" Subject: CVS commit: src/usr.bin/indent To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20220212155014.99573FB24@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Roland Illig" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: rillig Date: Sat Feb 12 15:50:14 UTC 2022 Modified Files: src/usr.bin/indent: lexi.c Log Message: indent: extend debug logging for the parser state The member names in struct parser_state are not trustworthy, for example in_decl does not correspond to the intuitive definition of "inside a declaration". To cope with this uncertainty, output the full state of the parser state to the debug log, not only the changes. This helps to track the inner state for small differences in the input, such as between 'typedef enum { TA, TB } TT' and 'enum { EA, EB } ET'. This hopefully helps in fixing PR#55453. No functional change outside debug mode. To generate a diff of this commit: cvs rdiff -u -r1.167 -r1.168 src/usr.bin/indent/lexi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.