From: Tom de Vries Date: Tue, 9 Dec 2025 23:25:20 +0000 (+0100) Subject: [gdb] Fix whitespace in *.def X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=21b10d4c3e687ecdc4738900269d75691e67def7;p=thirdparty%2Fbinutils-gdb.git [gdb] Fix whitespace in *.def Add indent-with-non-tab for *.def in gdb*/.gitattributes. Fix whitespace in the *.def files in gdb*, and add these files to the clean list in gdb/contrib/check-whitespace-pre-commit.py. Tested on x86_64-linux. Approved-By: Tom Tromey --- diff --git a/gdb/.gitattributes b/gdb/.gitattributes index 26250fdf89c..a3f15e96349 100644 --- a/gdb/.gitattributes +++ b/gdb/.gitattributes @@ -19,3 +19,4 @@ aclocal.m4 -whitespace # Tab-indented files. *.[ly] whitespace=space-before-tab,indent-with-non-tab,trailing-space +*.def whitespace=space-before-tab,indent-with-non-tab,trailing-space diff --git a/gdb/contrib/check-whitespace-pre-commit.py b/gdb/contrib/check-whitespace-pre-commit.py index b840aba9f47..d7fa45d1529 100755 --- a/gdb/contrib/check-whitespace-pre-commit.py +++ b/gdb/contrib/check-whitespace-pre-commit.py @@ -18,7 +18,9 @@ import re import subprocess import sys -re_clean = re.compile("(^(gdb/testsuite/|gdbsupport/|gdbserver/)|[.](m4|ac|[chly])$)") +re_clean = re.compile( + "(^(gdb/testsuite/|gdbsupport/|gdbserver/)|[.](m4|ac|def|[chly])$)" +) re_clean_exclude = re.compile("^(gdb/symfile.c|gdb/cli/cli-cmds.c)$") clean = [] diff --git a/gdb/i386-syscalls.def b/gdb/i386-syscalls.def index 5ba384ab505..40e8db9e4b1 100644 --- a/gdb/i386-syscalls.def +++ b/gdb/i386-syscalls.def @@ -18,7 +18,7 @@ Generated using linux v6.13 and command: $ egrep -v "^#.*" ./arch/x86/entry/syscalls/syscall_32.tbl \ - | awk '{printf "SYSCALL (%s, %s)\n", $1, $3}' + | awk '{printf "SYSCALL (%s, %s)\n", $1, $3}' */ SYSCALL (0, restart_syscall) diff --git a/gdb/std-operator.def b/gdb/std-operator.def index d12421e8a83..817d8a193f0 100644 --- a/gdb/std-operator.def +++ b/gdb/std-operator.def @@ -334,8 +334,8 @@ OP (OP_RUST_ARRAY) /* ================ Ada operators ================ */ -/* X IN A'RANGE(N). N is an immediate operand, surrounded by - BINOP_IN_BOUNDS before and after. A is an array, X an index +/* X IN A'RANGE(N). N is an immediate operand, surrounded by + BINOP_IN_BOUNDS before and after. A is an array, X an index value. Evaluates to true iff X is within range of the Nth dimension (1-based) of A. (A multi-dimensional array type is represented as array of array of ...) */ @@ -353,18 +353,18 @@ OP (OP_ATR_SIZE) OP (OP_ATR_TAG) OP (OP_ATR_VAL) -/* Ada type qualification. It is encoded as for UNOP_CAST, above, +/* Ada type qualification. It is encoded as for UNOP_CAST, above, and denotes the TYPE'(EXPR) construct. */ OP (UNOP_QUAL) -/* X IN TYPE. The `TYPE' argument is immediate, with - UNOP_IN_RANGE before and after it. True iff X is a member of +/* X IN TYPE. The `TYPE' argument is immediate, with + UNOP_IN_RANGE before and after it. True iff X is a member of type TYPE (typically a subrange). */ OP (UNOP_IN_RANGE) /* An aggregate. A single immediate operand, N>0, gives the number of component specifications that follow. The - immediate operand is followed by a second OP_AGGREGATE. + immediate operand is followed by a second OP_AGGREGATE. Next come N component specifications. A component specification is either an OP_OTHERS (others=>...), an OP_CHOICES (for named associations), or other expression (for diff --git a/gdb/unwind_stop_reasons.def b/gdb/unwind_stop_reasons.def index 432064f6ead..cb457683b0b 100644 --- a/gdb/unwind_stop_reasons.def +++ b/gdb/unwind_stop_reasons.def @@ -17,17 +17,17 @@ /* Reasons why frames could not be further unwound SET (name, description) - + After this reason name, all reasons should be considered errors; i.e.: abnormal stack termination. - FIRST_ERROR (name) - + FIRST_ERROR (name) + First and Last reason defined FIRST_ENTRY (name) LAST_ENTRY (name) */ #ifdef SET -/* No particular reason; either we haven't tried unwinding yet, +/* No particular reason; either we haven't tried unwinding yet, or we didn't fail. */ SET (UNWIND_NO_REASON, "no reason") diff --git a/gdbserver/.gitattributes b/gdbserver/.gitattributes index fc269b48aed..4e52bde97e7 100644 --- a/gdbserver/.gitattributes +++ b/gdbserver/.gitattributes @@ -14,3 +14,7 @@ configure -whitespace aclocal.m4 -whitespace + +# Tab-indented files. + +*.def whitespace=space-before-tab,indent-with-non-tab,trailing-space diff --git a/gdbsupport/.gitattributes b/gdbsupport/.gitattributes index 808fc2530dc..1646aa459b6 100644 --- a/gdbsupport/.gitattributes +++ b/gdbsupport/.gitattributes @@ -19,3 +19,7 @@ Makefile.in -whitespace # Imported files. unordered_dense/* -whitespace + +# Tab-indented files. + +*.def whitespace=space-before-tab,indent-with-non-tab,trailing-space