I have a gdbserver on a target, that I launch like gdbserver :2345 /bin/ls
. Next I am connect a gdb from a host, and trying issue next commands:
While it is possible to build "multiarch" gdb, default Ubuntu GDB (called gdb) is built to support single architecture - host PC. You can not debug other CPUs with it, although it does connect to any gdbserver.
You need gdb that can debug your target (ARM) and is compatible with ABI used on your target.
You should get that with your toolchain, but if not, it's not hard to build from source. See sourceware.org/gdb/wiki/BuildingCrossGDBandGDBserver for brief instructions.