Mirror of the gdb-patches mailing list
 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 v4 2/4] Capitalize output of successful checkpoint command
Date: Tue, 25 Jun 2024 18:55:53 -0700	[thread overview]
Message-ID: <20240626020148.68109-3-kevinb@redhat.com> (raw)
In-Reply-To: <20240626020148.68109-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, gdb.base/kill-during-detach.exp,
and gdb.multi/checkpoint-multi.exp have been updated to accept the new
(capitalized) output from the "checkpoint" command.
---
 gdb/linux-fork.c                              | 2 +-
 gdb/testsuite/gdb.base/checkpoint.exp         | 2 +-
 gdb/testsuite/gdb.base/kill-during-detach.exp | 2 +-
 gdb/testsuite/gdb.multi/checkpoint-multi.exp  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c
index 833778bf9f7..4905d4ffd88 100644
--- a/gdb/linux-fork.c
+++ b/gdb/linux-fork.c
@@ -929,7 +929,7 @@ checkpoint_command (const char *args, int from_tty)
     {
       int parent_pid;
 
-      gdb_printf (_("checkpoint %s: fork returned pid %ld.\n"),
+      gdb_printf (_("Checkpoint %s: fork returned pid %ld.\n"),
 		  (forks_exist_in_multiple_inferiors_p ()
 		   ? string_printf ("%d.%d", inf->num, fp->num).c_str ()
 		   : string_printf ("%d", fp->num).c_str ()),
diff --git a/gdb/testsuite/gdb.base/checkpoint.exp b/gdb/testsuite/gdb.base/checkpoint.exp
index b9a1e3161db..0662fe1c654 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" "Checkpoint 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..d9ab8ee5383 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\\."
+	    "Checkpoint 1: fork returned pid $::decimal\\."
     }
 
     # Must get the PID before we resume the inferior.
diff --git a/gdb/testsuite/gdb.multi/checkpoint-multi.exp b/gdb/testsuite/gdb.multi/checkpoint-multi.exp
index ec999c078c8..a8f0190747b 100644
--- a/gdb/testsuite/gdb.multi/checkpoint-multi.exp
+++ b/gdb/testsuite/gdb.multi/checkpoint-multi.exp
@@ -23,7 +23,7 @@ require {istarget "*-*-linux*"}
 require gdb_protocol_is_native
 
 set proc_re "(?:process $::decimal|Thread $::hex \\(LWP $::decimal\\))"
-set ckpt_re "checkpoint"
+set ckpt_re "Checkpoint"
 set main_proc "\\(main process\\)"
 set hello_c "hello\\.c"
 set goodbye_c "goodbye\\.c"
-- 
2.45.2


  parent reply	other threads:[~2024-06-26  2:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26  1:55 [PATCH v4 0/4] Make linux checkpoints work with multiple inferiors Kevin Buettner
2024-06-26  1:55 ` [PATCH v4 1/4] " Kevin Buettner
2024-10-23 20:10   ` Pedro Alves
2024-10-31  3:04     ` Kevin Buettner
2024-11-11 18:40       ` Pedro Alves
2024-06-26  1:55 ` Kevin Buettner [this message]
2024-06-26  1:55 ` [PATCH v4 3/4] Print only process ptids from linux-fork.c Kevin Buettner
2024-06-26  1:55 ` [PATCH v4 4/4] Linux checkpoints: Update NEWS and gdb.texinfo regarding multiple inferiors Kevin Buettner
2024-06-26 12:25   ` Eli Zaretskii
2024-09-07 18:12 ` [PATCH v4 0/4] Make linux checkpoints work with " Kevin Buettner
2024-09-30  3:39 ` Kevin Buettner
2024-10-21 18:21 ` 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=20240626020148.68109-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