[7/9] Fix codespell false positives by renaming

Message ID 20260603100516.144737-8-tdevries@suse.de
State Committed
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 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(-)
  

Patch

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