From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15459 invoked by alias); 15 Apr 2005 10:11:16 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 10744 invoked from network); 15 Apr 2005 10:08:34 -0000 Received: from unknown (HELO pluton.ispras.ru) (83.149.199.253) by sourceware.org with SMTP; 15 Apr 2005 10:08:34 -0000 Received: (qmail 61367 invoked from network); 15 Apr 2005 10:01:23 -0000 Received: from unknown (HELO truba.ispras.ru) (83.149.198.41) by pluton.ispras.ru with SMTP; 15 Apr 2005 10:01:23 -0000 Received: from truba.ispras.ru (root@localhost) by truba.ispras.ru (8.13.1/8.13.1) with SMTP id j3F9xQvf008147 for ; Fri, 15 Apr 2005 13:59:26 +0400 Received: from ispserv.ispras.ru (ispserv [83.149.198.72]) by truba.ispras.ru (8.13.1/8.13.1) with ESMTP id j3F9xQR5008137; Fri, 15 Apr 2005 13:59:26 +0400 Received: from kite.ispras.ru (kite.ispras.ru [83.149.198.52]) by ispserv.ispras.ru (8.12.8/8.12.8) with ESMTP id j3F9xkDA011338; Fri, 15 Apr 2005 13:59:46 +0400 Date: Fri, 15 Apr 2005 10:11:00 -0000 From: Konstantin Karganov Organization: ISP RAS Message-ID: <7111499365.20050415141242@ispras.ru> To: JS CC: gdb@sources.redhat.com Subject: Re[2]: Still cannot print variable In-reply-To: References: <238614216.20050415132437@ispras.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SpamTest-Version: SMTP-Filter Version 2.0.0 [0125], KAS/Release SMTP-Filter Version 2.0.0 [0125], KAS/Release X-Spamtest-Info: Pass through X-SW-Source: 2005-04/txt/msg00093.txt.bz2 Hello JS, >> Try this: >> gdb test >> break main // to stop your program run >> run >> print d >> > Ok now it work but when I write "print d" I get: > $1 = 134513410 > But I declared d to be 119. Sure! Because you stand before the initialization. Try to do "step" or "next" and after that you'll see your variable initialized. -- Best regards, Konstantin