[5/9] Fix codespell false positives by ignoring

Message ID 20260603100516.144737-6-tdevries@suse.de
State New
Headers
Series Make gdb dir codespell-clean |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Test passed

Commit Message

Tom de Vries June 3, 2026, 10:05 a.m. UTC
  Fix codespell false positives in the gdb dir, by ignoring them.
---
 gdb/ada-lang.c           | 2 ++
 gdb/arc-linux-tdep.c     | 4 ++++
 gdb/avr-tdep.c           | 5 +++--
 gdb/bfin-linux-tdep.c    | 2 +-
 gdb/bfin-tdep.c          | 2 ++
 gdb/completer.h          | 2 +-
 gdb/cp-support.c         | 2 +-
 gdb/darwin-nat-info.c    | 2 +-
 gdb/displaced-stepping.h | 2 +-
 gdb/i387-tdep.c          | 2 ++
 gdb/mips-tdep.c          | 2 ++
 gdb/nds32-tdep.c         | 2 ++
 gdb/ppc-linux-tdep.c     | 4 ++--
 gdb/riscv-tdep.c         | 2 ++
 gdb/s390-linux-tdep.c    | 2 ++
 gdb/s390-tdep.c          | 6 ++++++
 gdb/source.c             | 3 ++-
 gdb/utils.c              | 4 +++-
 gdb/valprint.c           | 8 ++++----
 gdb/value.c              | 3 ++-
 gdb/x86-windows-nat.c    | 2 ++
 gdb/xtensa-xtregs.c      | 2 ++
 22 files changed, 49 insertions(+), 16 deletions(-)
  

Patch

diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index cb741647d47..823ec6d667e 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -813,6 +813,7 @@  ada_main_name ()
    of NULLs.  */
 
 const struct ada_opname_map ada_opname_table[] = {
+  /* codespell:ignore-begin.  */
   {"Oadd", "\"+\"", BINOP_ADD},
   {"Osubtract", "\"-\"", BINOP_SUB},
   {"Omultiply", "\"*\"", BINOP_MUL},
@@ -834,6 +835,7 @@  const struct ada_opname_map ada_opname_table[] = {
   {"Onot", "\"not\"", UNOP_LOGICAL_NOT},
   {"Oadd", "\"+\"", UNOP_PLUS},
   {"Osubtract", "\"-\"", UNOP_NEG},
+  /* codespell:ignore-end.  */
   {NULL, NULL}
 };
 
diff --git a/gdb/arc-linux-tdep.c b/gdb/arc-linux-tdep.c
index 04142c04557..572b39b27d4 100644
--- a/gdb/arc-linux-tdep.c
+++ b/gdb/arc-linux-tdep.c
@@ -337,6 +337,8 @@  arc_linux_sw_breakpoint_from_kind (struct gdbarch *gdbarch,
 	  : arc_linux_trap_s_le);
 }
 
+/* codespell:ignore-begin.  Ignore SCOND.  */
+
 /* Check for an atomic sequence of instructions beginning with an
    LLOCK instruction and ending with a SCOND instruction.
 
@@ -409,6 +411,8 @@  handle_atomic_sequence (arc_instruction insn, disassemble_info *di)
   return next_pcs;
 }
 
+/* codespell:ignore-end.  */
+
 /* Implement the "software_single_step" gdbarch method.  */
 
 static std::vector<CORE_ADDR>
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index f445a2db6ba..254ff891596 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -747,12 +747,13 @@  avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
 
   gdb_assert (vpc < AVR_MAX_PROLOGUE_SIZE);
 
