From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31734 invoked by alias); 22 Nov 2014 20:55:23 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 31724 invoked by uid 89); 22 Nov 2014 20:55:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-pd0-f176.google.com Received: from mail-pd0-f176.google.com (HELO mail-pd0-f176.google.com) (209.85.192.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 22 Nov 2014 20:55:22 +0000 Received: by mail-pd0-f176.google.com with SMTP id y10so7401686pdj.7 for ; Sat, 22 Nov 2014 12:55:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=OS9DCq0v89BPBw/wHx54+IuDEok7Y51qOXnDRXLBSCE=; b=gxr/VMaLzFl3MZpxDLoaVdAwMkkGuPA1bzuSdCn83aYTLb4a++6VGToMnr3+qZG+ZQ 18quHEObpzY8XlHLbVaV+0MiYNvsG+s81v/mWTC8siFAS21xKqdnYU646Ys0Hqb4HPv1 /qAMO3UidDT7uqSQW02Q1a+T8+FkSZTbcUaQStQQ+f7ep/rNgNuplJyzKKX4UZOUV/4x P64lcNjsE5eZqLIsytNlGJ6p72Tr3BJ7l1qrLXuqJsQR0c8EOSVZoZVMYm7UcyaoeTIo Wt2VMODuIVzbElGiL2XfDLGQp8jdI+3VyuBQgh2z4GlcBrwjm+iuHdJ2vwJNa2LxJwq5 i/3g== X-Gm-Message-State: ALoCoQkKNkyVO1+C8XfuuAdi5/U3GfzFIRd0EF+44o+19AqvGmgcjfpwTnWkf78BU0JVjV+0ZLAL X-Received: by 10.69.25.73 with SMTP id io9mr19073225pbd.90.1416689720196; Sat, 22 Nov 2014 12:55:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.70.31.100 with HTTP; Sat, 22 Nov 2014 12:55:00 -0800 (PST) In-Reply-To: <1415991890-26872-1-git-send-email-patrick@parcs.ath.cx> References: <1415991890-26872-1-git-send-email-patrick@parcs.ath.cx> From: Patrick Palka Date: Sat, 22 Nov 2014 20:55:00 -0000 Message-ID: Subject: Re: [PATCH] checkpoint: print index of new checkpoint in response message To: gdb-patches@sourceware.org Cc: Patrick Palka Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00543.txt.bz2 On Fri, Nov 14, 2014 at 2:04 PM, Patrick Palka wrote: > This way the user can know the index of the latest checkpoint without > having to run "info checkpoints" afterwards. > > 2014-11-14 Patrick Palka > > * 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 > Ping.