mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-25 16:57:52 +00:00
gdb, gdbserver, gdbsupport: trim trailing whitespaces
I noticed my IDE (VSCode) starting to automatically trim trailing
whitespaces on save, despite the setting for it being disabled. I
realized that this is because the .editorconfig file now has
trim_trailing_whitespace = true
for many file types. If we have this EditorConfig setting forcing
editors to trim trailing whitespaces, I think it would make sense to
clean up trailing whitespaces from our files. Otherwise, people will
always get spurious whitespace changes when editing these files.
I did a mass cleanup using this command:
$ find gdb gdbserver gdbsupport -type f \( \
-name "*.c" -o \
-name "*.h" -o \
-name "*.cc" -o \
-name "*.texi" -o \
-name "*.exp" -o \
-name "*.tcl" -o \
-name "*.py" -o \
-name "*.s" -o \
-name "*.S" -o \
-name "*.asm" -o \
-name "*.awk" -o \
-name "*.ac" -o \
-name "Makefile*" -o \
-name "*.sh" -o \
-name "*.adb" -o \
-name "*.ads" -o \
-name "*.d" -o \
-name "*.go" -o \
-name "*.F90" -o \
-name "*.f90" \
\) -exec sed -ri 's/[ \t]+$//' {} +
I then did an autotools regen, because we don't actually want to change
the Makefile and Makefile.in files that are generated.
Change-Id: I6f91b83e3b8c4dc7d5d51a2ebf60706120efe691
This commit is contained in:
committed by
Simon Marchi
parent
de49e8229b
commit
a5cbe67512
@@ -337,7 +337,7 @@ cp_type_print_method_args (struct type *mtype, const char *prefix,
|
||||
On outermost call, SHOW > 0 means should ignore
|
||||
any typename for TYPE and show its details.
|
||||
SHOW is always zero on recursive calls.
|
||||
|
||||
|
||||
NEED_POST_SPACE is non-zero when a space will be be needed
|
||||
between a trailing qualifier and a field, variable, or function
|
||||
name. */
|
||||
@@ -743,7 +743,7 @@ c_type_print_varspec_suffix (struct type *type,
|
||||
|| type->bounds ()->high.kind () == PROP_LOCLIST)
|
||||
gdb_printf (stream, "variable length");
|
||||
else if (get_array_bounds (type, &low_bound, &high_bound))
|
||||
gdb_printf (stream, "%s",
|
||||
gdb_printf (stream, "%s",
|
||||
plongest (high_bound - low_bound + 1));
|
||||
gdb_printf (stream, (is_vector ? ")))" : "]"));
|
||||
|
||||
@@ -1404,7 +1404,7 @@ c_type_print_base_1 (struct type *type, struct ui_file *stream,
|
||||
if (type->is_declared_class ())
|
||||
gdb_printf (stream, "class ");
|
||||
/* Print the tag name if it exists.
|
||||
The aCC compiler emits a spurious
|
||||
The aCC compiler emits a spurious
|
||||
"{unnamed struct}"/"{unnamed union}"/"{unnamed enum}"
|
||||
tag for unnamed struct/union/enum's, which we don't
|
||||
want to print. */
|
||||
|
||||
Reference in New Issue
Block a user