From patchwork Sun Apr 14 19:44:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Buettner X-Patchwork-Id: 88470 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 A6B393846400 for ; Sun, 14 Apr 2024 19:59:27 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 084563849AFB for ; Sun, 14 Apr 2024 19:58:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 084563849AFB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 084563849AFB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713124711; cv=none; b=vYSOF0xwq10c0t57vacOrh89hemaLE8yYSQZDbOwyt82hBFFd6GpKJOM5HyabG8EFmHiUBNhKG0J2ZAkwYXjU14/ZeiiTMWCyKFjEbAqPcHsxXk+3X2oLjgki2KUZTMzbcLgX3PoS2AyfQ1D7C4n4Ni24vML7o5qZYaPFVVxOAc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713124711; c=relaxed/simple; bh=ntYUeog58+4nwpDLi0WKzyi5M9Sprk6/mP/qo+lKvUk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=P4fRFjiZn1aC8BXWq2Ai8MH6axXO3sUOCje0ihJh0x+mUd+flinGbApbTAqXkYfvZ6RyWZvrZ+xEIzOeOqV3FKEPSR5YgQA49+6KRaPGLpmUgffyyhDc09FE8RtIhb27+yzAjyDO/saRTdxfFN+Pza4A+TIheKAqyYzuERGmlgg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713124707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+2u7FH5CxqJB4VnTGs4TSsxep0lcw7uyw5UV5uySUqU=; b=WqNZS8Y6WYjOfYb83VHyTkbSreigqWosj621P/v/Ak5Dd5++xgNk6Sw9/4YQB1rc3tD2Oa +hWpxWmbPTYUKvTJ93aiXGRW9ymaIKLb6fdQ5I+hMV3LygyO9cZ7dY8UcVaYaYCahx23OQ 13OQ0fgfS21hh/f1zQquCobw+kvZCgw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-537-GiF1SzkzNuWiUFm3z97m2A-1; Sun, 14 Apr 2024 15:58:24 -0400 X-MC-Unique: GiF1SzkzNuWiUFm3z97m2A-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 32A7D801701; Sun, 14 Apr 2024 19:58:24 +0000 (UTC) Received: from f39-1.lan (unknown [10.22.16.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id BA78C51EF; Sun, 14 Apr 2024 19:58:23 +0000 (UTC) From: Kevin Buettner To: gdb-patches@sourceware.org Cc: Pedro Alves , Kevin Buettner Subject: [PATCH v3 2/3] Capitalize output of successful checkpoint command Date: Sun, 14 Apr 2024 12:44:43 -0700 Message-ID: <20240414195812.151224-3-kevinb@redhat.com> In-Reply-To: <20240414195812.151224-1-kevinb@redhat.com> References: <20240414195812.151224-1-kevinb@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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 This commit causes the output of a "checkpoint" command to be changed from: checkpoint N: fork returned pid DDDD to: Checkpoint N: fork returned pid DDDD This change was made to bring the output of the "checkpoint" command in line with that of other commands, e.g.: (gdb) break main Breakpoint 1 at ... (gdb) catch exec Catchpoint 2 (exec) (gdb) add-inferior [New inferior 2] Added inferior 2 The tests gdb.base/checkpoint.exp and gdb.base/kill-during-detach.exp have been updated to accept either form of output from the "checkpoint" command. The test gdb.multi/checkpoint-multi.exp had already been written with this change in mind. --- gdb/linux-fork.c | 2 +- gdb/testsuite/gdb.base/checkpoint.exp | 2 +- gdb/testsuite/gdb.base/kill-during-detach.exp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c index 987c925bdbc..e686fdcb0f4 100644 --- a/gdb/linux-fork.c +++ b/gdb/linux-fork.c @@ -919,7 +919,7 @@ checkpoint_command (const char *args, int from_tty) { int parent_pid; - gdb_printf (_("checkpoint ")); + gdb_printf (_("Checkpoint ")); if (forks_exist_in_multiple_inferiors_p ()) gdb_printf ("%d.%d: ", inf->num, fp->num); else diff --git a/gdb/testsuite/gdb.base/checkpoint.exp b/gdb/testsuite/gdb.base/checkpoint.exp index b9a1e3161db..9fcb91139de 100644 --- a/gdb/testsuite/gdb.base/checkpoint.exp +++ b/gdb/testsuite/gdb.base/checkpoint.exp @@ -345,7 +345,7 @@ with_test_prefix "delete checkpoint 0" { clean_restart $binfile runto_main - gdb_test "checkpoint" "checkpoint 1: fork returned pid $decimal\\." + gdb_test "checkpoint" "\[Cc\]heckpoint 1: fork returned pid $decimal\\." gdb_test "restart 1" "Switching to .*" gdb_test "delete checkpoint 0" "Killed process $decimal" gdb_test "info checkpoints" [string_to_regexp "No checkpoints."] diff --git a/gdb/testsuite/gdb.base/kill-during-detach.exp b/gdb/testsuite/gdb.base/kill-during-detach.exp index 68292cc3c51..d61ddedceaf 100644 --- a/gdb/testsuite/gdb.base/kill-during-detach.exp +++ b/gdb/testsuite/gdb.base/kill-during-detach.exp @@ -93,7 +93,7 @@ proc run_test { exit_p checkpoint_p } { # Set the checkpoint. gdb_test "checkpoint" \ - "checkpoint 1: fork returned pid $::decimal\\." + "\[Cc\]heckpoint 1: fork returned pid $::decimal\\." } # Must get the PID before we resume the inferior.