public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sourceware.org
Cc: Pedro Alves <pedro@palves.net>, Kevin Buettner <kevinb@redhat.com>
Subject: [PATCH v3 2/3] Capitalize output of successful checkpoint command
Date: Sun, 14 Apr 2024 12:44:43 -0700	[thread overview]
Message-ID: <20240414195812.151224-3-kevinb@redhat.com> (raw)
In-Reply-To: <20240414195812.151224-1-kevinb@redhat.com>

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.
-- 
2.44.0


  parent reply	other threads:[~2024-04-14 19:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-14 19:44 [PATCH v3 0/3] Make linux checkpoints work with multiple inferiors Kevin Buettner
2024-04-14 19:44 ` [PATCH v3 1/3] " Kevin Buettner
2024-05-03 15:54   ` Pedro Alves
2024-04-14 19:44 ` Kevin Buettner [this message]
2024-05-03 15:54   ` [PATCH v3 2/3] Capitalize output of successful checkpoint command Pedro Alves
2024-04-14 19:44 ` [PATCH v3 3/3] Make thread_db_target::pid_to_str checkpoint-aware Kevin Buettner
2024-05-03 15:55   ` Pedro Alves
2024-05-02  1:49 ` [PATCH v3 0/3] Make linux checkpoints work with multiple inferiors Kevin Buettner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240414195812.151224-3-kevinb@redhat.com \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).