]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb] Fix whitespace in *.c
authorTom de Vries <tdevries@suse.de>
Tue, 9 Dec 2025 23:25:19 +0000 (00:25 +0100)
committerTom de Vries <tdevries@suse.de>
Tue, 9 Dec 2025 23:25:19 +0000 (00:25 +0100)
Fix whitespace in the *.c 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 <tom@tromey.com>
23 files changed:
gdb/alpha-netbsd-tdep.c
gdb/arch/aarch64-mte-linux.c
gdb/c-varobj.c
gdb/cli/cli-utils.c
gdb/contrib/check-whitespace-pre-commit.py
gdb/d-namespace.c
gdb/darwin-nat-info.c
gdb/jit.c
gdb/linux-tdep.c
gdb/m68hc11-tdep.c
gdb/mdebugread.c
gdb/mi/mi-cmd-break.c
gdb/mi/mi-cmd-catch.c
gdb/mi/mi-cmd-target.c
gdb/mn10300-linux-tdep.c
gdb/mn10300-tdep.c
gdb/ppc-sysv-tdep.c
gdb/rs6000-aix-tdep.c
gdb/rs6000-lynx178-tdep.c
gdb/split-name.c
gdb/target-float.c
gdb/unittests/child-path-selftests.c
gdb/unittests/mkdir-recursive-selftests.c

index 2122ddfa0fd275df6100b65ee9d6e92fb8b5641d..f885f3f5ab65c6f5edc6a617b4f43947bd147be5 100644 (file)
@@ -227,7 +227,7 @@ alphanbsd_sigtramp_offset (struct gdbarch *gdbarch, CORE_ADDR pc)
 
 static int
 alphanbsd_pc_in_sigtramp (struct gdbarch *gdbarch,
-                         CORE_ADDR pc, const char *func_name)
+                         CORE_ADDR pc, const char *func_name)
 {
   return (nbsd_pc_in_sigtramp (pc, func_name)
          || alphanbsd_sigtramp_offset (gdbarch, pc) >= 0);
index 9f433b0a96ada4260f38b4279613d915c46b5e81..9a27eb6c1242c571018b70ef093ed3f8dd77a632 100644 (file)
@@ -74,4 +74,3 @@ aarch64_mte_unpack_tags (gdb::byte_vector &tags, bool skip_first)
   /* Update the original tags vector.  */
   tags = std::move (unpacked_tags);
 }
-
index 447a19fe4d48a072d2fed021e9c828b0c9dd0c32..41875c550e9e0beba1b17e7578513bcf35db13c8 100644 (file)
@@ -831,11 +831,11 @@ cplus_describe_child (const struct varobj *parent, int index,
            {
            case 0:
              if (children[v_public] > 0)
-               access = "public";
+               access = "public";
              else if (children[v_private] > 0)
-               access = "private";
+               access = "private";
              else
-               access = "protected";
+               access = "protected";
              break;
            case 1:
              if (children[v_public] > 0)
@@ -846,7 +846,7 @@ cplus_describe_child (const struct varobj *parent, int index,
                    access = "protected";
                }
              else if (children[v_private] > 0)
-               access = "protected";
+               access = "protected";
              break;
            case 2:
              /* Must be protected.  */
index 8396f74e6ac2a7f5a26d7fe68fe25ae6cf57d255..3d0034ed84965100ee379586035f2636614529cb 100644 (file)
@@ -436,4 +436,3 @@ validate_flags_qcs (const char *which_command, qcs_flags *flags)
   if (flags->cont && flags->silent)
     error (_("%s: -c and -s are mutually exclusive"), which_command);
 }
-
index 3045b3e6c7ed5f4750a4a5450df6cff6ecddb41e..f084a0879d8d1d6904e05e673edcd42cafa6ad19 100755 (executable)
@@ -18,12 +18,15 @@ import re
 import subprocess
 import sys
 
-re_clean = re.compile("(^(gdb/testsuite/|gdbsupport/|gdbserver/)|[.](m4|ac|h)$)")
+re_clean = re.compile("(^(gdb/testsuite/|gdbsupport/|gdbserver/)|[.](m4|ac|[ch])$)")
+re_clean_exclude = re.compile("^(gdb/symfile.c|gdb/cli/cli-cmds.c)$")
 
 clean = []
 other = []
 for f in sys.argv[1:]:
     m = re_clean.search(f)
+    if m and re_clean_exclude.search(f):
+        m = None
     if m:
         clean.append(f)
     else:
index b5e046efaa760885476c3f42fdfee0d5a3646061..3fa2896678fec2180290b7dd93ea4058453a2bb2 100644 (file)
@@ -516,4 +516,3 @@ d_lookup_symbol_nonlocal (const struct language_defn *langdef,
 
   return d_lookup_symbol_module (scope, name, block, domain);
 }
-
index 38ace30aca941c8dc24b49edfeeb2a7dd5608798..f4a96142a0bba458fc0bb4ae1aaca698eef29ec7 100644 (file)
@@ -549,7 +549,7 @@ darwin_debug_regions (task_t task, mach_vm_address_t address, int max)
          count = VM_REGION_BASIC_INFO_COUNT_64;
          kret =
            mach_vm_region (task, &address, &size, VM_REGION_BASIC_INFO_64,
-                             (vm_region_info_t) &info, &count, &object_name);
+                             (vm_region_info_t) &info, &count, &object_name);
          if (kret != KERN_SUCCESS)
            {
              size = 0;
index b2b08005feb9821f5fcaaedcc70bc52b4466afa9..5123717ac565eabed639c29c14d350d85404d974 100644 (file)
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -553,7 +553,7 @@ finalize_symtab (struct gdb_symtab *stab, struct objfile *objfile)
     }
 
   auto bv = std::make_unique<blockvector> (actual_nblocks);
