From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id kOu0AWR9M2cweS8AWB0awg (envelope-from ) for ; Tue, 12 Nov 2024 11:08:04 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=pQLJwMlV; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=osJCv4oz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=pQLJwMlV; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=osJCv4oz; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 00E341E11F; Tue, 12 Nov 2024 11:08:03 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id AF8761E11C for ; Tue, 12 Nov 2024 11:08:01 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3EFA63858423 for ; Tue, 12 Nov 2024 16:08:01 +0000 (GMT) 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 860A83858D20 for ; Tue, 12 Nov 2024 16:07:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 860A83858D20 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 860A83858D20 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=1731427656; cv=none; b=Jy5+XF+d5bA+K1r+6wOfxWdqV5m3dnu3ArdaaV9vJrc+6ch3rXK4smDXf2vgluMsvohIHb4jg0PnFAaYYAY7YZNM2bqmhaF58FqQVV+Q0BrNxeEJO/HOCohT5M154fCwO7Ct6ibPG6v50a3C0iKILcbb1PRYlI4UHVi1/nNSlEM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731427656; c=relaxed/simple; bh=XchOKnw2pDPw/QuV8IL7D9ZGGg87UTevQXLM04tkHg0=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=eX7BlwFRlNAt2DgKpwnm/RB1yzUCYEERHLBbIQQWmcpqYvb3pPOiSQ+8IVqJvIpAPDIyzn0td2Po+TOQbKznn/NHjtncIe9lP8VgRnzaOuD4+MpS31gypN8MyUXkaep6Pr35aVM6QbBxid91vAiyG1L6OZpXjWIXuMIbDYoqxfU= 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 A65FF1F451 for ; Tue, 12 Nov 2024 16:07:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1731427651; 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=XGixaaSyfMTjQnV3oCPinWjNagsWC/wlNO4ftAAhg1A=; b=pQLJwMlV9eJFqerMoXcUcjZ7Ju864dlGA1o2ZpEXt+vARjjjDZvDk6QkFqrlrWR5FDh1sV 6hP6ue8GN2yiE0Us2vT26oZWfSnlJLbJYqmADM898HBxZDsb7i75g1Kgpi2iVF0K8QN+eM R8ZSkcKJSt1bR+lHxxE+9RKR2ANNec0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1731427651; 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=XGixaaSyfMTjQnV3oCPinWjNagsWC/wlNO4ftAAhg1A=; b=osJCv4oz24fcqoZ+Lc3JHJqhAeDXjY/xnQ3zpwgEUkLO/s0h2B9WR/a9nvpy4QIhxEm1Ss 6s24NprjTnNX9ZBQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1731427651; 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=XGixaaSyfMTjQnV3oCPinWjNagsWC/wlNO4ftAAhg1A=; b=pQLJwMlV9eJFqerMoXcUcjZ7Ju864dlGA1o2ZpEXt+vARjjjDZvDk6QkFqrlrWR5FDh1sV 6hP6ue8GN2yiE0Us2vT26oZWfSnlJLbJYqmADM898HBxZDsb7i75g1Kgpi2iVF0K8QN+eM R8ZSkcKJSt1bR+lHxxE+9RKR2ANNec0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1731427651; 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=XGixaaSyfMTjQnV3oCPinWjNagsWC/wlNO4ftAAhg1A=; b=osJCv4oz24fcqoZ+Lc3JHJqhAeDXjY/xnQ3zpwgEUkLO/s0h2B9WR/a9nvpy4QIhxEm1Ss 6s24NprjTnNX9ZBQ== 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 8C07413A8C for ; Tue, 12 Nov 2024 16:07:31 +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 kO3KIEN9M2dGGgAAD6G6ig (envelope-from ) for ; Tue, 12 Nov 2024 16:07:31 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 1/3] [gdb/contrib] Handle parentheses in spellcheck.sh Date: Tue, 12 Nov 2024 17:07:50 +0100 Message-Id: <20241112160752.27661-2-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20241112160752.27661-1-tdevries@suse.de> References: <20241112160752.27661-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-2.80 / 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)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo]; 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)[]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; RCVD_TLS_ALL(0.00)[] 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~public-inbox=simark.ca@sourceware.org Currently, text adjacent to parentheses is not spell-checked: ... $ cat tmp.txt (upto) $ ./gdb/contrib/spellcheck.sh tmp.txt $ ... Add handling of parentheses, such that we get: ... $ ./gdb/contrib/spellcheck.sh tmp.txt upto -> up to $ ... Rerun spellcheck.sh, resulting in a few "thru->through" replacements. Tested on x86_64--linux. --- gdb/contrib/spellcheck.sh | 41 ++++++++++++++++----- gdb/objc-lang.c | 2 +- gdb/testsuite/gdb.reverse/step-precsave.exp | 4 +- gdb/testsuite/gdb.reverse/step-reverse.exp | 4 +- 4 files changed, 37 insertions(+), 14 deletions(-) diff --git a/gdb/contrib/spellcheck.sh b/gdb/contrib/spellcheck.sh index 1b3e88e259b..3399e41ea7f 100755 --- a/gdb/contrib/spellcheck.sh +++ b/gdb/contrib/spellcheck.sh @@ -47,6 +47,32 @@ sed_separators=( "," ) +# Pre: start of line, left parenthesis. +declare -a grep_pre +grep_pre=( + "^" + "\(" +) +declare -a sed_pre +sed_pre=( + "^" + "(" +) + +# Post: dot, right parenthesis, end of line. +declare -a grep_post +grep_post=( + "\." + "\)" + "$" +) +declare -a sed_post +sed_post=( + "\." + ")" + "$" +) + join () { local or @@ -223,12 +249,11 @@ find_files_matching_words () local before after before=$(grep_join \ - "^" \ + "${grep_pre[@]}" \ "${grep_separators[@]}") after=$(grep_join \ "${grep_separators[@]}" \ - "\." \ - "$") + "${grep_post[@]}") pat="$before$pat$after" @@ -250,12 +275,11 @@ find_files_matching_word () local before after before=$(grep_join \ - "^" \ + "${grep_pre[@]}" \ "${grep_separators[@]}") after=$(grep_join \ "${grep_separators[@]}" \ - "\." \ - "$") + "${grep_post[@]}") pat="$before$pat$after" @@ -278,12 +302,11 @@ replace_word_in_file () local before after before=$(sed_join \ - "^" \ + "${sed_pre[@]}" \ "${sed_separators[@]}") after=$(sed_join \ "${sed_separators[@]}" \ - "\." \ - "$") + "${sed_post[@]}") local repl repl="s%$before$word$after%\1$replacement\2%g" diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index fa2befd1a35..58aca298dbc 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -1203,7 +1203,7 @@ print_object_command (const char *args, int from_tty) gdb_printf ("\n"); } -/* The data structure 'methcalls' is used to detect method calls (thru +/* The data structure 'methcalls' is used to detect method calls (through * ObjC runtime lib functions objc_msgSend, objc_msgSendSuper, etc.), * and ultimately find the method being called. */ diff --git a/gdb/testsuite/gdb.reverse/step-precsave.exp b/gdb/testsuite/gdb.reverse/step-precsave.exp index 27b417ec262..04880085cb8 100644 --- a/gdb/testsuite/gdb.reverse/step-precsave.exp +++ b/gdb/testsuite/gdb.reverse/step-precsave.exp @@ -268,12 +268,12 @@ gdb_test_multiple "stepi" "$test_message" { } } -# step backward into function (thru return) +# step backward into function (through return) gdb_test "step" "(RETURN FROM CALLEE|ARRIVED IN CALLEE).*" \ "reverse step into fn call" -# step backward out of called function (thru call) +# step backward out of called function (through call) set test_message "reverse step out of called fn" gdb_test_multiple "step" "$test_message" { diff --git a/gdb/testsuite/gdb.reverse/step-reverse.exp b/gdb/testsuite/gdb.reverse/step-reverse.exp index a3c3b5a5cd1..4bfe289ea73 100644 --- a/gdb/testsuite/gdb.reverse/step-reverse.exp +++ b/gdb/testsuite/gdb.reverse/step-reverse.exp @@ -230,12 +230,12 @@ gdb_test_multiple "stepi" "$test_message" { } } -# step backward into function (thru return) +# step backward into function (through return) gdb_test "step" "(RETURN FROM CALLEE|ARRIVED IN CALLEE).*" \ "reverse step into fn call" -# step backward out of called function (thru call) +# step backward out of called function (through call) set test_message "reverse step out of called fn" gdb_test_multiple "step" "$test_message" { -- 2.35.3