This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Gdbsever not working...

While I am pretty sure I had this working at one point, at the moment, I cannot get gdbserver to work. (When I think it was working, it was on a different board -- I had to send mine back for replacement because the GigE did not work correctly).

I can fire up gdbserver with my executable, and connect to it via arm-none-linux-gnueabi-gdb over the network. gdb lets me set a breakpoint, but when I continue, the break point is never hit (I set the breakpoint on main, so it should stop on the first line of my program). If I hit control-C on the board, the program stops in gdb, so I know that the connection is working and the basic functionality is there, but without breakpoints, it is not terribly useful.

A little bit of research on the web seems to indicate that this might be a kernel problem, but I am not sure how to investigate. This happens for me with both the evm defconf and a custom configuration for the kernel.

Has anyone else experience this? Any work-arounds?

Also, the debug symbols created by arm-none-linux-gnueabi-gcc with -g are not readable by arm-none-linux-gnueabi-gdb (it complains about improperly formatted dwarf information). If I use -gstabs or -gstabs+ then gdb can read the symbol info, but then I am back to the breakpoints not firing.

Best regards,

B.J. Buchalter

  • Ok,

    Further to this; I find that if I boot the board with the default evm image and kernel that comes on the SD card, gdbserver works properly and I can break on main. The gdbserver file on sdcard is different than the one installed by the ez-sdk setup script, but it turns out that it is not the source of the problem as I copied the one from the sdcard to my NFS boot image and tried it with my NFS boot -- but it still does not stop at the beginning of the program.

    The problem does appear to be related to the kernel configuration. Unfortunately, it would appear that the kernel shipped on the sdcard does not match the defconfig that comes in the ez-sdk as building the def-config and booting with that kernel still does not work properly. It is not clear to me what the source of the problem is.

    Anyone at TI have any ideas about what I need to do to rebuild the kernel and still be able to use gdbserver?

    Best regards,

    B.J.

  • Ok,

    Sorry for the noise; it appears that the problem was that I was running a different build my program on the target then I thought I was, and that was the source of the problem. Interestingly, there was no warning message or other indication that things were wrong or mismatched other than the breakpoints not firing.

    So, for future reference; if breakpoints don't work right with gdbserver, make sure that you are actually trying to debug the correct executable!

    -B.J.