From patchwork Sun Oct 6 10:46:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 98435 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C4EB3385ED4C for ; Sun, 6 Oct 2024 10:47:10 +0000 (GMT) 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 1E642385EC3F for ; Sun, 6 Oct 2024 10:46:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1E642385EC3F 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 1E642385EC3F Authentication-Results: server2.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=1728211577; cv=none; b=cUI9HnbVyeJUH0BJwVR3P04YIy9RvVPj3g7/izQNRYj41/aDBxQnZw0WscZzV1j4k+LpI7wjVFLUDK3D69sxK0ekvsM3yyda2xAMJWgZnqGEs6E9FMxJIki6b6wFaMsflGMZ10BvwkfIZuBct+hZ5p7gmRYBMTG2WpWPwLGe+oE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728211577; c=relaxed/simple; bh=Hf3YyKKNkjic3BPti39vJVj8Cl0su6XzjPKsVPL+HW8=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=HOhGpbv7Ec3xJPD6EZ877MYfEH+JFqAUKzL6jJzes+U2cXo2zeOzOYJdQMtfQaY65c8apxFX5dTFikeU7Yc1VBYXC/OPsWTKBKrYb2jH8GMl2t3LWWZrlYEi0e/uYGIio+1RK+rvIlr5DyUNe9m29MngZBqEFhpXEH+hlQ2GdR0= ARC-Authentication-Results: i=1; server2.sourceware.org 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 C4BF61FCE0 for ; Sun, 6 Oct 2024 10:46:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728211573; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=u3eztqg+OlTR9Nx2Di6R7bK5AHZsldKxrBAhQepHdhE=; b=NPR3VoGhMesoStba75Va5h5zHPtysvCyc6bTJy87xdygt/bOmQFgZTOSvMaKORsfGq6pvd jQWGHGX8G+jXXcy2QXuLvQGC5ly7msfgQleS2gFftJpYVyf0FCpR3zAeuZ+F61mWiNTIVl vU4be6Mno8ans//UbjktsFL815rc6XA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728211573; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=u3eztqg+OlTR9Nx2Di6R7bK5AHZsldKxrBAhQepHdhE=; b=QIPWV2CrIMrPqcYmbdMT5CGhA7+dlyLrMr5ruO6SOjRpBpL2gAIgeoAuJS0fpdT/r4G254 XG/9gChvtS5Z4MDA== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=NPR3VoGh; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=QIPWV2Cr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728211573; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=u3eztqg+OlTR9Nx2Di6R7bK5AHZsldKxrBAhQepHdhE=; b=NPR3VoGhMesoStba75Va5h5zHPtysvCyc6bTJy87xdygt/bOmQFgZTOSvMaKORsfGq6pvd jQWGHGX8G+jXXcy2QXuLvQGC5ly7msfgQleS2gFftJpYVyf0FCpR3zAeuZ+F61mWiNTIVl vU4be6Mno8ans//UbjktsFL815rc6XA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728211573; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=u3eztqg+OlTR9Nx2Di6R7bK5AHZsldKxrBAhQepHdhE=; b=QIPWV2CrIMrPqcYmbdMT5CGhA7+dlyLrMr5ruO6SOjRpBpL2gAIgeoAuJS0fpdT/r4G254 XG/9gChvtS5Z4MDA== 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 AC217131CA for ; Sun, 6 Oct 2024 10:46:13 +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 2JVwKHVqAmcWKwAAD6G6ig (envelope-from ) for ; Sun, 06 Oct 2024 10:46:13 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 1/3] [gdb/contrib] Factor out grep_or and sed_or in spellcheck.sh Date: Sun, 6 Oct 2024 12:46:01 +0200 Message-Id: <20241006104603.7584-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Rspamd-Queue-Id: C4BF61FCE0 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; 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)[-0.979]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Level: X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.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 While trying to add more separators here: ... # Separators: space, slash, tab. grep_separator=" |/| " sed_separator=" \|/\|\t" ... I mistakingly used "|" instead of "\|" in sed_separator. Factor out new variables grep_or and sed_or, and construct the grep_separator and sed_separator variables by joining the elements of a list using grep_or and sed_or. Verified with shellcheck, and tested by rerunning on x86_64-linux. Reviewed-By: Alexandra Petlanova Hajkova --- gdb/contrib/spellcheck.sh | 43 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) base-commit: 23ca0175c66b1add6fe51efc160628c824f6d32f diff --git a/gdb/contrib/spellcheck.sh b/gdb/contrib/spellcheck.sh index e7db6217d45..343a43f054c 100755 --- a/gdb/contrib/spellcheck.sh +++ b/gdb/contrib/spellcheck.sh @@ -27,8 +27,47 @@ cache_file=wikipedia-common-misspellings.txt dictionary=$cache_dir/$cache_file # Separators: space, slash, tab. -grep_separator=" |/| " -sed_separator=" \|/\|\t" +declare -a grep_separators +grep_separators=( + " " + "/" + " " +) +declare -a sed_separators +sed_separators=( + " " + "/" + "\t" +) + +join () +{ + local or + or="$1" + shift + + local res + res="" + + local first + first=true + + for item in "$@"; do + if $first; then + first=false + res="$item" + else + res="$res$or$item" + fi + done + + echo "$res" +} + +grep_or="|" +sed_or="\|" +grep_separator=$(join $grep_or "${grep_separators[@]}") +sed_separator=$(join $sed_or "${sed_separators[@]}") usage () { From patchwork Sun Oct 6 10:46:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 98434 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5869C3860008 for ; Sun, 6 Oct 2024 10:46:51 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by sourceware.org (Postfix) with ESMTPS id 03FA9385EC3E for ; Sun, 6 Oct 2024 10:46:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 03FA9385EC3E 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 03FA9385EC3E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728211577; cv=none; b=xeK60k1hQmbHhNnqOfcXSgw1Frci8S1DFqeLk173eEdXczWh5MvLMOsjRi07uIOi5c/rfxiuL2vWUtIa4NJ/rzMrQaDyNJUp4PD3quj9oiS8yx04XmDaCPQXkPKKw18fRGocLKUVxwksRolMhe2kllsE1Hd3J3gIUdwmL+ri5OA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728211577; c=relaxed/simple; bh=aXT9b46Lhnah5tAkTtrP/HpyfneOG8++1Agr3WCAGxc=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=I4D/6kokRp9aepnUIzTWsIchUyIwuZq9Tu15Pp4YYa6WcsSmgcOhZJHCO57P0XvDfMhT8Gvd1TPwkVMie55QG2LgcPwQJYCqnW5rVvDrwELjHNH11u1RwLpnQB8X714IWrZdyxfxvVvlWi0ntswdYo8sGulJuYMbiU5UKBQ7q7c= ARC-Authentication-Results: i=1; server2.sourceware.org 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 DD3141FCE2 for ; Sun, 6 Oct 2024 10:46:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728211574; 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=T7HMtdD00g3jk2/3WDbdAwzrdFS37YPFC5lTZjFKiLc=; b=qgAxclQiqYtDpsdMi6BzmjibxFmf1Pyjlzbpopboc9tREK2gXdUauddtOPb/SBTEdOt8Vc UPaoGhLOfRBkcHk1xrXlZ0Pp8ruBxMtfzGrqW06xHNojtF6Lvh+fI883jr5I6ZmApS+Ixg dzp9YZhRRPMDfKOhaqjs53CAEB5vH24= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728211574; 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=T7HMtdD00g3jk2/3WDbdAwzrdFS37YPFC5lTZjFKiLc=; b=bmCYw6R6v0gR2X8OOOc2SYkWVHmlNt2PE9d5wYfWggOjJIYxa+zvla/JE1UU3sTjawf189 ozaxLo6LQWWQo0Bg== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=GRdlMx3u; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=2ODOWqN0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728211573; 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=T7HMtdD00g3jk2/3WDbdAwzrdFS37YPFC5lTZjFKiLc=; b=GRdlMx3ukac5cjSB4sesT049xPWMvkgcZTnS6836iRTbIOYJnRjh/K9m1P74H4M5jLtEtX GoQccMjQtoR7g90wvdibJKQhT7yBwI5SBRsbLSKqpv29b6S8aE3yPEa+up1c2Ug+P1BXBO KW/pbv0BI/vm2KISp8x3ZmHQuVHmv0Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728211573; 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=T7HMtdD00g3jk2/3WDbdAwzrdFS37YPFC5lTZjFKiLc=; b=2ODOWqN0hFL+UnCpWi2l2yrjBF8PIF9oaOcJMMx080RdOtxa80pIcZCeJaXbey5OG2btk4 vI3n/nDqEcIZY7AQ== 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 C6D6B13974 for ; Sun, 6 Oct 2024 10:46:13 +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 KEdXL3VqAmcWKwAAD6G6ig (envelope-from ) for ; Sun, 06 Oct 2024 10:46:13 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 2/3] [gdb/contrib] Add more separators in spellcheck.sh Date: Sun, 6 Oct 2024 12:46:02 +0200 Message-Id: <20241006104603.7584-2-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20241006104603.7584-1-tdevries@suse.de> References: <20241006104603.7584-1-tdevries@suse.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: DD3141FCE2 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; 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)[-0.988]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_DN_NONE(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[gnu.org:url]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.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 Add two more separators in spellcheck.sh: colon and comma. Doing so triggers the "inbetween->between" rule, which gives an incorrect result. Override this with "inbetween->between, in between, in-between" [1], in a new file gdb/contrib/common-misspellings.txt. Fix the following common misspellings: ... everytime -> every time sucess -> success thru -> through transfered -> transferred inbetween -> between, in between, in-between ... Verified with spellcheck.sh. Tested on x86_64-linux. [1] https://www.grammarly.com/blog/commonly-confused-words/in-between-or-inbetween/ --- gdb/cli/cli-interp.c | 2 +- gdb/contrib/common-misspellings.txt | 17 ++++++++++ gdb/contrib/spellcheck.sh | 33 +++++++++++++++++-- gdb/exec.h | 2 +- .../dw2-step-out-of-function-no-stmt.exp | 2 +- .../gdb.threads/interrupt-while-step-over.exp | 2 +- gdb/tracepoint.c | 2 +- gdbserver/server.cc | 2 +- 8 files changed, 53 insertions(+), 9 deletions(-) create mode 100644 gdb/contrib/common-misspellings.txt diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c index fa5d70e1e89..18175735c4f 100644 --- a/gdb/cli/cli-interp.c +++ b/gdb/cli/cli-interp.c @@ -228,7 +228,7 @@ cli_interp::exec (const char *command_str) interpreter which has a new ui_file for gdb_stdout, use that one instead of the default. - It is important that it gets reset everytime, since the user + It is important that it gets reset every time, since the user could set gdb to use a different interpreter. */ ui_file *old_stream = m_cli_uiout->set_stream (gdb_stdout); SCOPE_EXIT { m_cli_uiout->set_stream (old_stream); }; diff --git a/gdb/contrib/common-misspellings.txt b/gdb/contrib/common-misspellings.txt new file mode 100644 index 00000000000..7281ec085dd --- /dev/null +++ b/gdb/contrib/common-misspellings.txt @@ -0,0 +1,17 @@ +# Copyright (C) 2024 Free Software Foundation, Inc. +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Common spelling mistakes. + +inbetween->between, in between, in-between diff --git a/gdb/contrib/spellcheck.sh b/gdb/contrib/spellcheck.sh index 343a43f054c..4203333b846 100755 --- a/gdb/contrib/spellcheck.sh +++ b/gdb/contrib/spellcheck.sh @@ -25,19 +25,24 @@ url=https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_mac cache_dir=$scriptdir/../../.git cache_file=wikipedia-common-misspellings.txt dictionary=$cache_dir/$cache_file +local_dictionary=$scriptdir/common-misspellings.txt -# Separators: space, slash, tab. +# Separators: space, slash, tab, colon, comma. declare -a grep_separators grep_separators=( " " "/" " " + ":" + "," ) declare -a sed_separators sed_separators=( " " "/" "\t" + ":" + "," ) join () @@ -149,13 +154,27 @@ get_dictionary () trap "" EXIT } +output_local_dictionary () +{ + # Filter out comments and empty lines. + grep -E -v \ + "^#|^$" \ + "$local_dictionary" +} + +output_dictionaries () +{ + output_local_dictionary + cat "$dictionary" +} + parse_dictionary () { # Parse dictionary. mapfile -t words \ - < <(awk -F '->' '{print $1}' "$dictionary") + < <(awk -F '->' '{print $1}' <(output_dictionaries)) mapfile -t replacements \ - < <(awk -F '->' '{print $2}' "$dictionary") + < <(awk -F '->' '{print $2}' <(output_dictionaries)) } find_files_matching_words () @@ -310,12 +329,20 @@ main () return fi + declare -A words_done local i word replacement i=0 for word in "${words[@]}"; do replacement=${replacements[$i]} i=$((i + 1)) + # Skip words that are already handled. This ensures that the local + # dictionary overrides the wiki dictionary. + if [ "${words_done[$word]}" == 1 ]; then + continue + fi + words_done[$word]=1 + replace_word_in_files \ "$word" \ "$replacement" \ diff --git a/gdb/exec.h b/gdb/exec.h index 0c1f60495d7..c08cb9f00ed 100644 --- a/gdb/exec.h +++ b/gdb/exec.h @@ -62,7 +62,7 @@ extern enum target_xfer_status noted above. See memory_xfer_partial_1() in target.c for an example. - Return the number of bytes actually transfered, or zero when no + Return the number of bytes actually transferred, or zero when no data is available for the requested range. This function is intended to be used from target_xfer_partial diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp index a59c6370a6a..55f437360ab 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp @@ -19,7 +19,7 @@ # # This sort of thing can occur in optimized code, f.i. here a slightly more # elaborate case with another is-stmt=no entry (the one with line number 12) -# inbetween: +# in between: # INDEX LINE ADDRESS IS-STMT # 12 13 0x00000000004003ed # 13 12 0x00000000004003f2 diff --git a/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp b/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp index bb05754a5ba..89c1d06f5ba 100644 --- a/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp +++ b/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp @@ -67,7 +67,7 @@ proc return_if_nonzero { result } { } } -# Do one iteration of "c -a& -> interrupt -a". Return zero on sucess, +# Do one iteration of "c -a& -> interrupt -a". Return zero on success, # and non-zero if some test fails. proc test_one_iteration {} { diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index d11c3f8a6be..ca6f616e3b9 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -671,7 +671,7 @@ validate_actionline (const char *line, tracepoint *t) p = strchr (p, ','); continue; } - /* else fall thru, treat p as an expression and parse it! */ + /* else fall through, treat p as an expression and parse it! */ } tmp_p = p; for (bp_location &loc : t->locations ()) diff --git a/gdbserver/server.cc b/gdbserver/server.cc index 2c1e7cb15a7..69ffb722be7 100644 --- a/gdbserver/server.cc +++ b/gdbserver/server.cc @@ -1786,7 +1786,7 @@ struct qxfer the starting point. The ANNEX can be used to provide additional data-specific information to the target. - Return the number of bytes actually transfered, zero when no + Return the number of bytes actually transferred, zero when no further transfer is possible, -1 on error, -2 when the transfer is not supported, and -3 on a verbose error message that should be preserved. Return of a positive value smaller than LEN does From patchwork Sun Oct 6 10:46:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 98433 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AF6323860762 for ; Sun, 6 Oct 2024 10:46:44 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by sourceware.org (Postfix) with ESMTPS id EF5B33858D20 for ; Sun, 6 Oct 2024 10:46:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EF5B33858D20 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 EF5B33858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728211577; cv=none; b=pGnh4PT6DGlZkoqAcRY0bzBw5z94RkfA8kaG0ZmUI3y3TTKGGFTni1ptROo7HkHG3IVc18icHGv14kdDzeOKyJIQ5d2n/uoyP/1kVocW5aazeX9MAYi9EgGxLkG4NtKF8dhlkolBggm1ez1j2LCT7+AtF/3vwXZ1swfPr2O+lj4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728211577; c=relaxed/simple; bh=XQawymelECLSZNLfO8gw3Oavp8TwpNXBwlI0fTgD2vU=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=jyNEzRwydTPdCYL8c9B1KRR5af6wAklAvKkOH+vIkVgCo1GKMY20vOXIzdgU3ZzfqzzFxSCINqQVu9a4e5PqNZ0LN/UEpZq0yBtq6Uoz8kA+yV4cBBHpBFFPAOvpn4sSzTHcYmvW6RWquTBnPc/Wy/iwbV7KrkgwDrsJsDyuh7Y= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (unknown [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 02AB81FCE8 for ; Sun, 6 Oct 2024 10:46:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728211574; 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=lAVyQJtJClFonmlx5QOwmulFOSCVMM0dKkeavchGzSQ=; b=gl+FdpTD632gjmHUcpvD1GfZaob7p/GGulR69QIct+39fjMKigmC54QksKs/FfIOfgS7/1 eNOVJgZAlUddSlJqwRMWX191W10UFtXxRcCbDQsqEXClUPSx9j8G5sRagWYVYznn9Uo5LI j/wbOV61U+yEmcoIzgY9aStA6eU2BZ4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728211574; 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=lAVyQJtJClFonmlx5QOwmulFOSCVMM0dKkeavchGzSQ=; b=uiGgliAOSIap/d+8n7PvtL9nmpRiQ1YUVRo/DPIOViy2MR/BxJqdEotOGykiHuT9BGhBaX FEmrF+lR4GmX4iBw== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728211574; 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=lAVyQJtJClFonmlx5QOwmulFOSCVMM0dKkeavchGzSQ=; b=gl+FdpTD632gjmHUcpvD1GfZaob7p/GGulR69QIct+39fjMKigmC54QksKs/FfIOfgS7/1 eNOVJgZAlUddSlJqwRMWX191W10UFtXxRcCbDQsqEXClUPSx9j8G5sRagWYVYznn9Uo5LI j/wbOV61U+yEmcoIzgY9aStA6eU2BZ4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728211574; 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=lAVyQJtJClFonmlx5QOwmulFOSCVMM0dKkeavchGzSQ=; b=uiGgliAOSIap/d+8n7PvtL9nmpRiQ1YUVRo/DPIOViy2MR/BxJqdEotOGykiHuT9BGhBaX FEmrF+lR4GmX4iBw== 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 E03C813A6E for ; Sun, 6 Oct 2024 10:46:13 +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 iEWENXVqAmcWKwAAD6G6ig (envelope-from ) for ; Sun, 06 Oct 2024 10:46:13 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 3/3] [gdb/contrib] Fix "sofar->so far" misspelling Date: Sun, 6 Oct 2024 12:46:03 +0200 Message-Id: <20241006104603.7584-3-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20241006104603.7584-1-tdevries@suse.de> References: <20241006104603.7584-1-tdevries@suse.de> MIME-Version: 1.0 X-Spam-Score: -2.79 X-Spamd-Result: default: False [-2.79 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.19)[-0.965]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_ONE(0.00)[1]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Spam-Level: X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.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 I forgot to follow up on a review comment and fix the "sofar->so far" misspelling [1]. Fix this by adding it to gdb/contrib/common-misspellings.txt. Tested on x86_64-linux. [1] https://sourceware.org/pipermail/gdb-patches/2024-September/211894.html --- gdb/contrib/common-misspellings.txt | 1 + gdb/run-on-main-thread.c | 2 +- gdb/symtab.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gdb/contrib/common-misspellings.txt b/gdb/contrib/common-misspellings.txt index 7281ec085dd..62e2c510ae3 100644 --- a/gdb/contrib/common-misspellings.txt +++ b/gdb/contrib/common-misspellings.txt @@ -15,3 +15,4 @@ # Common spelling mistakes. inbetween->between, in between, in-between +sofar->so far diff --git a/gdb/run-on-main-thread.c b/gdb/run-on-main-thread.c index a6213d4d85e..746ea35ee9e 100644 --- a/gdb/run-on-main-thread.c +++ b/gdb/run-on-main-thread.c @@ -85,7 +85,7 @@ run_events (int error, gdb_client_data client_data) { /* Should cancelation of a runnable event cancel the execution of the following one? The answer is not clear, so keep doing what - we've done sofar: ignore this exception. */ + we've done so far: ignore this exception. */ } catch (const gdb_exception &) { diff --git a/gdb/symtab.c b/gdb/symtab.c index 0a077469428..a479e920c60 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -2992,7 +2992,7 @@ find_pc_sect_compunit_symtab (CORE_ADDR pc, struct obj_section *section) section. */ } - /* Cust is best found sofar, save it. */ + /* Cust is best found so far, save it. */ best_cust = cust; best_cust_range = range; }