Still cannot print variable
Bob Rossi
bob@brasko.net
Fri Apr 15 11:55:00 GMT 2005
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
More information about the Gdb
mailing list