From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15491 invoked by alias); 1 Jun 2007 07:59:03 -0000 Received: (qmail 15482 invoked by uid 22791); 1 Jun 2007 07:59:02 -0000 X-Spam-Check-By: sourceware.org Received: from smtp6.poczta.onet.pl (HELO smtp6.poczta.onet.pl) (213.180.130.36) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 01 Jun 2007 07:59:00 +0000 Received: from static-62-233-152-148.devs.futuro.pl ([62.233.152.148]:11014 "EHLO [10.0.0.72]") by ps6.test.onet.pl with ESMTP id (ORCPT ); Fri, 1 Jun 2007 09:58:37 +0200 Message-ID: <465FD1AD.9040909@op.pl> Date: Fri, 01 Jun 2007 07:59:00 -0000 From: Bogdan Slusarczyk User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: gdb@sourceware.org Subject: tracing variables - is it ok? Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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-06/txt/msg00001.txt.bz2 Hi everybody, suppose such code: void testB( int a ) { //a == 20 int k = a; } void testA( int a ) { //a == 10 int k = a; testB( 20 ); } void main() { testA( 10 ); } Inside testA I did '-var-create - @ a' and inside testB '-var-update', but gdb (6.3, 6.6) says that nothing changes and returns a==10 from testA. Is it intended behaviour? How can I properly trace variable changes? It applies not only for function arguments - I tryied do the same thing with 'k', there is the same problem. It strange for me because '-var-create - @' handles scope changes properly (see below) { int a = 10; { int a = 20; } } Regards, Bogdan