]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Capitalize output of successful checkpoint command
authorKevin Buettner <kevinb@redhat.com>
Wed, 5 Feb 2025 18:27:00 +0000 (11:27 -0700)
committerKevin Buettner <kevinb@redhat.com>
Wed, 5 Feb 2025 18:28:29 +0000 (11:28 -0700)
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.

Reviewed-By: Tom Tromey <tom@tromey.com>
Approved-By: Andrew Burgess <aburgess@redhat.com>
gdb/linux-fork.c
gdb/testsuite/gdb.base/checkpoint.exp
gdb/testsuite/gdb.base/kill-during-detach.exp
gdb/testsuite/gdb.multi/checkpoint-multi.exp

index 585474fdfedcce07e375ce6a8436f1cc73d94c46..e1e2a76f75f3a661a7f5edc58049ef68e68ad300 100644 (file)
@@ -959,7 +959,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"),
                  ((number_of_inferiors () > 1)
                   ? string_printf ("%d.%d", inf->num, fp->num).c_str ()
                   : string_printf ("%d", fp->num).c_str ()),
index 4a8a9a8eb7f81b54521cd4b69b324ca1c37cc8c4..68bddd8244d4b292718ac853150ca4daa2e32f63 100644 (file)
@@ -359,7 +359,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."]
index 68292cc3c51cae0c4d428599f1510d7d2759c586..d9ab8ee5383be14fec01b3ba934aaa450cf355c8 100644 (file)
@@ -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.
index 2bd654347b0a31d88912e273a6f09b76cc2ce457..4860608e704ff0e3f9ce47390b7a3426a6a8f121 100644 (file)
@@ -24,7 +24,7 @@ require gdb_protocol_is_native
 
 set checkpoints_header_re " +Id +Active Target Id +Frame.*?"
 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"