-  /* Handle static small stack allocation using rcall or push.  */
+  /* Handle static small stack allocation using
+     rcall or push.  codespell:ignore rcall */
   avr_gdbarch_tdep *tdep = gdbarch_tdep<avr_gdbarch_tdep> (gdbarch);
   while (scan_stage == 1 && vpc < len)
     {
       insn = extract_unsigned_integer (&prologue[vpc], 2, byte_order);
-      if (insn == 0xd000)	/* rcall .+0 */
+      if (insn == 0xd000)	/* rcall .+0.  codespell:ignore rcall.  */
 	{
 	  info->size += tdep->call_length;
 	  vpc += 2;
diff --git a/gdb/bfin-linux-tdep.c b/gdb/bfin-linux-tdep.c
index a0f1dcf80a0..9688728a655 100644
--- a/gdb/bfin-linux-tdep.c
+++ b/gdb/bfin-linux-tdep.c
@@ -120,7 +120,7 @@  static const struct tramp_frame bfin_linux_sigframe =
   4,
   {
     { 0x00ADE128, 0xffffffff },	/* P0 = __NR_rt_sigreturn; */
-    { 0x00A0, 0xffff },		/* EXCPT 0; */
+    { 0x00A0, 0xffff },		/* EXCPT 0; codespell:ignore excpt.  */
     { TRAMP_SENTINEL_INSN, ULONGEST_MAX },
   },
   bfin_linux_sigframe_init,
diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
index 2a9e458e51c..a2094044beb 100644
--- a/gdb/bfin-tdep.c
+++ b/gdb/bfin-tdep.c
@@ -108,10 +108,12 @@ 
 #define P_RTS				0x0010
 /* MNOP  */
 #define P_MNOP				0xC803
+/* codespell:ignore-begin.  Ignore EXCPT.  */
 /* EXCPT, 16-bit, min  */
 #define P_EXCPT_MIN			0x00A0
 /* EXCPT, 16-bit, max  */
 #define P_EXCPT_MAX			0x00AF
+/* codespell:ignore-end.  */
 /* multi instruction mask 1, 16-bit  */
 #define P_BIT_MULTI_INS_1		0xC000
 /* multi instruction mask 2, 16-bit  */
diff --git a/gdb/completer.h b/gdb/completer.h
index be8f4814158..6ab1246fff1 100644
--- a/gdb/completer.h
+++ b/gdb/completer.h
@@ -203,7 +203,7 @@  class completion_match_for_lcd
 
   /* The ignored substring ranges within M_MATCH.  E.g., if we were
      looking for completion matches for C++ functions starting with
-       "functio"
+       "functio"	codespell:ignore functio
      and successfully match:
        "function[abi:cxx11](int)"
      the ignored ranges vector will contain an entry that delimits the
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index d040ad79469..c684d1a1723 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -2251,7 +2251,7 @@  test_cp_remove_params ()
   CHECK ("A::(anonymous namespace)",
 	 "A::(anonymous namespace)");
 
-  CHECK_INCOMPL ("A::(anonymou", "A");
+  CHECK_INCOMPL ("A::(anonymou", "A"); /* codespell:ignore anonymou.  */
 
   CHECK ("A::foo<int>()",
 	 "A::foo<int>");
diff --git a/gdb/darwin-nat-info.c b/gdb/darwin-nat-info.c
index d1befa7d8c3..4b7a27a0d5f 100644
--- a/gdb/darwin-nat-info.c
+++ b/gdb/darwin-nat-info.c
@@ -630,7 +630,7 @@  darwin_debug_regions_recurse (task_t task)
     }
   uiout->table_header (3, ui_left, "min-prot", "Min");
   uiout->table_header (3, ui_left, "max-prot", "Max");
-  uiout->table_header (5, ui_left, "inheritance", "Inh");
+  uiout->table_header (5, ui_left, "inheritance", "Inh"); /* codespell:ignore inh.  */
   uiout->table_header (9, ui_left, "share-mode", "Shr");
   uiout->table_header (1, ui_left, "depth", "D");
   uiout->table_header (3, ui_left, "submap", "Sm");
diff --git a/gdb/displaced-stepping.h b/gdb/displaced-stepping.h
index cff276827e0..c85f402e36e 100644
--- a/gdb/displaced-stepping.h
+++ b/gdb/displaced-stepping.h
@@ -61,7 +61,7 @@  displaced_step_prepare_status_str (displaced_step_prepare_status status)
     return "OK";
 
   case DISPLACED_STEP_PREPARE_STATUS_CANT:
-    return "CANT";
+    return "CANT"; /* codespell:ignore cant.  */
 
   case DISPLACED_STEP_PREPARE_STATUS_UNAVAILABLE:
     return "UNAVAILABLE";
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index f33f5ad046e..f22a5e02bbb 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -114,6 +114,7 @@  print_i387_status_word (int status_p,
 
   gdb_printf (file, "%s", hex_string_custom (status, 4));
   gdb_puts ("  ", file);
+  /* codespell:ignore-begin.  */
   gdb_printf (file, " %s", (status & 0x0001) ? "IE" : "  ");
   gdb_printf (file, " %s", (status & 0x0002) ? "DE" : "  ");
   gdb_printf (file, " %s", (status & 0x0004) ? "ZE" : "  ");
@@ -129,6 +130,7 @@  print_i387_status_word (int status_p,
   gdb_printf (file, " %s", (status & 0x0200) ? "C1" : "  ");
   gdb_printf (file, " %s", (status & 0x0400) ? "C2" : "  ");
   gdb_printf (file, " %s", (status & 0x4000) ? "C3" : "  ");
+  /* codespell:ignore-end.  */
 
   gdb_puts ("\n", file);
 
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 995a3b10915..fe0482fe5bf 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -2,8 +2,10 @@ 
 
    Copyright (C) 1988-2026 Free Software Foundation, Inc.
 
+   codespell:ignore-begin
    Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU
    and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin.
+   codespell:ignore-end
 
    This file is part of GDB.
 
diff --git a/gdb/nds32-tdep.c b/gdb/nds32-tdep.c
index 3640b31ec27..a00967d3396 100644
--- a/gdb/nds32-tdep.c
+++ b/gdb/nds32-tdep.c
@@ -329,6 +329,7 @@  static const reggroup *nds32_secur_reggroup;
 static void
 nds32_init_reggroups (void)
 {
+  /* codespell:ignore-begin.  */
   nds32_cr_reggroup = reggroup_new ("cr", USER_REGGROUP);
   nds32_ir_reggroup = reggroup_new ("ir", USER_REGGROUP);
   nds32_mr_reggroup = reggroup_new ("mr", USER_REGGROUP);
@@ -339,6 +340,7 @@  nds32_init_reggroups (void)
   nds32_racr_reggroup = reggroup_new ("racr", USER_REGGROUP);
   nds32_idr_reggroup = reggroup_new ("idr", USER_REGGROUP);
   nds32_secur_reggroup = reggroup_new ("secur", USER_REGGROUP);
+  /* codespell:ignore-end.  */
 }
 
 static void
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 07969454b39..abf624f8843 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -2064,7 +2064,7 @@  linux_dwarf2_omit_typedef_p (struct type *target_type,
 static const char *
 ppc64le_gnu_triplet_regexp (struct gdbarch *gdbarch)
 {
-  return "p(ower)?pc64le";
+  return "p(ower)?pc64le"; /* codespell:ignore.  */
 }
 
 /* Specify the powerpc64 target triplet.
@@ -2076,7 +2076,7 @@  ppc64le_gnu_triplet_regexp (struct gdbarch *gdbarch)
 static const char *
 ppc64_gnu_triplet_regexp (struct gdbarch *gdbarch)
 {
-  return "p(ower)?pc64";
+  return "p(ower)?pc64"; /* codespell:ignore.  */
 }
 
 /* Implement the linux_gcc_target_options method.  */
diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c
index 6b5c9c02d46..fe88379281c 100644
--- a/gdb/riscv-tdep.c
+++ b/gdb/riscv-tdep.c
@@ -1220,9 +1220,11 @@  riscv_print_one_register_info (struct gdbarch *gdbarch,
 	      d = value_as_long (val);
 	      xlen = size * 8;
 	      gdb_printf (file,
+			  /* codespell:ignore-begin.  */
 			  "\tSD:%X VM:%02X MXR:%X PUM:%X MPRV:%X XS:%X "
 			  "FS:%X MPP:%x HPP:%X SPP:%X MPIE:%X HPIE:%X "
 			  "SPIE:%X UPIE:%X MIE:%X HIE:%X SIE:%X UIE:%X",
+			  /* codespell:ignore-end.  */
 			  (int) ((d >> (xlen - 1)) & 0x1),
 			  (int) ((d >> 24) & 0x1f),
 			  (int) ((d >> 19) & 0x1),
diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c
index 3cd6b359d13..174e0479fbe 100644
--- a/gdb/s390-linux-tdep.c
+++ b/gdb/s390-linux-tdep.c
@@ -336,6 +336,7 @@  s390_core_read_description (struct gdbarch *gdbarch,
   asection *section = bfd_get_section_by_name (abfd, ".reg");
   std::optional<gdb::byte_vector> auxv = target_read_auxv_raw (target);
   CORE_ADDR hwcap = linux_get_hwcap (auxv, target, gdbarch);
+  /* codespell:ignore-begin.  */
   bool high_gprs, v1, v2, te, vx, gs;
 
   if (!section)
@@ -370,6 +371,7 @@  s390_core_read_description (struct gdbarch *gdbarch,
 	      te ? tdesc_s390x_te_linux64 :
 	      v2 ? tdesc_s390x_linux64v2 :
 	      v1 ? tdesc_s390x_linux64v1 : tdesc_s390x_linux64).get ();
+  /* codespell:ignore-end.  */
 
     default:
       return NULL;
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index f9d7bdd04e4..55efdd82895 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -301,6 +301,7 @@  s390_is_partial_instruction (struct gdbarch *gdbarch, CORE_ADDR loc, int *len)
       break;
     }
 
+  /* codespell:ignore-begin.  */
   switch (insn)
     {
     case 0xb255: /* MVST */
@@ -325,6 +326,7 @@  s390_is_partial_instruction (struct gdbarch *gdbarch, CORE_ADDR loc, int *len)
       *len = 4;
       return 1;
     }
+  /* codespell:ignore-end.  */
 
   return 0;
 }
@@ -3372,6 +3374,7 @@  s390_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
 	return -1;
       break;
 
+    /* codespell:ignore-begin.  */
     case 0x20: /* LPDR - load positive */
     case 0x30: /* LPER - load positive */
     case 0x21: /* LNDR - load negative */
@@ -3396,6 +3399,7 @@  s390_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
     case 0x3f: /* SUR - subtract unnormalized */
     case 0x6f: /* SW - subtract unnormalized */
     case 0x7f: /* SU - subtract unnormalized */
+    /* codespell:ignore-end.  */
       /* float destination + flags */
       if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + inib[2]))
 	return -1;
@@ -3922,7 +3926,9 @@  s390_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
 
 	/* 0xb29e-0xb2a4 undefined */
 
+	/* codespell:ignore-begin.  */
 	case 0xb2a5: /* TRE - translate extended [partial] */
+	/* codespell:ignore-end.  */
 	  regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + inib[6], &tmp);
 	  oaddr = s390_record_address_mask (gdbarch, regcache, tmp);
 	  regcache_raw_read_unsigned (regcache, S390_R0_REGNUM + (inib[6] | 1), &tmp);
diff --git a/gdb/source.c b/gdb/source.c
index 6f8afb560d2..6028c29deae 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1923,7 +1923,8 @@  The address is also stored as the value of \"$_\"."));
 Search for regular expression (see regex(3)) from last line listed.\n\
 The matching line number is also stored as the value of \"$_\"."));
   add_com_alias ("search", forward_search_cmd, class_files, 0);
