From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28451 invoked by alias); 15 Apr 2005 10:22:46 -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 28362 invoked from network); 15 Apr 2005 10:22:39 -0000 Received: from unknown (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org with SMTP; 15 Apr 2005 10:22:39 -0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DMNuC-0001Sy-Vp for gdb@sources.redhat.com; Fri, 15 Apr 2005 12:18:32 +0200 Received: from 130.225.245.182 ([130.225.245.182]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Apr 2005 12:18:32 +0200 Received: from fedevaps by 130.225.245.182 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Apr 2005 12:18:32 +0200 To: gdb@sources.redhat.com From: JS Subject: Re: Re[2]: Still cannot print variable Date: Fri, 15 Apr 2005 10:22:00 -0000 Message-ID: References: <238614216.20050415132437@ispras.ru> <7111499365.20050415141242@ispras.ru> Reply-To: fedevaps@yahoo.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 130.225.245.182 User-Agent: KNode/0.7.7 X-SW-Source: 2005-04/txt/msg00094.txt.bz2 Konstantin Karganov wrote: > 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. > Yes I just read Elis reply...should have done that before posting :-)