I was trying to debug a program on an ARM target and the debugger kept giving me this problem:
gdb malformed packet
Looking online, this error occurs because of a mismatch between the gdb on the host and the gdbserver on the target. The mismatch can be either different version of gdb or gdbserver, or in my case the arm-none-linux-gnueabi didn’t match with arm-angstrom- gdbserver.
If you’ve got a cross compiled toolchain, you can find gdbserver in the path:
[CROS_COMPILE]/libc/lib/ [any dependent libs]
Copy over the gdbserver to the sd card in /usr/bin and the libraries to /lib