-  add_com_alias ("fo", forward_search_cmd, class_files, 1);
+  add_com_alias ("fo", /* codespell:ignore.  */
+		 forward_search_cmd, class_files, 1);
 
   cmd_list_element *reverse_search_cmd
     = add_com ("reverse-search", class_files, reverse_search_command, _("\
diff --git a/gdb/utils.c b/gdb/utils.c
index 4f99cdb425b..4a46ed34f4c 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -2937,7 +2937,9 @@  strncmp_iw_with_mode_tests ()
 	       "\tfoo\t<\tbar\t<\tbaz\t<\tquxi\t>\t>\t>\t(int)", NORMAL);
   CHECK_MATCH ("foo<bar<baz<quxi>>>(int)",
 	       " \tfoo \t< \tbar \t< \tbaz \t< \tquxi \t> \t> \t> \t( \tint \t)", NORMAL);
-  CHECK_MATCH ("foo<bar<baz>>::foo(quxi &)", "fo", NORMAL);
+  CHECK_MATCH ("foo<bar<baz>>::foo(quxi &)",
+	       "fo", /* codespell:ignore.  */
+	       NORMAL);
   CHECK_MATCH ("foo<bar<baz>>::foo(quxi &)", "foo", NORMAL);
   CHECK_MATCH ("foo<bar<baz>>::foo(quxi &)", "foo<bar<baz>>::", NORMAL);
   CHECK_MATCH ("foo<bar<baz>>::foo(quxi &)", "foo<bar<baz> >::foo", NORMAL);
diff --git a/gdb/valprint.c b/gdb/valprint.c
index b266db550d1..dc252c7e331 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -1334,10 +1334,10 @@  value_print_scalar_formatted (struct value *val,
 }
 
 /* Print a number according to FORMAT which is one of d,u,x,o,b,h,w,g.
-   The raison d'etre of this function is to consolidate printing of
-   LONG_LONG's into this one function.  The format chars b,h,w,g are
-   from print_scalar_formatted().  Numbers are printed using C
-   format.
+   The codespell:ignore-begin raison d'etre codespell:ignore-end of this
+   function is to consolidate printing of LONG_LONG's into this one function.
+   The format chars b,h,w,g are from print_scalar_formatted().  Numbers are
+   printed using C format.
 
    USE_C_FORMAT means to use C format in all cases.  Without it,
    'o' and 'x' format do not include the standard C radix prefix
diff --git a/gdb/value.c b/gdb/value.c
index 7213afa8147..168427770c1 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -1717,7 +1717,8 @@  value::record_latest ()
 
   /* We preserve VALUE_LVAL so that the user can find out where it was fetched
      from.  This is a bit dubious, because then *&$1 does not just return $1
-     but the current contents of that location.  c'est la vie...  */
+     but the current contents of that location.  codespell:ignore-begin
+     C'est la vie... codespell:ignore-end.  */
   set_modifiable (false);
 
   value_history.push_back (release_value (this));
diff --git a/gdb/x86-windows-nat.c b/gdb/x86-windows-nat.c
index 61764da8deb..27adeb1f154 100644
--- a/gdb/x86-windows-nat.c
+++ b/gdb/x86-windows-nat.c
@@ -418,6 +418,7 @@  display_selector (HANDLE thread, DWORD sel)
     {
       return get_thread_selector_entry (context, thread, sel, &info);
     });
+  /* codespell:ignore-begin.  */
   if (ret)
     {
       int base, limit;
@@ -490,6 +491,7 @@  display_selector (HANDLE thread, DWORD sel)
 	gdb_printf ("Invalid selector 0x%x.\n", (unsigned) sel);
       return 0;
     }
+  /* codespell:ignore-end.  */
 }
 
 static void
diff --git a/gdb/xtensa-xtregs.c b/gdb/xtensa-xtregs.c
index 1b35308af12..23e153f9ddb 100644
--- a/gdb/xtensa-xtregs.c
+++ b/gdb/xtensa-xtregs.c
@@ -33,7 +33,9 @@  typedef struct
 
 const xtensa_regtable_t xtensa_regmap_table[] =
 {
+  /* codespell:ignore-begin.  */
   /* gnum,gofs,cpofs,ofs,siz,cp, dbnum,  name */
+  /* codespell:ignore-end.  */
   {   44, 176,   0,   0,  4, -1, 0x020c, "scompare1" },
   { 0 }
 };