GDB with Eclipse *almost* working...
I almost have a full working setup with GDB in Eclipse for debugging remotely on my target hardware, but it's not quite there. Here's what I've done and where I'm at so far:
1. I have a custom image that I build, plus a few userspace applications. I use bitbake at the command line to build the full image. I have also built an SDK based on my production image and have been successfully using that SDK to build applications through Eclipse.
2. Followed the instructions for Eclipse as detailed in the "Working with Eclipse" section of the manual to install all the remote debugging related tools (GDB, TCF, etc.).
3. Created a dev image recipe that is the same as my base image recipe, except I added dev-pkgs and eclipse-debug to IMAGE_FEATURES. For the userspace applications I want to debug, I changed their reference in IMAGE_INSTALL to list the "-dbg" packages instead of the standard packages. I also added gdbserver to the IMAGE_INSTALL list.
4. Built my dev image and burned it to flash on my target hardware.
5. Upon starting my target hardware, I noticed that the executables and other supporting files for the packages I listed as -dbg were missing. I then by hand installed the standard packages (opkg install foo) to get all the files I needed.
6. From Eclipse, I created a new Debug configuration as detailed in "Deploying and Debugging the Application" section to setup for Remote Application debugging using TCF.
7. I added a "set sysroot" line to the .gdbinit for my application to point to the sysroot listed in the SDK I built in step 1.
8. I then launch debug and I am able to start the application on my target hardware. However, none of the source files are viewable. I get the error "No source available for main()" in the source window. I can run and pause the application and see the disassembly, but I can't see the source and set breakpoints.
This is the closest I've ever got to debugging with GDB. Anyone know what final step I may be missing?