From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26836 invoked by alias); 16 Apr 2007 09:28:27 -0000 Received: (qmail 26828 invoked by uid 22791); 16 Apr 2007 09:28:27 -0000 X-Spam-Check-By: sourceware.org Received: from mail.artimi.com (HELO mail.artimi.com) (194.72.81.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 16 Apr 2007 10:28:25 +0100 Received: from rainbow ([192.168.8.46]) by mail.artimi.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 16 Apr 2007 10:27:56 +0100 From: "Dave Korn" To: "'MVD'" , References: <10012231.post@talk.nabble.com> Subject: RE: Displaying values in a loop Date: Mon, 16 Apr 2007 09:28:00 -0000 Message-ID: <018701c78009$8538c660$2e08a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <10012231.post@talk.nabble.com> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00099.txt.bz2 On 16 April 2007 09:37, MVD wrote: > Hi All, > > I have a situation like below: > > intj=0, k=2; > > for(int i=0; i< 3 ; i++) > { > j=j+k; > } > > Now, suppose I ran GDB and inside for loop I have to use print j and print k > to see the current values. > Does any body have any idea if there is a way to see the values of j and k > ,in the for loop each time values are changes with out using "print" ? See the gdb info page, section 8.6 "Automatic display". Sounds like you want the 'display' command. cheers, DaveK -- Can't think of a witty .sigline today....