This is the mail archive of the
mailing list for the GDB project.
RE: Displaying values in a loop
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'MVD'" <inetcop at gmail dot com>, <gdb at sources dot redhat dot com>
- Date: Mon, 16 Apr 2007 10:27:58 +0100
- Subject: RE: Displaying values in a loop
- References: <email@example.com>
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++)
> 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.
Can't think of a witty .sigline today....