-  
+
   /* At the end of this function, (begin, end) will contain the PC range this
      entire blockvector spans.  */
   begin = stab->blocks.front ().begin;
index 10843613c5dbb8ec546ff138662db832a93549ae..8fadc7504e75679e930dd7c426132ae424cef1b7 100644 (file)
@@ -291,7 +291,7 @@ linux_get_siginfo_type_with_fields (struct gdbarch *gdbarch,
   type_allocator alloc (gdbarch);
 
   int_type = init_integer_type (alloc, gdbarch_int_bit (gdbarch),
-                               0, "int");
+                               0, "int");
   uint_type = init_integer_type (alloc, gdbarch_int_bit (gdbarch),
                                 1, "unsigned int");
   long_type = init_integer_type (alloc, gdbarch_long_bit (gdbarch),
index 55b26f9bf99320a4ff7596c68e0cc4fcd55efb7e..2aa2cd877b7ecfa645f2f025a9a6c5d34ed7ff4f 100644 (file)
@@ -1532,4 +1532,3 @@ INIT_GDB_FILE (m68hc11_tdep)
   gdbarch_register (bfd_arch_m68hc12, m68hc11_gdbarch_init);
   m68hc11_init_reggroups ();
 }
-
index e7c526a84ed4e61f932dbf1b60875c1759c60342..f5949e614f4bfa3ba52a1105ced42e246e6705ba 100644 (file)
@@ -109,8 +109,8 @@ struct md_symloc
 
 #define SC_IS_TEXT(sc) ((sc) == scText \
                   || (sc) == scRConst \
-                  || (sc) == scInit \
-                  || (sc) == scFini)
+                  || (sc) == scInit \
+                  || (sc) == scFini)
 #define SC_IS_DATA(sc) ((sc) == scData \
                   || (sc) == scSData \
                   || (sc) == scRData \
index 2c9295d45c52f6327189c4d7743eab5d9fd32ebf..742b1cb59f8e99c600a9e23c80c49bf98cb9f921 100644 (file)
@@ -594,4 +594,3 @@ mi_cmd_break_commands (const char *command, const char *const *argv, int argc)
 
   breakpoint_set_commands (b, std::move (break_command));
 }
