checkpoint: print index of new checkpoint in response message
This way the user can know the index of the latest checkpoint without having to run "info checkpoints" afterwards. gdb/ChangeLog: * linux-fork.c (checkpoint_command): Print index of new checkpoint in response message.
This commit is contained in:
parent
88db67effd
commit
6f9d33d898
2 changed files with 11 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2014-11-23 Patrick Palka <patrick@parcs.ath.cx>
|
||||||
|
|
||||||
|
Pushed by Joel Brobecker <brobecker@adacore.com>
|
||||||
|
* linux-fork.c (checkpoint_command): Print index of new
|
||||||
|
checkpoint in response message.
|
||||||
|
|
||||||
2014-11-23 Yao Qi <yao@codesourcery.com>
|
2014-11-23 Yao Qi <yao@codesourcery.com>
|
||||||
|
|
||||||
* valprint.c (read_string): Move local variables 'found_nul',
|
* valprint.c (read_string): Move local variables 'found_nul',
|
||||||
|
|
|
@ -690,12 +690,15 @@ checkpoint_command (char *args, int from_tty)
|
||||||
|
|
||||||
retpid = value_as_long (ret);
|
retpid = value_as_long (ret);
|
||||||
get_last_target_status (&last_target_ptid, &last_target_waitstatus);
|
get_last_target_status (&last_target_ptid, &last_target_waitstatus);
|
||||||
|
|
||||||
|
fp = find_fork_pid (retpid);
|
||||||
|
|
||||||
if (from_tty)
|
if (from_tty)
|
||||||
{
|
{
|
||||||
int parent_pid;
|
int parent_pid;
|
||||||
|
|
||||||
printf_filtered (_("checkpoint: fork returned pid %ld.\n"),
|
printf_filtered (_("checkpoint %d: fork returned pid %ld.\n"),
|
||||||
(long) retpid);
|
fp != NULL ? fp->num : -1, (long) retpid);
|
||||||
if (info_verbose)
|
if (info_verbose)
|
||||||
{
|
{
|
||||||
parent_pid = ptid_get_lwp (last_target_ptid);
|
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)
|
if (!fp)
|
||||||
error (_("Failed to find new fork"));
|
error (_("Failed to find new fork"));
|
||||||
fork_save_infrun_state (fp, 1);
|
fork_save_infrun_state (fp, 1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue