I've been using AVR32 Studio under Windows XP SP2 to debug some of my embedded Linux programs. When debugging a program running on my custom board, it is often the case that the debugger will not stop at at the main() subroutine. Instead, the program will either run to completion, or some of the instructions will be skipped (i.e. gdbserver will not stop at every instruction). For the program that is compiled, I have optimizations at -O0 and debugging at -g3.
The program is being uploaded to the embedded system by AVR Studio via FTP (proftpd server), and it is executed using SSH (dropbear server). I am using the Linux ethernet over USB gadget. The program is being linked statically (-static) since I would get this rather cryptic message if I didn't choose to link statically:
warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. Error while mapping shared library sections: /lib/libc.so.0: No such file or directory. Error while mapping shared library sections: /lib/ld-uClibc.so.0: No such file or directory. Error while reading shared library symbols: /lib/libc.so.0: No such file or directory. Error while reading shared library symbols: /lib/ld-uClibc.so.0: No such file or directory. Stopped due to shared library event
The message goes away when I use the -static switch. I am wondering if I need to include some additional library for debugging. I am writing the programs currently in C, but I would like to also try C++. Which libraries would I need to link if I choose to link statically?