This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Still cannot print variable
- From: Bob Rossi <bob at brasko dot net>
- To: JS <fedevaps at yahoo dot dk>
- Cc: gdb at sources dot redhat dot com
- Date: Fri, 15 Apr 2005 07:54:54 -0400
- Subject: Re: Still cannot print variable
- References: <d3o02u$t10$1@sea.gmane.org>
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