Re: problem seeing executable file
Ben Elliston <[email protected]>
| Newsgroups | gmane.comp.gdb.general |
|---|---|
| Message-ID | <[email protected]> |
Jon Hatchett <[email protected]> writes: > I am afraid I have a very simple problem but I am not very good with > Linux. I want to use gdb (here on a test program a.out), but it > seems that gdb cannot see the file even though from the directory it > runs fine. > bash-2.05b$ a.out > hello world > bash-2.05b$ gdb a.out [...] > "i386-redhat-linux-gnu"..."/home/jonh/dynamicrewire/numerics/a.out": not > in executable format: File format not recognized > .:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin > so the present directory does seem to be in the path. GDB doesn't search the path for files. You need to either give the full path to a.out, or you need to cd into that directory before running GDB. BTW, having . at the front of your path is probably not wise. Cheers, Ben