From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13054 invoked by alias); 3 Apr 2008 13:20:19 -0000 Received: (qmail 13038 invoked by uid 22791); 3 Apr 2008 13:20:18 -0000 X-Spam-Check-By: sourceware.org Received: from smtp4.poczta.onet.pl (HELO smtp4.poczta.onet.pl) (213.180.130.28) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 03 Apr 2008 13:19:58 +0000 Received: from static-62-233-152-148.devs.futuro.pl ([62.233.152.148]:3022 "EHLO [10.0.0.62]" rhost-flags-OK-OK-OK-FAIL) by ps4.test.onet.pl with ESMTPSA id S184550744AbYDCNT4F66v8 (ORCPT ); Thu, 3 Apr 2008 15:19:56 +0200 Message-ID: <47F4D97B.8060400@op.pl> Date: Thu, 03 Apr 2008 13:20:00 -0000 From: Bogdan Slusarczyk User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: gdb@sourceware.org Subject: [gdb 6.7.1/6.8] does '-var-create - @' work or not? 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: 2008-04/txt/msg00019.txt.bz2 I've done simple test: int test2( int a ) { int b = a + 20; return b;//should be a=11, b=31, but is a=31,b=0 } int test1( int a ) { int b = a + 10; return test2( b );//should be a=1, b=11, but is a=11, b=11 } int main( int argc, char** argv ) { int a = 10; int b = 1; test1( 1 );//should be a=10, b=1 and is a=10, b=1 return 0; } I thought that created var objects using '-var-create - @' can be updated in another frame. But it doesn't work, -var-evaluate-expression returns wrong value. On the other hand 'print' returns right values. Or maybe I did something wrong? My sequence: -var-create at the begining, and next -var-update and -var-evaluate-expression in another frames. Regards, Bogdan