arm-linux-gcc
to compile a simple C file at host (debian i386) with -g
.a.out
file to the targ
Read carefully the documentation of GDB notably about source path. You want to use the dir
command
Also, switch to a newer gdb (perhaps by compiling gdb
from its source code). Current version is 7.7 (so 6.8 is really old)
AFAIK you need a copy of source on your target machine (where you run the debugger).
Another way to debug this is to run your code under gdbserver on target machine, then connect to gdbserver from your PC. So, first on target machine do something like:
gdbserver localhost:9999 a.out
Then on your PC do:
gdb a.out
target remote your-target-ip-or-name:9999
...
For me compiling with your switches and then trying to list source in gdb lists source as expected. You must not move source or binary around, or gdb will not be able to locate it.