From patchwork Wed Jun 3 10:05:14 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 136369 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 097FD4BA2E0B for ; Wed, 3 Jun 2026 10:08:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 097FD4BA2E0B Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=Irvzjc+9; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=zSKwF5qB; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=Irvzjc+9; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=zSKwF5qB X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by sourceware.org (Postfix) with ESMTPS id F1D2F4BA2E3C for ; Wed, 3 Jun 2026 10:05:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F1D2F4BA2E3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F1D2F4BA2E3C Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:2 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1780481130; cv=none; b=ln5cbPnbfIpYu0pXV93lZjJyMwQPQuhrIQlVXMCkE70FRC9s0ZejaJ9sjGevyll/26p8z2NMDI3YNQ5CZf+5UGV5Ume1r59kAUBA0Tef7zmv6VdEDnTYgn2rfpI4WcAo4jqcvXPkrrnjGDi6p5M+67eWaISik4sIS7BN4ANpEOw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1780481130; c=relaxed/simple; bh=7ESgIY7oSRWp8SP4iEV2tgfureigki5I5hrtocT3ppU=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=XsgUaDep3xsix62IdMHvBgM+eZZP3c+TdWfap4KGlqiVnMHig9WBOioCESxkh8KD+QtS0+GuLf8aR6KxvnnVRYBjkCDFR5hm14i68i80IOz1J2vQetKHq+UqBbvcS3ahmI25o6aE6RmdjYqhPQqUa2a3ZK/sbIU6RL+aI5dAVUQ= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=Irvzjc+9; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=zSKwF5qB; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=Irvzjc+9; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=zSKwF5qB DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F1D2F4BA2E3C Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 7569C674A3 for ; Wed, 3 Jun 2026 10:05:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1780481117; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fCvjVmLQiJM7g1hiQAeUJ2yz3KXhy91h/mK1gdyYBEM=; b=Irvzjc+9OYxa1JKJX2wweDlqjz9uFBWY2LAROxvke8Akz8vbhC5lFOK0cm05K4egeOLBey ND2FeNrtHar6BZtkqmTlniY3qKKTJiuX+bHpEWNRETdhJDlM5RMtvE4hZLKihFGSF9Uv+y +u9ohIrvdMY5Y05UiSUQohrIYpAAbu8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1780481117; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fCvjVmLQiJM7g1hiQAeUJ2yz3KXhy91h/mK1gdyYBEM=; b=zSKwF5qB5G3we9cvOgkx6sDNPgIz9jkkx37kSxBTigWNPH0VnR5Q8kxuSKDcz8PE5tMzfO k/PGyMNklLABkIBA== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=Irvzjc+9; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=zSKwF5qB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1780481117; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fCvjVmLQiJM7g1hiQAeUJ2yz3KXhy91h/mK1gdyYBEM=; b=Irvzjc+9OYxa1JKJX2wweDlqjz9uFBWY2LAROxvke8Akz8vbhC5lFOK0cm05K4egeOLBey ND2FeNrtHar6BZtkqmTlniY3qKKTJiuX+bHpEWNRETdhJDlM5RMtvE4hZLKihFGSF9Uv+y +u9ohIrvdMY5Y05UiSUQohrIYpAAbu8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1780481117; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fCvjVmLQiJM7g1hiQAeUJ2yz3KXhy91h/mK1gdyYBEM=; b=zSKwF5qB5G3we9cvOgkx6sDNPgIz9jkkx37kSxBTigWNPH0VnR5Q8kxuSKDcz8PE5tMzfO k/PGyMNklLABkIBA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 5E5DB5A4E6 for ; Wed, 3 Jun 2026 10:05:17 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id kE2AFV38H2pjewAAD6G6ig (envelope-from ) for ; Wed, 03 Jun 2026 10:05:17 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 7/9] [gdb] Fix codespell false positives by renaming Date: Wed, 3 Jun 2026 12:05:14 +0200 Message-ID: <20260603100516.144737-8-tdevries@suse.de> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260603100516.144737-1-tdevries@suse.de> References: <20260603100516.144737-1-tdevries@suse.de> MIME-Version: 1.0 X-Rspamd-Action: no action X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FROM_HAS_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:dkim,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Queue-Id: 7569C674A3 X-Spam-Score: -3.01 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP, T_FILL_THIS_FORM_SHORT shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org 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 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 or . */ - 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