From: Patrick Palka <patrick@parcs.ath.cx>
To: gdb-patches@sourceware.org
Cc: Patrick Palka <patrick@parcs.ath.cx>
Subject: [PATCH] checkpoint: print index of new checkpoint in response message
Date: Fri, 14 Nov 2014 19:05:00 -0000 [thread overview]
Message-ID: <1415991890-26872-1-git-send-email-patrick@parcs.ath.cx> (raw)
This way the user can know the index of the latest checkpoint without
having to run "info checkpoints" afterwards.
2014-11-14 Patrick Palka <patrick@parcs.ath.cx>
* linux-fork.c (checkpoint_command): Print index of new
checkpoint in response message.
---
gdb/linux-fork.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c
index 835e612..d7eaeb1 100644
--- a/gdb/linux-fork.c
+++ b/gdb/linux-fork.c
@@ -690,12 +690,15 @@ checkpoint_command (char *args, int from_tty)
retpid = value_as_long (ret);
get_last_target_status (&last_target_ptid, &last_target_waitstatus);
+
+ fp = find_fork_pid (retpid);
+
if (from_tty)
{
int parent_pid;
- printf_filtered (_("checkpoint: fork returned pid %ld.\n"),
- (long) retpid);
+ printf_filtered (_("checkpoint %d: fork returned pid %ld.\n"),
+ fp != NULL ? fp->num : -1, (long) retpid);
if (info_verbose)
{
parent_pid = ptid_get_lwp (last_target_ptid);
@@ -706,7 +709,6 @@ checkpoint_command (char *args, int from_tty)
}
}
- fp = find_fork_pid (retpid);
if (!fp)
error (_("Failed to find new fork"));
fork_save_infrun_state (fp, 1);
--
2.2.0.rc1.23.gf570943
next reply other threads:[~2014-11-14 19:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 19:05 Patrick Palka [this message]
2014-11-22 20:55 ` Patrick Palka
2014-11-23 9:46 ` Joel Brobecker
2014-11-23 12:46 ` Patrick Palka
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=1415991890-26872-1-git-send-email-patrick@parcs.ath.cx \
--to=patrick@parcs.ath.cx \
--cc=gdb-patches@sourceware.org \
/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).