Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/9] [gdb] Make gdb dir codespell-clean
@ 2026-06-03 10:05 Tom de Vries
  2026-06-03 10:05 ` [PATCH 1/9] [gdb] Drop executable mode in some files Tom de Vries
                   ` (9 more replies)
  0 siblings, 10 replies; 14+ messages in thread
From: Tom de Vries @ 2026-06-03 10:05 UTC (permalink / raw)
  To: gdb-patches

This patch series make the gdb dir codespell-clean.

It starts out with two unrelated patches:
- the first fixes a problem found during review.
- the second adds brief description lines in codespell-ignore-words.txt.

A few following patches fix codespell errors, each in a different way.

The pre-last patch adds the gdb dir to the pre-commit codespell check.

The last patch move selection of files to check from .pre-commit-config.yaml
to gdb/pyproject.toml.

Tom de Vries (9):
  [gdb] Drop executable mode in some files
  [gdb/contrib] Describe words in codespell-ignore-words.txt
  [gdb/contrib] Extend codespell-ignore-words.txt
  [gdb] Fix typos
  [gdb] Fix codespell false positives by ignoring
  [gdb] Fix codespell false positive by string splitting
  [gdb] Fix codespell false positives by renaming
  [pre-commit] Include gdb in codespell check
  [pre-commit] Simplify codespell configuration

 .pre-commit-config.yaml                       |   2 +-
 gdb/ada-lang.c                                |   4 +-
 gdb/amd64-tdep.c                              |   2 +-
 gdb/arc-linux-tdep.c                          |   4 +
 gdb/arm-linux-nat.c                           |   6 +-
 gdb/arm-tdep.c                                |   2 +-
 gdb/avr-tdep.c                                |   5 +-
 gdb/bfin-linux-tdep.c                         |   2 +-
 gdb/bfin-tdep.c                               |   2 +
 gdb/buildsym.c                                |   6 +-
 gdb/buildsym.h                                |   2 +-
 gdb/completer.c                               |  10 +-
 gdb/completer.h                               |   2 +-
 gdb/contrib/codespell-ignore-words.txt        |  26 +++
 gdb/cp-support.c                              |   2 +-
 gdb/darwin-nat-info.c                         |   2 +-
 gdb/displaced-stepping.h                      |   2 +-
 gdb/gdbtypes.c                                |  16 +-
 gdb/i386-tdep.c                               | 170 +++++++++---------
 gdb/i387-tdep.c                               |   2 +
 gdb/infrun.c                                  |   2 +-
 gdb/infrun.h                                  |   2 +-
 gdb/loongarch-tdep.c                          |   2 +-
 gdb/mips-linux-nat.c                          |   2 +-
 gdb/mips-tdep.c                               |   2 +
 gdb/nds32-tdep.c                              |   2 +
 gdb/ppc-linux-nat.c                           |   4 +-
 gdb/ppc-linux-tdep.c                          |   8 +-
 gdb/printcmd.c                                |   6 +-
 gdb/pyproject.toml                            |   5 +-
 gdb/remote.c                                  |   4 +-
 gdb/riscv-tdep.c                              |   2 +
 gdb/s390-linux-tdep.c                         |   2 +
 gdb/s390-tdep.c                               |   6 +
 gdb/ser-event.c                               |  14 +-
 gdb/source.c                                  |   3 +-
 gdb/symtab.c                                  |   4 +-
 gdb/testsuite/gdb.arch/amd64-lam.c            |   0
 .../gdb.base/jump_multiple_objfiles-foo.c     |   0
 .../gdb.base/jump_multiple_objfiles.c         |   0
 .../gdb.base/jump_multiple_objfiles.exp       |   0
 .../gdb.base/jump_multiple_objfiles.h         |   0
 gdb/testsuite/gdb.btrace/exception.exp        |   0
 gdb/testsuite/gdb.fortran/nested-funcs.exp    |   0
 gdb/testsuite/gdb.fortran/nested-funcs.f90    |   0
 gdb/testsuite/gdb.fortran/oop_extend_type.exp |   0
 gdb/testsuite/gdb.fortran/oop_extend_type.f90 |   0
 gdb/testsuite/gdb.fortran/print_type.exp      |   0
 gdb/testsuite/gdb.fortran/vla-type.exp        |   0
 gdb/testsuite/gdb.fortran/vla-type.f90        |   0
 .../gdb.testsuite/gdb_test_multiple-lbl.gdb   |   0
 gdb/testsuite/lib/compiler.cc                 |   0
 gdb/utils.c                                   |   4 +-
 gdb/valprint.c                                |   8 +-
 gdb/value.c                                   |   3 +-
 gdb/windows-nat.c                             |  12 +-
 gdb/windows-nat.h                             |   2 +-
 gdb/x86-windows-nat.c                         |   2 +
 gdb/xcoffread.c                               |   2 +-
 gdb/xtensa-tdep.c                             |   2 +-
 gdb/xtensa-xtregs.c                           |   2 +
 gdb/z80-tdep.c                                |   2 +-
 62 files changed, 220 insertions(+), 158 deletions(-)
 mode change 100755 => 100644 gdb/amd64-tdep.c
 mode change 100755 => 100644 gdb/testsuite/gdb.arch/amd64-lam.c
 mode change 100755 => 100644 gdb/testsuite/gdb.base/jump_multiple_objfiles-foo.c
 mode change 100755 => 100644 gdb/testsuite/gdb.base/jump_multiple_objfiles.c
 mode change 100755 => 100644 gdb/testsuite/gdb.base/jump_multiple_objfiles.exp
 mode change 100755 => 100644 gdb/testsuite/gdb.base/jump_multiple_objfiles.h
 mode change 100755 => 100644 gdb/testsuite/gdb.btrace/exception.exp
 mode change 100755 => 100644 gdb/testsuite/gdb.fortran/nested-funcs.exp
 mode change 100755 => 100644 gdb/testsuite/gdb.fortran/nested-funcs.f90
 mode change 100755 => 100644 gdb/testsuite/gdb.fortran/oop_extend_type.exp
 mode change 100755 => 100644 gdb/testsuite/gdb.fortran/oop_extend_type.f90
 mode change 100755 => 100644 gdb/testsuite/gdb.fortran/print_type.exp
 mode change 100755 => 100644 gdb/testsuite/gdb.fortran/vla-type.exp
 mode change 100755 => 100644 gdb/testsuite/gdb.fortran/vla-type.f90
 mode change 100755 => 100644 gdb/testsuite/gdb.testsuite/gdb_test_multiple-lbl.gdb
 mode change 100755 => 100644 gdb/testsuite/lib/compiler.cc


base-commit: 22e21551bd7eb2fe14cdebfb4d89d51e5d93b7dd
-- 
2.51.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/9] [gdb] Drop executable mode in some files
  2026-06-03 10:05 [PATCH 0/9] [gdb] Make gdb dir codespell-clean Tom de Vries
@ 2026-06-03 10:05 ` Tom de Vries
  2026-06-04 20:05   ` Simon Marchi
  2026-06-03 10:05 ` [PATCH 2/9] [gdb/contrib] Describe words in codespell-ignore-words.txt Tom de Vries
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 14+ messages in thread
From: Tom de Vries @ 2026-06-03 10:05 UTC (permalink / raw)
  To: gdb-patches

During a review, Claude Code noticed that gdb/amd64-tdep.c has executable
mode.

This was added by accident in commit f9aa48dc545 ("gdb, amd64: extend the
amd64 prologue analyzer to skip register pushes").

Fix this, and similar problems in other files.
---
 gdb/amd64-tdep.c                                      | 0
 gdb/testsuite/gdb.arch/amd64-lam.c                    | 0
 gdb/testsuite/gdb.base/jump_multiple_objfiles-foo.c   | 0
 gdb/testsuite/gdb.base/jump_multiple_objfiles.c       | 0
 gdb/testsuite/gdb.base/jump_multiple_objfiles.exp     | 0
 gdb/testsuite/gdb.base/jump_multiple_objfiles.h       | 0
 gdb/testsuite/gdb.btrace/exception.exp                | 0
 gdb/testsuite/gdb.fortran/nested-funcs.exp            | 0
 gdb/testsuite/gdb.fortran/nested-funcs.f90            | 0
 gdb/testsuite/gdb.fortran/oop_extend_type.exp         | 0
 gdb/testsuite/gdb.fortran/oop_extend_type.f90         | 0
 gdb/testsuite/gdb.fortran/print_type.exp              | 0
 gdb/testsuite/gdb.fortran/vla-type.exp                | 0
 gdb/testsuite/gdb.fortran/vla-type.f90                | 0
 gdb/testsuite/gdb.testsuite/gdb_test_multiple-lbl.gdb | 0
 gdb/testsuite/lib/compiler.cc                         | 0
 16 files changed, 0 insertions(+), 0 deletions(-)
 mode change 100755 => 100644 gdb/amd64-tdep.c
 mode change 100755 => 100644 gdb/testsuite/gdb.arch/amd64-lam.c
 mode change 100755 => 100644 gdb/testsuite/gdb.base/jump_multiple_objfiles-foo.c
 mode change 100755 => 100644 gdb/testsuite/gdb.base/jump_multiple_objfiles.c
 mode change 100755 => 100644 gdb/testsuite/gdb.base/jump_multiple_objfiles.exp
 mode change 100755 => 100644 gdb/testsuite/gdb.base/jump_multiple_objfiles.h
 mode change 100755 => 100644 gdb/testsuite/gdb.btrace/exception.exp
 mode change 100755 => 100644 gdb/testsuite/gdb.fortran/nested-funcs.exp
 mode change 100755 => 100644 gdb/testsuite/gdb.fortran/nested-funcs.f90
 mode change 100755 => 100644 gdb/testsuite/gdb.fortran/oop_extend_type.exp
 mode change 100755 => 100644 gdb/testsuite/gdb.fortran/oop_extend_type.f90
 mode change 100755 => 100644 gdb/testsuite/gdb.fortran/print_type.exp
 mode change 100755 => 100644 gdb/testsuite/gdb.fortran/vla-type.exp
 mode change 100755 => 100644 gdb/testsuite/gdb.fortran/vla-type.f90
 mode change 100755 => 100644 gdb/testsuite/gdb.testsuite/gdb_test_multiple-lbl.gdb
 mode change 100755 => 100644 gdb/testsuite/lib/compiler.cc

diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
old mode 100755
new mode 100644
diff --git a/gdb/testsuite/gdb.arch/amd64-lam.c b/gdb/testsuite/gdb.arch/amd64-lam.c
old mode 100755
new mode 100644
diff --git a/gdb/testsuite/gdb.base/jump_multiple_objfiles-foo.c b/gdb/testsuite/gdb.base/jump_multiple_objfiles-foo.c
old mode 100755
new mode 100644
diff --git a/gdb/testsuite/gdb.base/jump_multiple_objfiles.c b/gdb/testsuite/gdb.base/jump_multiple_objfiles.c
old mode 100755
new mode 100644
diff --git a/gdb/testsuite/gdb.base/jump_multiple_objfiles.exp b/gdb/testsuite/gdb.base/jump_multiple_objfiles.exp
old mode 100755
new mode 100644
diff --git a/gdb/testsuite/gdb.base/jump_multiple_objfiles.h b/gdb/testsuite/gdb.base/jump_multiple_objfiles.h
old mode 100755
new mode 100644
diff --git a/gdb/testsuite/gdb.btrace/exception.exp b/gdb/testsuite/gdb.btrace/exception.exp
old mode 100755
new mode 100644
diff --git a/gdb/testsuite/gdb.fortran/nested-funcs.exp b/gdb/testsuite/gdb.fortran/nested-funcs.exp
old mode 100755
new mode 100644
diff --git a/gdb/testsuite/gdb.fortran/nested-funcs.f90 b/gdb/testsuite/gdb.fortran/nested-funcs.f90
old mode 100755
new mode 100644
diff --git a/gdb/testsuite/gdb.fortran/oop_extend_type.exp b/gdb/testsuite/gdb.fortran/oop_extend_type.exp
old mode 100755
new mode 100644
diff --git a/gdb/testsuite/gdb.fortran/oop_extend_type.f90 b/gdb/testsuite/gdb.fortran/oop_extend_type.f90
old mode 100755
new mode 100644
diff --git a/gdb/testsuite/gdb.fortran/print_type.exp b/gdb/testsuite/gdb.fortran/print_type.exp
old mode 100755
new mode 100644
diff --git a/gdb/testsuite/gdb.fortran/vla-type.exp b/gdb/testsuite/gdb.fortran/vla-type.exp
old mode 100755
new mode 100644
diff --git a/gdb/testsuite/gdb.fortran/vla-type.f90 b/gdb/testsuite/gdb.fortran/vla-type.f90
old mode 100755
new mode 100644
diff --git a/gdb/testsuite/gdb.testsuite/gdb_test_multiple-lbl.gdb b/gdb/testsuite/gdb.testsuite/gdb_test_multiple-lbl.gdb
old mode 100755
new mode 100644
diff --git a/gdb/testsuite/lib/compiler.cc b/gdb/testsuite/lib/compiler.cc
old mode 100755
new mode 100644
-- 
2.51.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 2/9] [gdb/contrib] Describe words in codespell-ignore-words.txt
  2026-06-03 10:05 [PATCH 0/9] [gdb] Make gdb dir codespell-clean Tom de Vries
  2026-06-03 10:05 ` [PATCH 1/9] [gdb] Drop executable mode in some files Tom de Vries
