From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19992 invoked by alias); 15 Apr 2005 11:55:09 -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 19897 invoked from network); 15 Apr 2005 11:54:58 -0000 Received: from unknown (HELO lakermmtao11.cox.net) (68.230.240.28) by sourceware.org with SMTP; 15 Apr 2005 11:54:58 -0000 Received: from white ([68.9.64.121]) by lakermmtao11.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050415115454.WUOA29670.lakermmtao11.cox.net@white>; Fri, 15 Apr 2005 07:54:54 -0400 Received: from bob by white with local (Exim 3.35 #1 (Debian)) id 1DMPPS-0006zM-00; Fri, 15 Apr 2005 07:54:54 -0400 Date: Fri, 15 Apr 2005 11:55:00 -0000 From: Bob Rossi To: JS Cc: gdb@sources.redhat.com Subject: Re: Still cannot print variable Message-ID: <20050415115453.GA26855@white> Mail-Followup-To: JS , gdb@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i X-SW-Source: 2005-04/txt/msg00095.txt.bz2 On Fri, Apr 15, 2005 at 11:09:09AM +0200, JS wrote: > 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: You know, I just realized it's kind of odd that GDB doesn't look on the users PATH to figure out which program to debug. For instance, it must first look in the . directory, which is why this works in the first place. I'd expect GDB to start debugging /usr/bin/test, as if he'd run 'test' on the command line. Bob Rossi