-
index 8c0d23064eb9d7fd03e734ba6a7d71ae38eb7bd8..00beff745134aac07de5fd4802ba8a30b2fef186 100644 (file)
@@ -358,4 +358,3 @@ mi_cmd_catch_catch (const char *cmd, const char *const *argv, int argc)
 {
   mi_cmd_catch_exception_event (EX_EVENT_CATCH, cmd, argv, argc);
 }
-
index 22bc43e4efa6eeda8908c4689610b4f5ecaf6582..c3de8a960fda6961d9671662b8b4313ac8252623 100644 (file)
@@ -91,4 +91,3 @@ mi_cmd_target_file_delete (const char *command, const char *const *argv,
 
   remote_file_delete (remote_file, 0);
 }
-
index e672ad332909c83e78eaead081110f05febfe36a..64c1544148f2c2cd9bc913bceb8894210100c0ff 100644 (file)
@@ -719,4 +719,3 @@ INIT_GDB_FILE (mn10300_linux_tdep)
   gdbarch_register_osabi (bfd_arch_mn10300, 0,
                          GDB_OSABI_LINUX, am33_linux_init_osabi);
 }
-
index e6e7f3df247384da804d8f82f31940e940583e9b..f0167d9f74749ba9cb81a51bbea8df1956e1c62f 100644 (file)
@@ -1417,4 +1417,3 @@ INIT_GDB_FILE (mn10300_tdep)
 {
   gdbarch_register (bfd_arch_mn10300, mn10300_gdbarch_init, mn10300_dump_tdep);
 }
-
index cc300cd0f6b9c473ec124c7e4e1f7641d2c6006d..3f20cf3e788d68103f48eeba3c827d61f6d24919 100644 (file)
@@ -1705,7 +1705,7 @@ ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
 
              ppc64_sysv_abi_push_param (gdbarch, eltype, val, &argpos);
              ppc64_sysv_abi_push_param (gdbarch, eltype,
-                                        val + eltype->length (), &argpos);
+                                        val + eltype->length (), &argpos);
            }
          else if (type->code () == TYPE_CODE_ARRAY && type->is_vector ()
                   && opencl_abi)
index 366235f1919e33b08e818300dcc210de95b7cb5d..feca5b09049d8df12809d58524976cbad7008410 100644 (file)
@@ -1428,4 +1428,3 @@ INIT_GDB_FILE (rs6000_aix_tdep)
   gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_AIX,
                          rs6000_aix_init_osabi);
 }
-
index d0d9a53025b589378c069e04957d54ba22cff2a8..6e7b3db8f474cef77376e793679174c801b28152 100644 (file)
@@ -415,4 +415,3 @@ INIT_GDB_FILE (rs6000_lynx178_tdep)
   gdbarch_register_osabi (bfd_arch_rs6000, 0, GDB_OSABI_LYNXOS178,
                          rs6000_lynx178_init_osabi);
 }
-
index dc09dec74fd5b33656efc351cb95631c3000412e..236caa3479c4b341e12be391f4c425c4ee3dcb12 100644 (file)
@@ -64,4 +64,3 @@ split_name (const char *name, split_style style)
   result.emplace_back (&name[previous_len]);
   return result;
 }
-
index 9b0376f290994aac5ba503d893096f7a05a69b63..dddf5d115900ec8beb847296dfe0cd25aeb32984 100644 (file)
@@ -2491,4 +2491,3 @@ target_float_compare (const gdb_byte *x, const struct type *type_x,
   const target_float_ops *ops = get_target_float_ops (type_x, type_y);
   return ops->compare (x, type_x, y, type_y);
 }
-
index 95b2c34ba2fdf7ba8babb9121e504f82b62620a0..5c435f1bc7710412fc0851b1a1879cb2b25d9ebb 100644 (file)
@@ -63,4 +63,3 @@ INIT_GDB_FILE (child_path_selftests)
   selftests::register_test ("child_path",
                            selftests::child_path::test);
 }
-
index b2ae383ddb10dc7701dd904be313066fd65187bc..e2f577aab81de22758b748ad239968b58d839fba 100644 (file)
@@ -85,4 +85,3 @@ INIT_GDB_FILE (mkdir_recursive_selftests)
   selftests::register_test ("mkdir_recursive",
                            selftests::mkdir_recursive::test);
 }
-