@ 2026-06-03 10:05 ` Tom de Vries
  2026-06-03 10:05 ` [PATCH 3/9] [gdb/contrib] Extend codespell-ignore-words.txt Tom de Vries
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Tom de Vries @ 2026-06-03 10:05 UTC (permalink / raw)
  To: gdb-patches

For each word in codespell-ignore-words.txt, add a line briefly describing
its meaning.
---
 gdb/contrib/codespell-ignore-words.txt | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gdb/contrib/codespell-ignore-words.txt b/gdb/contrib/codespell-ignore-words.txt
index 4a409d0aed1..c1438bfc786 100644
--- a/gdb/contrib/codespell-ignore-words.txt
+++ b/gdb/contrib/codespell-ignore-words.txt
@@ -19,11 +19,19 @@
 #
 # [1] https://github.com/codespell-project/codespell/issues/2063
 
+# Autoconf related things, like tools and files.
 configury
+# Scalable Matrix Extension.
 sme
+# Company name.
 Synopsys
+# As in DWARF section .debug_aranges.
 aranges
+# Floating Point Register.
 fpr
+# Parameter.
 parm
+# As in "wither away".
 wither
+# SystemTap.
 stap
-- 
2.51.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 3/9] [gdb/contrib] Extend codespell-ignore-words.txt
  2026-06-03 10:05 [PATCH 0/9] [gdb] Make gdb dir codespell-clean Tom de Vries
  2026-06-03 10:05 ` [PATCH 1/9] [gdb] Drop executable mode in some files Tom de Vries
  2026-06-03 10:05 ` [PATCH 2/9] [gdb/contrib] Describe words in codespell-ignore-words.txt Tom de Vries
@ 2026-06-03 10:05 ` Tom de Vries
  2026-06-03 10:05 ` [PATCH 4/9] [gdb] Fix typos Tom de Vries
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Tom de Vries @ 2026-06-03 10:05 UTC (permalink / raw)
  To: gdb-patches

Add more words to ignore in codespell-ignore-words.txt.
---
 gdb/contrib/codespell-ignore-words.txt | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gdb/contrib/codespell-ignore-words.txt b/gdb/contrib/codespell-ignore-words.txt
index c1438bfc786..d443f6c7123 100644
--- a/gdb/contrib/codespell-ignore-words.txt
+++ b/gdb/contrib/codespell-ignore-words.txt
@@ -35,3 +35,21 @@ parm
 wither
 # SystemTap.
 stap
+# An includer includes an includee.
+includee
+# Stepping using next.
+nexting
+# Parameters.
+parms
+# System Object Model.
+SOM
+# Short for static variables and/or functions.
+statics
+# Structured Exception Handling.
+seh
+# Abbreviation for index.
+indx
+# Heterogeneous System Architecture.
+HSA
+# Grand Unified Debugger.
+GUD
-- 
2.51.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 4/9] [gdb] Fix typos
  2026-06-03 10:05 [PATCH 0/9] [gdb] Make gdb dir codespell-clean Tom de Vries
                   ` (2 preceding siblings ...)
  2026-06-03 10:05 ` [PATCH 3/9] [gdb/contrib] Extend codespell-ignore-words.txt Tom de Vries
@ 2026-06-03 10:05 ` Tom de Vries
  2026-06-03 10:05 ` [PATCH 5/9] [gdb] Fix codespell false positives by ignoring Tom de Vries
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Tom de Vries @ 2026-06-03 10:05 UTC (permalink / raw)
  To: gdb-patches

Fix typos in the gdb dir.
---
 gdb/arm-linux-nat.c  | 2 +-
 gdb/buildsym.c       | 6 +++---
 gdb/buildsym.h       | 2 +-
 gdb/infrun.c         | 2 +-
 gdb/infrun.h         | 2 +-
 gdb/loongarch-tdep.c | 2 +-
 gdb/ppc-linux-tdep.c | 4 ++--
 gdb/windows-nat.c    | 6 +++---
 gdb/xcoffread.c      | 2 +-
 gdb/z80-tdep.c       | 2 +-
 10 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
index b3d4ce1ec37..fdfe79a9f58 100644
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -711,7 +711,7 @@ struct arm_linux_hw_breakpoint
    for caching address and control information.
 
    The Linux ptrace interface to hardware break-/watch-points presents the
-   values in a vector centred around 0 (which is used fo generic information).
+   values in a vector centred around 0 (which is used for generic information).
    Positive indices refer to breakpoint addresses/control registers, negative
    indices to watchpoint addresses/control registers.
 
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 9799af17f32..94bc5a24edb 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -924,15 +924,15 @@ buildsym_compunit::augment_type_symtab ()
     }
 }
 
-/* Push a context block.  VALU is the starting PC address of this
+/* Push a context block.  VALUE is the starting PC address of this
    context.  */
 
 void
-buildsym_compunit::push_context (CORE_ADDR valu)
+buildsym_compunit::push_context (CORE_ADDR value)
 {
   m_context_stack.emplace_back (std::move (m_local_symbols),
 				m_local_using_directives,
-				m_pending_blocks, valu);
+				m_pending_blocks, value);
   m_local_using_directives = nullptr;
 }
 
diff --git a/gdb/buildsym.h b/gdb/buildsym.h
index c9010665bce..c46f75e6511 100644
--- a/gdb/buildsym.h
+++ b/gdb/buildsym.h
@@ -218,7 +218,7 @@ struct buildsym_compunit
     m_producer = producer;
   }
 
-  void push_context (CORE_ADDR valu);
+  void push_context (CORE_ADDR value);
 
   /* Pop a context and create the corresponding block.  Returns the
      block.  END_ADDR is the final address of the block.  STATIC_LINK,
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 11c5d5214d6..f246af57c3e 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -7006,7 +7006,7 @@ handle_signal_stop (struct execution_control_state *ecs)
 
 	  std::string addr_str;
 	  if (addr_list.empty ())
-	    addr_str = "(no data addressses available)";
+	    addr_str = "(no data addresses available)";
 	  else
 	    {
 	      for (const CORE_ADDR addr : addr_list)
diff --git a/gdb/infrun.h b/gdb/infrun.h
index 42c867ce303..cbc603b74ed 100644
--- a/gdb/infrun.h
+++ b/gdb/infrun.h
@@ -129,7 +129,7 @@ extern void start_remote (int from_tty);
    continued or stepped.  First do this, then set the ones you want,
    then call `proceed'.  STEP indicates whether we're preparing for a
    step/stepi command.  Set ABOUT_TO_PROCEED to false if we're not
-   calling `proceeed` yet.  */
+   calling `proceed` yet.  */
 extern void clear_proceed_status (int step, bool about_to_proceed = true);
 
 extern void proceed (CORE_ADDR, enum gdb_signal);
