From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24998 invoked by alias); 15 Apr 2005 09:09:45 -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 24840 invoked from network); 15 Apr 2005 09:09:40 -0000 Received: from unknown (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org with SMTP; 15 Apr 2005 09:09:40 -0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DMMlM-0000Ux-Pz for gdb@sources.redhat.com; Fri, 15 Apr 2005 11:05:20 +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 11:05:20 +0200 Received: from fedevaps by 130.225.245.182 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Apr 2005 11:05:20 +0200 To: gdb@sources.redhat.com From: JS Subject: Still cannot print variable Date: Fri, 15 Apr 2005 09:09:00 -0000 Message-ID: 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/msg00088.txt.bz2 I am still have problems printing a variable. I have this code in a file called test.: int main() { int d = 119; return(0); } I then compile it like this: gcc -g -Wall -o test test.c (I have also tried with option -O0 but that changes nothing). I run "gdb test" followed by "print d" and then I get this error: No symbol "d" in current context. Why is it not possible to see the contents of "d" when debugging?