diff --git a/gdb/loongarch-tdep.c b/gdb/loongarch-tdep.c
index 225b1abb703..8bf4d33012a 100644
--- a/gdb/loongarch-tdep.c
+++ b/gdb/loongarch-tdep.c
@@ -734,7 +734,7 @@ loongarch_frame_prev_register (const frame_info_ptr &this_frame,
 
   /* If we are asked to unwind the PC, then we need to return the RA
      instead.  The prologue may save PC, but it will point into this
-     frame's prologue, not the previou frame's resume location.  */
+     frame's prologue, not the previous frame's resume location.  */
   if (regnum == LOONGARCH_PC_REGNUM)
     {
       CORE_ADDR ra;
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 19698eaacbe..07969454b39 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -574,7 +574,7 @@ static const struct regset ppc32_linux_vsxregset = {
   regcache_collect_regset
 };
 
-/* Program Priorty Register regmap.  */
+/* Program Priority Register regmap.  */
 
 static const struct regcache_map_entry ppc32_regmap_ppr[] =
   {
@@ -582,7 +582,7 @@ static const struct regcache_map_entry ppc32_regmap_ppr[] =
       { 0 }
   };
 
-/* Program Priorty Register regset.  */
+/* Program Priority Register regset.  */
 
 const struct regset ppc32_linux_pprregset = {
   ppc32_regmap_ppr,
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index d9e924f16c6..61942a83797 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -133,7 +133,7 @@ the process.  In fact, it seldom is.  E.g., if the main thread calls
 ExitProcess (or returns from main, which ends up calling ExitProcess),
 then we typically see a EXIT_THREAD_DEBUG_EVENT event for the main
 thread first, followed by more EXIT_THREAD_DEBUG_EVENT events for
-other threads, and then finaly the EXIT_PROCESS_DEBUG_EVENT for
+other threads, and then finally the EXIT_PROCESS_DEBUG_EVENT for
 whatever thread happened to be the last one to exit.
 
 When a thread reports EXIT_THREAD_DEBUG_EVENT /
@@ -259,7 +259,7 @@ wants the "sig" thread to be running.
 This isn't ideal, since this means that with user-visible non-stop,
 the inferior will only be able to process and report one signal at a
 time (as the "sig" thread is responsible for that), but that seems
-like an acceptible compromise, better than not being able to have the
+like an acceptable compromise, better than not being able to have the
 target work in non-stop by default on Cygwin.  */
 
 using namespace windows_nat;
@@ -1269,7 +1269,7 @@ windows_nat_target::stop_one_thread (windows_thread_info *th,
 	      stop and calls windows_continue on this thread.  */
 	   && stopping_kind == SK_EXTERNAL)
     {
-      DEBUG_EVENTS ("explict stop for \"sig\" thread %s held for signal",
+      DEBUG_EVENTS ("explicit stop for \"sig\" thread %s held for signal",
 		    thr_ptid.to_string ().c_str ());
 
       th->stopping = stopping_kind;
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 73662c47c3d..08d5d810c6f 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -235,7 +235,7 @@ xcoff_get_toc_offset (objfile *objfile)
   return 0;
 }
 
-/* This function is used to read minimal sysmbols from the XCOFF STABS
+/* This function is used to read minimal symbols from the XCOFF STABS
    symbol table. This function needs to be called when a library (like
    libc) in AIX is compiled using xlc whose debug format is STABS.
    When STABS debug information is not available, then in the backtrace
diff --git a/gdb/z80-tdep.c b/gdb/z80-tdep.c
index f7e207d02ec..9aba5d3df45 100644
--- a/gdb/z80-tdep.c
+++ b/gdb/z80-tdep.c
@@ -1423,7 +1423,7 @@ z80_get_insn_info (struct gdbarch *gdbarch, const gdb_byte *buf, int *size)
 	case insn_adl:
 	  info = &ez80_adl_main_insn_table[0];
 	  break;
-	/*  These two (for GameBoy Z80 & Z80 Next CPUs) haven't been tested.
+	/*  These two (for Game Boy Z80 & Z80 Next CPUs) haven't been tested.
 
 	case bfd_mach_gbz80:
 	  info = &gbz80_main_insn_table[0];
-- 
2.51.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 5/9] [gdb] Fix codespell false positives by ignoring
  2026-06-03 10:05 [PATCH 0/9] [gdb] Make gdb dir codespell-clean Tom de Vries
                   ` (3 preceding siblings ...)
  2026-06-03 10:05 ` [PATCH 4/9] [gdb] Fix typos Tom de Vries
@ 2026-06-03 10:05 ` Tom de Vries
  2026-06-03 10:05 ` [PATCH 6/9] [gdb] Fix codespell false positive by string splitting Tom de Vries
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Tom de Vries @ 2026-06-03 10:05 UTC (permalink / raw)
  To: gdb-patches

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(-)

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 }
 };
-- 
2.51.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 6/9] [gdb] Fix codespell false positive by string splitting
  2026-06-03 10:05 [PATCH 0/9] [gdb] Make gdb dir codespell-clean Tom de Vries
                   ` (4 preceding siblings ...)
  2026-06-03 10:05 ` [PATCH 5/9] [gdb] Fix codespell false positives by ignoring Tom de Vries
@ 2026-06-03 10:05 ` Tom de Vries
  2026-06-03 10:05 ` [PATCH 7/9] [gdb] Fix codespell false positives by renaming Tom de Vries
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Tom de Vries @ 2026-06-03 10:05 UTC (permalink / raw)
  To: gdb-patches

Fix codespell false positive in gdb dir, by string splitting.
---
 gdb/ada-lang.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 823ec6d667e..ea7c29bbde7 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -9370,7 +9370,7 @@ ada_aggregate_component::dump (ui_file *stream, int depth)
   gdb_printf (stream, _("%*sAggregate\n"), depth, "");
   if (m_base != nullptr)
     {
-      gdb_printf (stream, _("%*swith delta\n"), depth + 1, "");
+      gdb_printf (stream, _("%*s" "with delta\n"), depth + 1, "");
       m_base->dump (stream, depth + 2);
     }
   for (const auto &item : m_components)
-- 
2.51.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 7/9] [gdb] Fix codespell false positives by renaming
  2026-06-03 10:05 [PATCH 0/9] [gdb] Make gdb dir codespell-clean Tom de Vries
                   ` (5 preceding siblings ...)
  2026-06-03 10:05 ` [PATCH 6/9] [gdb] Fix codespell false positive by string splitting Tom de Vries
@ 2026-06-03 10:05 ` Tom de Vries
  2026-06-03 10:05 ` [PATCH 8/9] [pre-commit] Include gdb in codespell check Tom de Vries
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Tom de Vries @ 2026-06-03 10:05 UTC (permalink / raw)
  To: gdb-patches

Fix codespell false positives in gdb dir, by renaming identifiers and
splitting words.
---
 gdb/amd64-tdep.c     |   2 +-
 gdb/arm-linux-nat.c  |   4 +-
 gdb/arm-tdep.c       |   2 +-
 gdb/completer.c      |  10 +--
 gdb/gdbtypes.c       |  16 ++--
 gdb/i386-tdep.c      | 170 ++++++++++++++++++++++---------------------
 gdb/mips-linux-nat.c |   2 +-
 gdb/ppc-linux-nat.c  |   4 +-
 gdb/printcmd.c       |   6 +-
 gdb/remote.c         |   4 +-
 gdb/ser-event.c      |  14 ++--
 gdb/symtab.c         |   4 +-
 gdb/windows-nat.c    |   6 +-
 gdb/windows-nat.h    |   2 +-
 gdb/xtensa-tdep.c    |   2 +-
 15 files changed, 125 insertions(+), 123 deletions(-)

diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index 0d23abb3164..99448a98f61 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -725,7 +725,7 @@ amd64_classify (struct type *type, enum amd64_reg_class theclass[2])
   /* Arguments of complex T - where T is one of the types _Float16, float or
      double - get treated as if they are implemented as:
 
-     struct complexT {
+     struct complex_T {
        T real;
        T imag;
      };
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
index fdfe79a9f58..5f9c5998334 100644
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -659,7 +659,7 @@ arm_linux_get_hw_watchpoint_count (void)
    there is not an appropriate resource available, otherwise returns 1.  */
 int
 arm_linux_nat_target::can_use_hw_breakpoint (enum bptype type,
-					     int cnt, int ot)
+					     int cnt, int othertype)
 {
   if (type == bp_hardware_watchpoint || type == bp_read_watchpoint
       || type == bp_access_watchpoint || type == bp_watchpoint)
@@ -668,7 +668,7 @@ arm_linux_nat_target::can_use_hw_breakpoint (enum bptype type,
 
       if (count == 0)
 	return 0;
-      else if (cnt + ot > count)
+      else if (cnt + othertype > count)
 	return -1;
     }
   else if (type == bp_hardware_breakpoint)
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 08cce9dbad8..562d10b8e0c 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -4450,7 +4450,7 @@ arm_vfp_cprc_sub_candidate (struct type *t,
       /* Arguments of complex T where T is one of the types float or
 	 double get treated as if they are implemented as:
 
-	 struct complexT
+	 struct complex_T
 	 {
 	   T real;
 	   T imag;
diff --git a/gdb/completer.c b/gdb/completer.c
index 49189ac183f..0925891379a 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -3034,7 +3034,7 @@ gdb_fnwidth (const char *string)
 #if defined (HANDLE_MULTIBYTE)
   mbstate_t ps;
   int left, w;
-  size_t clen;
+  size_t c_len;
   wchar_t wc;
 
   left = strlen (string) + 1;
@@ -3052,18 +3052,18 @@ gdb_fnwidth (const char *string)
       else
 	{
 #if defined (HANDLE_MULTIBYTE)
-	  clen = mbrtowc (&wc, string + pos, left - pos, &ps);
-	  if (MB_INVALIDCH (clen))
+	  c_len = mbrtowc (&wc, string + pos, left - pos, &ps);
+	  if (MB_INVALIDCH (c_len))
 	    {
 	      width++;
 	      pos++;
 	      memset (&ps, 0, sizeof (mbstate_t));
 	    }
-	  else if (MB_NULLWCH (clen))
+	  else if (MB_NULLWCH (c_len))
 	    break;
 	  else
 	    {
-	      pos += clen;
+	      pos += c_len;
 	      w = wcwidth (wc);
 	      width += (w >= 0) ? w : 1;
 	    }
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 2f566583509..eac5cb87fe2 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -1641,14 +1641,14 @@ struct type *
 lookup_template_type (const char *name, struct type *type,
 		      const struct block *block)
 {
-  std::string nam;
-  nam.reserve (strlen (name) + strlen (type->name ()) + strlen ("< >"));
-  nam = name;
-  nam += "<";
-  nam += type->name ();
-  nam += " >"; /* FIXME, extra space still introduced in gcc?  */
-
-  symbol *sym = lookup_symbol (nam.c_str (), block,
+  std::string str;
+  str.reserve (strlen (name) + strlen (type->name ()) + strlen ("< >"));
+  str = name;
+  str += "<";
+  str += type->name ();
+  str += " >"; /* FIXME, extra space still introduced in gcc?  */
+
+  symbol *sym = lookup_symbol (str.c_str (), block,
 			       SEARCH_STRUCT_DOMAIN, 0).symbol;
 
   if (sym == NULL)
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index fa935b5fcdb..47a8c178470 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -4399,7 +4399,7 @@ struct i386_record_s
   int override;
   uint8_t modrm;
   uint8_t mod, reg, rm;
-  int ot;
+  int operand_type;  /* OT_BYTE/OT_WORD/OT_LONG/OT_QUAD/OT_DQUAD.  */
   uint8_t rex_x;
   uint8_t rex_b;
   int rip_offset;
@@ -4657,7 +4657,7 @@ Do you want to stop the program?"),
   if (i386_record_lea_modrm_addr (irp, &addr))
     return -1;
 
-  if (record_full_arch_list_add_mem (addr, 1 << irp->ot))
+  if (record_full_arch_list_add_mem (addr, 1 << irp->operand_type))
     return -1;
 
   return 0;
@@ -4807,9 +4807,9 @@ i386_record_vex (struct i386_record_s *ir, uint8_t vex_w, uint8_t vex_r,
 	     latter works exactly like 0x29, but the former encodes the size
 	     on VEX.pp itself.  */
 	  if (opcode == 0x11 && (ir->pp & 2) != 0)
-	    ir->ot = ir->pp;
+	    ir->operand_type = ir->pp;
 	  else
-	    ir->ot = 4 + ir->l;
+	    ir->operand_type = 4 + ir->l;
 	  i386_record_lea_modrm (ir);
 	}
       break;
@@ -4848,15 +4848,15 @@ i386_record_vex (struct i386_record_s *ir, uint8_t vex_w, uint8_t vex_r,
 	  else
 	    {
 	      /* Calculate the size of memory that will be modified
-		 and store it in the form of 1 << ir->ot, since that
+		 and store it in the form of 1 << ir->operand_type, since that
 		 is how the function uses it.  In theory, VEX.W is supposed
 		 to indicate the size of the memory. In practice, I only
 		 ever seen it set to 0, and for 16 bytes, 0xD6 opcode
 		 is used.  */
 	      if (vex_w)
-		ir->ot = 4;
+		ir->operand_type = 4;
 	      else
-		ir->ot = 3;
+		ir->operand_type = 3;
 
 	      i386_record_lea_modrm (ir);
 	    }
@@ -4888,7 +4888,7 @@ i386_record_vex (struct i386_record_s *ir, uint8_t vex_w, uint8_t vex_r,
       else
 	{
 	  /* We know that this operation is always 64 bits.  */
-	  ir->ot = 4;
+	  ir->operand_type = 4;
 	  i386_record_lea_modrm (ir);
 	}
       break;
@@ -4936,7 +4936,7 @@ i386_record_vex (struct i386_record_s *ir, uint8_t vex_w, uint8_t vex_r,
 	  else
 	    {
 	      /* We're writing 256 bits, so 1<<8.  */
-	      ir->ot = 8;
+	      ir->operand_type = 8;
 	      i386_record_lea_modrm (ir);
 	    }
 	}
@@ -5008,9 +5008,9 @@ i386_record_vex (struct i386_record_s *ir, uint8_t vex_w, uint8_t vex_r,
 		   address, so all of them are passed along.  */
 		/* Size is mostly based on the opcode, except for
 		   double/quadword difference.  */
-		ir->ot = opcode - 0x14;
+		ir->operand_type = opcode - 0x14;
 		if (opcode == 0x16 && vex_w == 1)
-		  ir->ot ++;
+		  ir->operand_type ++;
 		/* I'm not sure if this is the original use, but in here
 		   rip_offset is used to indicate that the RIP pointer will
 		   be 1 byte away from where the instruction expects it to
@@ -5068,7 +5068,7 @@ i386_record_vex (struct i386_record_s *ir, uint8_t vex_w, uint8_t vex_r,
       i386_record_modrm (ir);
       if (ir->map_select == 1) /* This is the VMOV family.  */
 	{
-	  ir->ot = 3;
+	  ir->operand_type = 3;
 	  i386_record_lea_modrm (ir);
 	}
       else
@@ -5455,9 +5455,9 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
       if (((opcode >> 3) & 7) != OP_CMPL)
 	{
 	  if ((opcode & 1) == 0)
-	    ir.ot = OT_BYTE;
+	    ir.operand_type = OT_BYTE;
 	  else
-	    ir.ot = ir.dflag + OT_WORD;
+	    ir.operand_type = ir.dflag + OT_WORD;
 
 	  switch ((opcode >> 1) & 3)
 	    {
@@ -5472,7 +5472,7 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
 	      else
 		{
 		  ir.rm |= ir.rex_b;
-		  if (ir.ot == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
+		  if (ir.operand_type == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
 		    ir.rm &= 0x3;
 		  I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.rm);
 		}
@@ -5481,7 +5481,7 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
 	      if (i386_record_modrm (&ir))
 		return -1;
 	      ir.reg |= rex_r;
-	      if (ir.ot == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
+	      if (ir.operand_type == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
 		ir.reg &= 0x3;
 	      I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.reg);
 	      break;
@@ -5503,16 +5503,16 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
       if (ir.reg != OP_CMPL)
 	{
 	  if ((opcode & 1) == 0)
-	    ir.ot = OT_BYTE;
+	    ir.operand_type = OT_BYTE;
 	  else
-	    ir.ot = ir.dflag + OT_WORD;
+	    ir.operand_type = ir.dflag + OT_WORD;
 
 	  if (ir.mod != 3)
 	    {
 	      if (opcode == 0x83)
 		ir.rip_offset = 1;
 	      else
-		ir.rip_offset = (ir.ot > OT_LONG) ? 4 : (1 << ir.ot);
+		ir.rip_offset = (ir.operand_type > OT_LONG) ? 4 : (1 << ir.operand_type);
 	      if (i386_record_lea_modrm (&ir))
 		return -1;
 	    }
@@ -5547,14 +5547,14 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
     case 0xf6:    /* GRP3 */
     case 0xf7:
       if ((opcode & 1) == 0)
-	ir.ot = OT_BYTE;
+	ir.operand_type = OT_BYTE;
       else
-	ir.ot = ir.dflag + OT_WORD;
+	ir.operand_type = ir.dflag + OT_WORD;
       if (i386_record_modrm (&ir))
 	return -1;
 
       if (ir.mod != 3 && ir.reg == 0)
-	ir.rip_offset = (ir.ot > OT_LONG) ? 4 : (1 << ir.ot);
+	ir.rip_offset = (ir.operand_type > OT_LONG) ? 4 : (1 << ir.operand_type);
 
       switch (ir.reg)
 	{
@@ -5571,7 +5571,7 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
 	  else
 	    {
 	      ir.rm |= ir.rex_b;
-	      if (ir.ot == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
+	      if (ir.operand_type == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
 		ir.rm &= 0x3;
 	      I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.rm);
 	    }
@@ -5583,7 +5583,7 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
 	case 6:    /* div  */
 	case 7:    /* idiv */
 	  I386_RECORD_FULL_ARCH_LIST_ADD_REG (X86_RECORD_REAX_REGNUM);
-	  if (ir.ot != OT_BYTE)
+	  if (ir.operand_type != OT_BYTE)
 	    I386_RECORD_FULL_ARCH_LIST_ADD_REG (X86_RECORD_REDX_REGNUM);
 	  I386_RECORD_FULL_ARCH_LIST_ADD_REG (X86_RECORD_EFLAGS_REGNUM);
 	  break;
@@ -5610,9 +5610,9 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
 	case 0:    /* inc */
 	case 1:    /* dec */
 	  if ((opcode & 1) == 0)
-	    ir.ot = OT_BYTE;
+	    ir.operand_type = OT_BYTE;
 	  else
-	    ir.ot = ir.dflag + OT_WORD;
+	    ir.operand_type = ir.dflag + OT_WORD;
 	  if (ir.mod != 3)
 	    {
 	      if (i386_record_lea_modrm (&ir))
@@ -5621,7 +5621,7 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
 	  else
 	    {
 	      ir.rm |= ir.rex_b;
-	      if (ir.ot == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
+	      if (ir.operand_type == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
 		ir.rm &= 0x3;
 	      I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.rm);
 	    }
@@ -5677,15 +5677,15 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
     case 0x0faf:  /* imul */
     case 0x69:
     case 0x6b:
-      ir.ot = ir.dflag + OT_WORD;
+      ir.operand_type = ir.dflag + OT_WORD;
       if (i386_record_modrm (&ir))
 	return -1;
       if (opcode == 0x69)
-	ir.rip_offset = (ir.ot > OT_LONG) ? 4 : (1 << ir.ot);
+	ir.rip_offset = (ir.operand_type > OT_LONG) ? 4 : (1 << ir.operand_type);
       else if (opcode == 0x6b)
 	ir.rip_offset = 1;
       ir.reg |= rex_r;
-      if (ir.ot == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
+      if (ir.operand_type == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
 	ir.reg &= 0x3;
       I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.reg);
       I386_RECORD_FULL_ARCH_LIST_ADD_REG (X86_RECORD_EFLAGS_REGNUM);
@@ -5694,18 +5694,18 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
     case 0x0fc0:  /* xadd */
     case 0x0fc1:
       if ((opcode & 1) == 0)
-	ir.ot = OT_BYTE;
+	ir.operand_type = OT_BYTE;
       else
-	ir.ot = ir.dflag + OT_WORD;
+	ir.operand_type = ir.dflag + OT_WORD;
       if (i386_record_modrm (&ir))
 	return -1;
       ir.reg |= rex_r;
       if (ir.mod == 3)
 	{
-	  if (ir.ot == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
+	  if (ir.operand_type == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
 	    ir.reg &= 0x3;
 	  I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.reg);
-	  if (ir.ot == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
+	  if (ir.operand_type == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
 	    ir.rm &= 0x3;
 	  I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.rm);
 	}
@@ -5713,7 +5713,7 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
 	{
 	  if (i386_record_lea_modrm (&ir))
 	    return -1;
-	  if (ir.ot == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
+	  if (ir.operand_type == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
 	    ir.reg &= 0x3;
 	  I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.reg);
 	}
@@ -5723,16 +5723,16 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
     case 0x0fb0:  /* cmpxchg */
     case 0x0fb1:
       if ((opcode & 1) == 0)
-	ir.ot = OT_BYTE;
+	ir.operand_type = OT_BYTE;
       else
-	ir.ot = ir.dflag + OT_WORD;
+	ir.operand_type = ir.dflag + OT_WORD;
       if (i386_record_modrm (&ir))
 	return -1;
       if (ir.mod == 3)
 	{
 	  ir.reg |= rex_r;
 	  I386_RECORD_FULL_ARCH_LIST_ADD_REG (X86_RECORD_REAX_REGNUM);
-	  if (ir.ot == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
+	  if (ir.operand_type == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
 	    ir.reg &= 0x3;
 	  I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.reg);
 	}
@@ -5859,16 +5859,16 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
 
     case 0x8f:    /* pop */
       if (ir.regmap[X86_RECORD_R8_REGNUM])
-	ir.ot = ir.dflag ? OT_QUAD : OT_WORD;
+	ir.operand_type = ir.dflag ? OT_QUAD : OT_WORD;
       else
-	ir.ot = ir.dflag + OT_WORD;
+	ir.operand_type = ir.dflag + OT_WORD;
       if (i386_record_modrm (&ir))
 	return -1;
       if (ir.mod == 3)
 	I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.rm | ir.rex_b);
       else
 	{
-	  ir.popl_esp_hack = 1 << ir.ot;
+	  ir.popl_esp_hack = 1 << ir.operand_type;
 	  if (i386_record_lea_modrm (&ir))
 	    return -1;
 	}
@@ -5938,9 +5938,9 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
     case 0xc6:
     case 0xc7:
       if ((opcode & 1) == 0)
-	ir.ot = OT_BYTE;
+	ir.operand_type = OT_BYTE;
       else
-	ir.ot = ir.dflag + OT_WORD;
+	ir.operand_type = ir.dflag + OT_WORD;
 
       if (i386_record_modrm (&ir))
 	return -1;
@@ -5948,7 +5948,7 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
       if (ir.mod != 3)
 	{
 	  if (opcode == 0xc6 || opcode == 0xc7)
-	    ir.rip_offset = (ir.ot > OT_LONG) ? 4 : (1 << ir.ot);
+	    ir.rip_offset = (ir.operand_type > OT_LONG) ? 4 : (1 << ir.operand_type);
 	  if (i386_record_lea_modrm (&ir))
 	    return -1;
 	}
@@ -5956,7 +5956,7 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
 	{
 	  if (opcode == 0xc6 || opcode == 0xc7)
 	    ir.rm |= ir.rex_b;
-	  if (ir.ot == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
+	  if (ir.operand_type == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
 	    ir.rm &= 0x3;
 	  I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.rm);
 	}
@@ -5965,13 +5965,13 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
     case 0x8a:    /* mov */
     case 0x8b:
       if ((opcode & 1) == 0)
-	ir.ot = OT_BYTE;
+	ir.operand_type = OT_BYTE;
       else
-	ir.ot = ir.dflag + OT_WORD;
+	ir.operand_type = ir.dflag + OT_WORD;
       if (i386_record_modrm (&ir))
 	return -1;
       ir.reg |= rex_r;
-      if (ir.ot == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
+      if (ir.operand_type == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
 	ir.reg &= 0x3;
       I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.reg);
       break;
@@ -5990,7 +5990,7 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
 	I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.rm);
       else
 	{
-	  ir.ot = OT_WORD;
+	  ir.operand_type = OT_WORD;
 	  if (i386_record_lea_modrm (&ir))
 	    return -1;
 	}
@@ -6044,9 +6044,9 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
 	  opcode = opcode << 8 | ir.modrm;
 	  goto no_support;
 	}
-      ir.ot = ir.dflag;
+      ir.operand_type = ir.dflag;
       ir.reg |= rex_r;
-      if (ir.ot == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
+      if (ir.operand_type == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
 	ir.reg &= 0x3;
       I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.reg);
       break;
@@ -6075,9 +6075,9 @@ Do you want to stop the program?"),
       else
 	{
 	  if ((opcode & 1) == 0)
-	    ir.ot = OT_BYTE;
+	    ir.operand_type = OT_BYTE;
 	  else
-	    ir.ot = ir.dflag + OT_WORD;
+	    ir.operand_type = ir.dflag + OT_WORD;
 	  if (ir.aflag == 2)
 	    {
 	      if (record_read_memory (gdbarch, ir.addr, buf, 8))
@@ -6099,7 +6099,7 @@ Do you want to stop the program?"),
 	      ir.addr += 2;
 	      addr = extract_unsigned_integer (buf, 2, byte_order);
 	    }
-	  if (record_full_arch_list_add_mem (addr, 1 << ir.ot))
+	  if (record_full_arch_list_add_mem (addr, 1 << ir.operand_type))
 	    return -1;
 	}
       break;
@@ -6142,15 +6142,15 @@ Do you want to stop the program?"),
     case 0x86:    /* xchg Ev, Gv */
     case 0x87:
       if ((opcode & 1) == 0)
-	ir.ot = OT_BYTE;
+	ir.operand_type = OT_BYTE;
       else
-	ir.ot = ir.dflag + OT_WORD;
+	ir.operand_type = ir.dflag + OT_WORD;
       if (i386_record_modrm (&ir))
 	return -1;
       if (ir.mod == 3)
 	{
 	  ir.rm |= ir.rex_b;
-	  if (ir.ot == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
+	  if (ir.operand_type == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
 	    ir.rm &= 0x3;
 	  I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.rm);
 	}
@@ -6160,7 +6160,7 @@ Do you want to stop the program?"),
 	    return -1;
 	}
       ir.reg |= rex_r;
-      if (ir.ot == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
+      if (ir.operand_type == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
 	ir.reg &= 0x3;
       I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.reg);
       break;
@@ -6217,9 +6217,9 @@ Do you want to stop the program?"),
     case 0xd2:
     case 0xd3:
       if ((opcode & 1) == 0)
-	ir.ot = OT_BYTE;
+	ir.operand_type = OT_BYTE;
       else
-	ir.ot = ir.dflag + OT_WORD;
+	ir.operand_type = ir.dflag + OT_WORD;
       if (i386_record_modrm (&ir))
 	return -1;
       if (ir.mod != 3 && (opcode == 0xd2 || opcode == 0xd3))
@@ -6230,7 +6230,7 @@ Do you want to stop the program?"),
       else
 	{
 	  ir.rm |= ir.rex_b;
-	  if (ir.ot == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
+	  if (ir.operand_type == OT_BYTE && !ir.regmap[X86_RECORD_R8_REGNUM])
 	    ir.rm &= 0x3;
 	  I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.rm);
 	}
@@ -6715,9 +6715,9 @@ Do you want to stop the program?"),
 	  ULONGEST es, ds;
 
 	  if ((opcode & 1) == 0)
-	    ir.ot = OT_BYTE;
+	    ir.operand_type = OT_BYTE;
 	  else
-	    ir.ot = ir.dflag + OT_WORD;
+	    ir.operand_type = ir.dflag + OT_WORD;
 	  regcache_raw_read_unsigned (ir.regcache,
 				      ir.regmap[X86_RECORD_REDI_REGNUM],
 				      &addr);
@@ -6743,7 +6743,7 @@ Do you want to stop the program?"),
 	    }
 	  else
 	    {
-	      if (record_full_arch_list_add_mem (addr, 1 << ir.ot))
+	      if (record_full_arch_list_add_mem (addr, 1 << ir.operand_type))
 		return -1;
 	    }
 
@@ -6891,7 +6891,7 @@ Do you want to stop the program?"),
     case 0x0f9e:
     case 0x0f9f:
       I386_RECORD_FULL_ARCH_LIST_ADD_REG (X86_RECORD_EFLAGS_REGNUM);
-      ir.ot = OT_BYTE;
+      ir.operand_type = OT_BYTE;
       if (i386_record_modrm (&ir))
 	return -1;
       if (ir.mod == 3)
@@ -6969,7 +6969,7 @@ Do you want to stop the program?"),
 
       /* bit operations */
     case 0x0fba:    /* bt/bts/btr/btc Gv, im */
-      ir.ot = ir.dflag + OT_WORD;
+      ir.operand_type = ir.dflag + OT_WORD;
       if (i386_record_modrm (&ir))
 	return -1;
       if (ir.reg < 4)
@@ -6998,7 +6998,7 @@ Do you want to stop the program?"),
     case 0x0fab:    /* bts */
     case 0x0fb3:    /* btr */
     case 0x0fbb:    /* btc */
-      ir.ot = ir.dflag + OT_WORD;
+      ir.operand_type = ir.dflag + OT_WORD;
       if (i386_record_modrm (&ir))
 	return -1;
       if (ir.mod == 3)
@@ -7023,7 +7023,7 @@ Do you want to stop the program?"),
 	      addr64 += ((int64_t) addr >> 6) << 6;
 	      break;
 	    }
-	  if (record_full_arch_list_add_mem (addr64, 1 << ir.ot))
+	  if (record_full_arch_list_add_mem (addr64, 1 << ir.operand_type))
 	    return -1;
 	  if (i386_record_lea_modrm (&ir))
 	    return -1;
@@ -7038,12 +7038,14 @@ Do you want to stop the program?"),
       break;
 
       /* bcd */
+    /* codespell:ignore-begin.  */
     case 0x27:    /* daa */
     case 0x2f:    /* das */
     case 0x37:    /* aaa */
     case 0x3f:    /* aas */
     case 0xd4:    /* aam */
     case 0xd5:    /* aad */
+    /* codespell:ignore-end.  */
       if (ir.regmap[X86_RECORD_R8_REGNUM])
 	{
 	  ir.addr -= 1;
@@ -7258,7 +7260,7 @@ Do you want to stop the program?"),
 	    I386_RECORD_FULL_ARCH_LIST_ADD_REG (ir.rm | ir.rex_b);
 	  else
 	    {
-	      ir.ot = OT_WORD;
+	      ir.operand_type = OT_WORD;
 	      if (i386_record_lea_modrm (&ir))
 		return -1;
 	    }
@@ -7415,7 +7417,7 @@ Do you want to stop the program?"),
 	    }
 	  else
 	    {
-	      ir.ot = OT_WORD;
+	      ir.operand_type = OT_WORD;
 	      if (i386_record_lea_modrm (&ir))
 		return -1;
 	    }
@@ -7461,7 +7463,7 @@ Do you want to stop the program?"),
 	}
       else
 	{
-	  ir.ot = ir.dflag ? OT_LONG : OT_WORD;
+	  ir.operand_type = ir.dflag ? OT_LONG : OT_WORD;
 	  if (i386_record_lea_modrm (&ir))
 	    return -1;
 	}
@@ -7670,7 +7672,7 @@ Do you want to stop the program?"),
 	  break;
 
 	case 3:    /* stmxcsr */
-	  ir.ot = OT_LONG;
+	  ir.operand_type = OT_LONG;
 	  if (i386_record_lea_modrm (&ir))
 	    return -1;
 	  break;
@@ -7688,7 +7690,7 @@ Do you want to stop the program?"),
       break;
 
     case 0x0fc3:    /* movnti */
-      ir.ot = (ir.dflag == 2) ? OT_QUAD : OT_LONG;
+      ir.operand_type = (ir.dflag == 2) ? OT_QUAD : OT_LONG;
       if (i386_record_modrm (&ir))
 	return -1;
       if (ir.mod == 3)
@@ -8086,19 +8088,19 @@ Do you want to stop the program?"),
 	      switch (opcode)
 		{
 		  case 0x660f3a14:
-		    ir.ot = OT_BYTE;
+		    ir.operand_type = OT_BYTE;
 		    break;
 		  case 0x660f3a15:
-		    ir.ot = OT_WORD;
+		    ir.operand_type = OT_WORD;
 		    break;
 		  case 0x660f3a16:
-		    ir.ot = OT_LONG;
+		    ir.operand_type = OT_LONG;
 		    break;
 		  case 0x660f3a17:
-		    ir.ot = OT_QUAD;
+		    ir.operand_type = OT_QUAD;
 		    break;
 		  default:
-		    ir.ot = OT_DQUAD;
+		    ir.operand_type = OT_DQUAD;
 		    break;
 		}
 	      if (i386_record_lea_modrm (&ir))
@@ -8113,9 +8115,9 @@ Do you want to stop the program?"),
 	  if (ir.mod == 3)
 	    goto no_support;
 	  if (opcode == 0x0fe7)
-	    ir.ot = OT_QUAD;
+	    ir.operand_type = OT_QUAD;
 	  else
-	    ir.ot = OT_DQUAD;
+	    ir.operand_type = OT_DQUAD;
 	  if (i386_record_lea_modrm (&ir))
 	    return -1;
 	  break;
@@ -8269,9 +8271,9 @@ Do you want to stop the program?"),
 	  else
 	    {
 	      if (ir.dflag == 2)
-		ir.ot = OT_QUAD;
+		ir.operand_type = OT_QUAD;
 	      else
-		ir.ot = OT_LONG;
+		ir.operand_type = OT_LONG;
 	      if (i386_record_lea_modrm (&ir))
 		return -1;
 	    }
@@ -8289,7 +8291,7 @@ Do you want to stop the program?"),
 	    }
 	  else
 	    {
-	      ir.ot = OT_QUAD;
+	      ir.operand_type = OT_QUAD;
 	      if (i386_record_lea_modrm (&ir))
 		return -1;
 	    }
@@ -8316,7 +8318,7 @@ Do you want to stop the program?"),
 	    }
 	  else
 	    {
-	      ir.ot = OT_QUAD;
+	      ir.operand_type = OT_QUAD;
 	      if (i386_record_lea_modrm (&ir))
 		return -1;
 	    }
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
index d3a043dc5af..9356431cbc1 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -539,7 +539,7 @@ mips_show_dr (const char *func, CORE_ADDR addr,
 
 int
 mips_linux_nat_target::can_use_hw_breakpoint (enum bptype type,
-					      int cnt, int ot)
+					      int cnt, int othertype)
 {
   int i;
   uint32_t wanted_mask, irw_mask;
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 102a51c8509..48fde142d62 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -2044,7 +2044,7 @@ ppc_linux_nat_target::read_description ()
 
 int
 ppc_linux_nat_target::can_use_hw_breakpoint (enum bptype type, int cnt,
-					     int ot)
+					     int othertype)
 {
   int total_hw_wp, total_hw_bp;
 
@@ -2076,7 +2076,7 @@ ppc_linux_nat_target::can_use_hw_breakpoint (enum bptype type, int cnt,
     {
       if (total_hw_wp == 0)
 	return 0;
-      else if (cnt + ot > total_hw_wp)
+      else if (cnt + othertype > total_hw_wp)
 	return -1;
       else
 	return 1;
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index ae498395436..37eaccbe259 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -538,7 +538,7 @@ set_next_address (struct gdbarch *gdbarch, CORE_ADDR addr)
 }
 
 /* Optionally print address ADDR symbolically as <SYMBOL+OFFSET> on STREAM,
-   after LEADIN.  Print nothing if no symbolic name is found nearby.
+   after LEAD_IN.  Print nothing if no symbolic name is found nearby.
    Optionally also print source file and line number, if available.
    DO_DEMANGLE controls whether to print a symbol in its native "raw" form,
    or to interpret it as a possible C++ name and convert it back to source
@@ -549,7 +549,7 @@ set_next_address (struct gdbarch *gdbarch, CORE_ADDR addr)
 int
 print_address_symbolic (struct gdbarch *gdbarch, CORE_ADDR addr,
 			struct ui_file *stream,
-			int do_demangle, const char *leadin)
+			int do_demangle, const char *lead_in)
 {
   std::string name, filename;
   int unmapped = 0;
@@ -560,7 +560,7 @@ print_address_symbolic (struct gdbarch *gdbarch, CORE_ADDR addr,
 			      &offset, &filename, &line, &unmapped))
     return 0;
 
-  gdb_puts (leadin, stream);
+  gdb_puts (lead_in, stream);
   if (unmapped)
     gdb_puts ("<*", stream);
   else
diff --git a/gdb/remote.c b/gdb/remote.c
index 735774903f3..ff1a033f0f1 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -11853,7 +11853,7 @@ remote_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
 }
 
 int
-remote_target::can_use_hw_breakpoint (enum bptype type, int cnt, int ot)
+remote_target::can_use_hw_breakpoint (enum bptype type, int cnt, int othertype)
 {
   if (type == bp_hardware_breakpoint)
     {
@@ -11870,7 +11870,7 @@ remote_target::can_use_hw_breakpoint (enum bptype type, int cnt, int ot)
 	return 0;
       else if (remote_hw_watchpoint_limit < 0)
 	return 1;
-      else if (ot)
+      else if (othertype)
 	return -1;
       else if (cnt <= remote_hw_watchpoint_limit)
 	return 1;
diff --git a/gdb/ser-event.c b/gdb/ser-event.c
index ddb3e74b2c6..cd61e985393 100644
--- a/gdb/ser-event.c
+++ b/gdb/ser-event.c
@@ -167,9 +167,9 @@ make_serial_event (void)
 int
 serial_event_fd (struct serial_event *event)
 {
-  struct serial *ser = (struct serial *) event;
+  struct serial *serial = (struct serial *) event;
 
-  return ser->fd;
+  return serial->fd;
 }
 
 /* See ser-event.h.  */
@@ -177,8 +177,8 @@ serial_event_fd (struct serial_event *event)
 void
 serial_event_set (struct serial_event *event)
 {
-  struct serial *ser = (struct serial *) event;
-  struct serial_event_state *state = (struct serial_event_state *) ser->state;
+  struct serial *serial = (struct serial *) event;
+  struct serial_event_state *state = (struct serial_event_state *) serial->state;
 #ifndef USE_WIN32API
   char c = '+';		/* Anything.  */
 
@@ -193,7 +193,7 @@ serial_event_set (struct serial_event *event)
 void
 serial_event_clear (struct serial_event *event)
 {
-  struct serial *ser = (struct serial *) event;
+  struct serial *serial = (struct serial *) event;
 #ifndef USE_WIN32API
   int r;
 
@@ -201,11 +201,11 @@ serial_event_clear (struct serial_event *event)
     {
       char c;
 
-      r = gdb::read (ser->fd, &c, 1);
+      r = gdb::read (serial->fd, &c, 1);
     }
   while (r > 0);
 #else
-  struct serial_event_state *state = (struct serial_event_state *) ser->state;
+  struct serial_event_state *state = (struct serial_event_state *) serial->state;
   ResetEvent (state->event);
 #endif
 }
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 3c10e1fd750..70ce320b696 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -4942,8 +4942,8 @@ global_symbol_searcher::search () const
 	 This is just a courtesy to make the matching less sensitive
 	 to how many spaces the user leaves between 'operator'
 	 and <TYPENAME> or <OPERATOR>.  */
-      const char *opend;
-      const char *opname = operator_chars (symbol_name_regexp, &opend);
+      const char *op_end;
+      const char *opname = operator_chars (symbol_name_regexp, &op_end);
 
       if (*opname)
 	{
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 61942a83797..699611f3cc6 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -2314,14 +2314,14 @@ windows_nat_target::detach (inferior *inf, int from_tty)
     {
       if (thr.internal_state () != THREAD_INT_RUNNING)
 	{
-	  windows_thread_info *wth = windows_process->find_thread (thr.ptid);
+	  windows_thread_info *w_th = windows_process->find_thread (thr.ptid);
 	  gdb_signal signo = get_detach_signal (this, thr.ptid);
 
-	  if (signo != wth->last_sig
+	  if (signo != w_th->last_sig
 	      || (signo != GDB_SIGNAL_0 && !signal_pass_state (signo)))
 	    signo = GDB_SIGNAL_0;
 
-	  DWORD cstatus = prepare_resume (wth, &thr, 0, signo);
+	  DWORD cstatus = prepare_resume (w_th, &thr, 0, signo);
 
 	  if (!m_continued && thr.ptid == get_last_debug_event_ptid ())
 	    continue_status = cstatus;
diff --git a/gdb/windows-nat.h b/gdb/windows-nat.h
index 8e6e79a8160..9ea4dfdc342 100644
--- a/gdb/windows-nat.h
+++ b/gdb/windows-nat.h
@@ -321,7 +321,7 @@ struct windows_nat_target : public inf_child_target
   DWORD continue_status_for_event_detaching
     (const DEBUG_EVENT &event, size_t *reply_later_events_left = nullptr);
 
-  DWORD prepare_resume (windows_thread_info *wth,
+  DWORD prepare_resume (windows_thread_info *th,
 			thread_info *tp,
 			int step, gdb_signal sig);
 
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
index 3b70678b167..8641915e8aa 100644
--- a/gdb/xtensa-tdep.c
+++ b/gdb/xtensa-tdep.c
@@ -2330,7 +2330,7 @@ call0_track_op (struct gdbarch *gdbarch, xtensa_c0reg_t dst[], xtensa_c0reg_t sr
 	      If 0, avoids infinite run-on in corrupt code memory by bounding
 	      the scan to the end of the function if that can be determined.
       nregs   Number of general registers to track.
-   InOut args:
+   In/Out args:
       cache   Xtensa frame cache.
 
       Note that these may produce useful results even if decoding fails
-- 
2.51.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 8/9] [pre-commit] Include gdb in codespell check
  2026-06-03 10:05 [PATCH 0/9] [gdb] Make gdb dir codespell-clean Tom de Vries
                   ` (6 preceding siblings ...)
  2026-06-03 10:05 ` [PATCH 7/9] [gdb] Fix codespell false positives by renaming Tom de Vries
@ 2026-06-03 10:05 ` Tom de Vries
  2026-06-03 10:05 ` [PATCH 9/9] [pre-commit] Simplify codespell configuration Tom de Vries
  2026-06-15 10:29 ` [PATCH 0/9] [gdb] Make gdb dir codespell-clean Tom de Vries
  9 siblings, 0 replies; 14+ messages in thread
From: Tom de Vries @ 2026-06-03 10:05 UTC (permalink / raw)
  To: gdb-patches

Include the files in the gdb dir in the codespell pre-commit check.
---
 .pre-commit-config.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index fe8466433ac..255749ec5fd 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -71,7 +71,7 @@ repos:
     rev: v2.4.2
     hooks:
     - id: codespell
-      files: '^(gdbsupport|gdbserver|gdb/(doc|stubs|features|nat|contrib|dwarf2|tui|target|data-directory|po|system-gdbinit|mi|syscalls|arch|regformats|compile|python|guile|config|unittests|cli|testsuite/gdb.(ctf|dap|debuginfod|gdb|go|guile|mi|modula2|objc|opencl|opt|pascal|perf|replay|reverse|rocm|server|stabs|testsuite|tui|xml)))/'
+      files: '^(gdbsupport|gdbserver|gdb/(doc|stubs|features|nat|contrib|dwarf2|tui|target|data-directory|po|system-gdbinit|mi|syscalls|arch|regformats|compile|python|guile|config|unittests|cli|testsuite/gdb.(ctf|dap|debuginfod|gdb|go|guile|mi|modula2|objc|opencl|opt|pascal|perf|replay|reverse|rocm|server|stabs|testsuite|tui|xml)))/|^gdb/[^/]*$'
       args: [--toml, gdb/pyproject.toml]
     - id: codespell
       name: codespell-log
-- 
2.51.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 9/9] [pre-commit] Simplify codespell configuration
  2026-06-03 10:05 [PATCH 0/9] [gdb] Make gdb dir codespell-clean Tom de Vries
                   ` (7 preceding siblings ...)
  2026-06-03 10:05 ` [PATCH 8/9] [pre-commit] Include gdb in codespell check Tom de Vries
@ 2026-06-03 10:05 ` Tom de Vries
  2026-06-15 11:16   ` Tom de Vries
  2026-06-15 10:29 ` [PATCH 0/9] [gdb] Make gdb dir codespell-clean Tom de Vries
  9 siblings, 1 reply; 14+ messages in thread
From: Tom de Vries @ 2026-06-03 10:05 UTC (permalink / raw)
  To: gdb-patches

Simplify the codespell configuration in .pre-commit-config.yaml by moving the
file selection to gdb/pyproject.toml.

In order to separate the files we want to skip from the files that are todo,
I added a marker TODO-SEPARATOR in the list.
---
 .pre-commit-config.yaml | 2 +-
 gdb/pyproject.toml      | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 255749ec5fd..82ec5aa05f9 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -71,7 +71,7 @@ repos:
     rev: v2.4.2
     hooks:
     - id: codespell
-      files: '^(gdbsupport|gdbserver|gdb/(doc|stubs|features|nat|contrib|dwarf2|tui|target|data-directory|po|system-gdbinit|mi|syscalls|arch|regformats|compile|python|guile|config|unittests|cli|testsuite/gdb.(ctf|dap|debuginfod|gdb|go|guile|mi|modula2|objc|opencl|opt|pascal|perf|replay|reverse|rocm|server|stabs|testsuite|tui|xml)))/|^gdb/[^/]*$'
+      files: '^(gdb|gdbserver|gdbsupport)/'
       args: [--toml, gdb/pyproject.toml]
     - id: codespell
       name: codespell-log
diff --git a/gdb/pyproject.toml b/gdb/pyproject.toml
index 4109dfb8f82..f97d1af029b 100644
--- a/gdb/pyproject.toml
+++ b/gdb/pyproject.toml
@@ -57,8 +57,9 @@ spaces-in-braces = false
 
 [tool.codespell]
 
-# Skip ChangeLogs and generated files.
-skip = '*/ChangeLog*,*/configure,gdbsupport/Makefile.in,*.dat,*.eps,gdb/features/*.c,gdb/ada-casefold.h,gdb/copying.c,gdb/gdbarch-gen.h,gdb/gdbarch-gen.c,gdb/target-delegates-gen.c,gdb/aclocal.m4,gdbserver/aclocal.m4,gdbsupport/aclocal.m4'
+# Skip ChangeLogs and generated files.  The files after the TODO-SEPARATOR are
+# todo.
+skip = '*/ChangeLog*,*/configure,gdbsupport/Makefile.in,*.dat,*.eps,gdb/features/*.c,gdb/ada-casefold.h,gdb/copying.c,gdb/gdbarch-gen.h,gdb/gdbarch-gen.c,gdb/target-delegates-gen.c,gdb/aclocal.m4,gdbserver/aclocal.m4,gdbsupport/aclocal.m4,TODO-SEPARATOR,gdb/testsuite/Makefile.in,gdb/testsuite/TODO,gdb/testsuite/configure.ac,gdb/testsuite/boards/*,gdb/testsuite/config/*,gdb/testsuite/gdb.ada/*,gdb/testsuite/gdb.arch/*,gdb/testsuite/gdb.asm/*,gdb/testsuite/gdb.base/*,gdb/testsuite/gdb.btrace/*,gdb/testsuite/gdb.compile/*,gdb/testsuite/gdb.cp/*,gdb/testsuite/gdb.disasm/*,gdb/testsuite/gdb.dlang/*,gdb/testsuite/gdb.dwarf2/*,gdb/testsuite/gdb.fortran/*,gdb/testsuite/gdb.linespec/*,gdb/testsuite/gdb.python/*,gdb/testsuite/gdb.threads/*,gdb/testsuite/gdb.trace/*,gdb/testsuite/lib/*'
 
 ignore-words = 'gdb/contrib/codespell-ignore-words.txt'
 dictionary = 'gdb/contrib/codespell-dictionary.txt,-'
-- 
2.51.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/9] [gdb] Drop executable mode in some files
  2026-06-03 10:05 ` [PATCH 1/9] [gdb] Drop executable mode in some files Tom de Vries
@ 2026-06-04 20:05   ` Simon Marchi
  2026-06-04 20:07     ` Tom de Vries
  0 siblings, 1 reply; 14+ messages in thread
From: Simon Marchi @ 2026-06-04 20:05 UTC (permalink / raw)
  To: Tom de Vries, gdb-patches

On 6/3/26 6:05 AM, Tom de Vries wrote:
> During a review, Claude Code noticed that gdb/amd64-tdep.c has executable
> mode.
> 
> This was added by accident in commit f9aa48dc545 ("gdb, amd64: extend the
> amd64 prologue analyzer to skip register pushes").
> 
> Fix this, and similar problems in other files.

Since I had the exact same patch:

Approved-By: Simon Marchi <simon.marchi@efficios.com>

Simon

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/9] [gdb] Drop executable mode in some files
  2026-06-04 20:05   ` Simon Marchi
@ 2026-06-04 20:07     ` Tom de Vries
  0 siblings, 0 replies; 14+ messages in thread
From: Tom de Vries @ 2026-06-04 20:07 UTC (permalink / raw)
  To: Simon Marchi, gdb-patches

On 6/4/26 10:05 PM, Simon Marchi wrote:
> On 6/3/26 6:05 AM, Tom de Vries wrote:
>> During a review, Claude Code noticed that gdb/amd64-tdep.c has executable
>> mode.
>>
>> This was added by accident in commit f9aa48dc545 ("gdb, amd64: extend the
>> amd64 prologue analyzer to skip register pushes").
>>
>> Fix this, and similar problems in other files.
> 
> Since I had the exact same patch:
> 
> Approved-By: Simon Marchi <simon.marchi@efficios.com>
> 

Pushed, thanks.

- Tom

> Simon


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/9] [gdb] Make gdb dir codespell-clean
  2026-06-03 10:05 [PATCH 0/9] [gdb] Make gdb dir codespell-clean Tom de Vries
                   ` (8 preceding siblings ...)
  2026-06-03 10:05 ` [PATCH 9/9] [pre-commit] Simplify codespell configuration Tom de Vries
@ 2026-06-15 10:29 ` Tom de Vries
  9 siblings, 0 replies; 14+ messages in thread
From: Tom de Vries @ 2026-06-15 10:29 UTC (permalink / raw)
  To: gdb-patches

On 6/3/26 12:05 PM, Tom de Vries wrote:
> This patch series make the gdb dir codespell-clean.
> 
> It starts out with two unrelated patches:
> - the first fixes a problem found during review.
> - the second adds brief description lines in codespell-ignore-words.txt.
> 
> A few following patches fix codespell errors, each in a different way.
> 
> The pre-last patch adds the gdb dir to the pre-commit codespell check.
> 
> The last patch move selection of files to check from .pre-commit-config.yaml
> to gdb/pyproject.toml.
> 

With current trunk and this patch series, we get:
...
$ pre-commit run codespell --all-files
codespell................................................................Failed
- hook id: codespell
- exit code: 65

gdb/microblaze-linux-nat.c:97: Transfering ==> Transferring

$
...

Since the patch series is low-risk, I'm pushing this.

The only change I'm adding is this (and similar):
...
-The codespell:ignore-begin raison d'etre codespell:ignore-end of
+The <codespell:ignore-begin> raison d'etre <codespell:ignore-end> of
...
to make the sentence easier to read.

While re-reviewing this patch series, I've filed a PR to improve 
codespell support for gdb ( 
https://sourceware.org/bugzilla/show_bug.cgi?id=34285 ).

Thanks,
- Tom

> Tom de Vries (9):
>    [gdb] Drop executable mode in some files
>    [gdb/contrib] Describe words in codespell-ignore-words.txt
>    [gdb/contrib] Extend codespell-ignore-words.txt
>    [gdb] Fix typos
>    [gdb] Fix codespell false positives by ignoring
>    [gdb] Fix codespell false positive by string splitting
>    [gdb] Fix codespell false positives by renaming
>    [pre-commit] Include gdb in codespell check
>    [pre-commit] Simplify codespell configuration
> 
>   .pre-commit-config.yaml                       |   2 +-
>   gdb/ada-lang.c                                |   4 +-
>   gdb/amd64-tdep.c                              |   2 +-
>   gdb/arc-linux-tdep.c                          |   4 +
>   gdb/arm-linux-nat.c                           |   6 +-
>   gdb/arm-tdep.c                                |   2 +-
>   gdb/avr-tdep.c                                |   5 +-
>   gdb/bfin-linux-tdep.c                         |   2 +-
>   gdb/bfin-tdep.c                               |   2 +
>   gdb/buildsym.c                                |   6 +-
>   gdb/buildsym.h                                |   2 +-
>   gdb/completer.c                               |  10 +-
>   gdb/completer.h                               |   2 +-
>   gdb/contrib/codespell-ignore-words.txt        |  26 +++
>   gdb/cp-support.c                              |   2 +-
>   gdb/darwin-nat-info.c                         |   2 +-
>   gdb/displaced-stepping.h                      |   2 +-
>   gdb/gdbtypes.c                                |  16 +-
>   gdb/i386-tdep.c                               | 170 +++++++++---------
>   gdb/i387-tdep.c                               |   2 +
>   gdb/infrun.c                                  |   2 +-
>   gdb/infrun.h                                  |   2 +-
>   gdb/loongarch-tdep.c                          |   2 +-
>   gdb/mips-linux-nat.c                          |   2 +-
>   gdb/mips-tdep.c                               |   2 +
>   gdb/nds32-tdep.c                              |   2 +
>   gdb/ppc-linux-nat.c                           |   4 +-
>   gdb/ppc-linux-tdep.c                          |   8 +-
>   gdb/printcmd.c                                |   6 +-
>   gdb/pyproject.toml                            |   5 +-
>   gdb/remote.c                                  |   4 +-
>   gdb/riscv-tdep.c                              |   2 +
>   gdb/s390-linux-tdep.c                         |   2 +
>   gdb/s390-tdep.c                               |   6 +
>   gdb/ser-event.c                               |  14 +-
>   gdb/source.c                                  |   3 +-
>   gdb/symtab.c                                  |   4 +-
>   gdb/testsuite/gdb.arch/amd64-lam.c            |   0
>   .../gdb.base/jump_multiple_objfiles-foo.c     |   0
>   .../gdb.base/jump_multiple_objfiles.c         |   0
>   .../gdb.base/jump_multiple_objfiles.exp       |   0
>   .../gdb.base/jump_multiple_objfiles.h         |   0
>   gdb/testsuite/gdb.btrace/exception.exp        |   0
>   gdb/testsuite/gdb.fortran/nested-funcs.exp    |   0
>   gdb/testsuite/gdb.fortran/nested-funcs.f90    |   0
>   gdb/testsuite/gdb.fortran/oop_extend_type.exp |   0
>   gdb/testsuite/gdb.fortran/oop_extend_type.f90 |   0
>   gdb/testsuite/gdb.fortran/print_type.exp      |   0
>   gdb/testsuite/gdb.fortran/vla-type.exp        |   0
>   gdb/testsuite/gdb.fortran/vla-type.f90        |   0
>   .../gdb.testsuite/gdb_test_multiple-lbl.gdb   |   0
>   gdb/testsuite/lib/compiler.cc                 |   0
>   gdb/utils.c                                   |   4 +-
>   gdb/valprint.c                                |   8 +-
>   gdb/value.c                                   |   3 +-
>   gdb/windows-nat.c                             |  12 +-
>   gdb/windows-nat.h                             |   2 +-
>   gdb/x86-windows-nat.c                         |   2 +
>   gdb/xcoffread.c                               |   2 +-
>   gdb/xtensa-tdep.c                             |   2 +-
>   gdb/xtensa-xtregs.c                           |   2 +
>   gdb/z80-tdep.c                                |   2 +-
>   62 files changed, 220 insertions(+), 158 deletions(-)
>   mode change 100755 => 100644 gdb/amd64-tdep.c
>   mode change 100755 => 100644 gdb/testsuite/gdb.arch/amd64-lam.c
>   mode change 100755 => 100644 gdb/testsuite/gdb.base/jump_multiple_objfiles-foo.c
>   mode change 100755 => 100644 gdb/testsuite/gdb.base/jump_multiple_objfiles.c
>   mode change 100755 => 100644 gdb/testsuite/gdb.base/jump_multiple_objfiles.exp
>   mode change 100755 => 100644 gdb/testsuite/gdb.base/jump_multiple_objfiles.h
>   mode change 100755 => 100644 gdb/testsuite/gdb.btrace/exception.exp
>   mode change 100755 => 100644 gdb/testsuite/gdb.fortran/nested-funcs.exp
>   mode change 100755 => 100644 gdb/testsuite/gdb.fortran/nested-funcs.f90
>   mode change 100755 => 100644 gdb/testsuite/gdb.fortran/oop_extend_type.exp
>   mode change 100755 => 100644 gdb/testsuite/gdb.fortran/oop_extend_type.f90
>   mode change 100755 => 100644 gdb/testsuite/gdb.fortran/print_type.exp
>   mode change 100755 => 100644 gdb/testsuite/gdb.fortran/vla-type.exp
>   mode change 100755 => 100644 gdb/testsuite/gdb.fortran/vla-type.f90
>   mode change 100755 => 100644 gdb/testsuite/gdb.testsuite/gdb_test_multiple-lbl.gdb
>   mode change 100755 => 100644 gdb/testsuite/lib/compiler.cc
> 
> 
> base-commit: 22e21551bd7eb2fe14cdebfb4d89d51e5d93b7dd


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 9/9] [pre-commit] Simplify codespell configuration
  2026-06-03 10:05 ` [PATCH 9/9] [pre-commit] Simplify codespell configuration Tom de Vries
@ 2026-06-15 11:16   ` Tom de Vries
  0 siblings, 0 replies; 14+ messages in thread
From: Tom de Vries @ 2026-06-15 11:16 UTC (permalink / raw)
  To: gdb-patches

On 6/3/26 12:05 PM, Tom de Vries wrote:
> In order to separate the files we want to skip from the files that are todo,
> I added a marker TODO-SEPARATOR in the list.

I looked again at this, and found that I could simply do:
...
skip = [
# Comment 1
'file1',
'file2',
# Comment 1
'file3',
'file4'
]
...
so I'm pushing this variant.

Thanks,
- Tom

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-06-15 11:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-03 10:05 [PATCH 0/9] [gdb] Make gdb dir codespell-clean Tom de Vries
2026-06-03 10:05 ` [PATCH 1/9] [gdb] Drop executable mode in some files Tom de Vries
2026-06-04 20:05   ` Simon Marchi
2026-06-04 20:07     ` Tom de Vries
2026-06-03 10:05 ` [PATCH 2/9] [gdb/contrib] Describe words in codespell-ignore-words.txt Tom de Vries
2026-06-03 10:05 ` [PATCH 3/9] [gdb/contrib] Extend codespell-ignore-words.txt Tom de Vries
2026-06-03 10:05 ` [PATCH 4/9] [gdb] Fix typos Tom de Vries
2026-06-03 10:05 ` [PATCH 5/9] [gdb] Fix codespell false positives by ignoring Tom de Vries
2026-06-03 10:05 ` [PATCH 6/9] [gdb] Fix codespell false positive by string splitting Tom de Vries
2026-06-03 10:05 ` [PATCH 7/9] [gdb] Fix codespell false positives by renaming Tom de Vries
2026-06-03 10:05 ` [PATCH 8/9] [pre-commit] Include gdb in codespell check Tom de Vries
2026-06-03 10:05 ` [PATCH 9/9] [pre-commit] Simplify codespell configuration Tom de Vries
2026-06-15 11:16   ` Tom de Vries
2026-06-15 10:29 ` [PATCH 0/9] [gdb] Make gdb dir codespell-clean Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox