I'm trying to debug a simple "Hello World" app using gdbserver. I had to build gdb and gbdserver from source since the file system in the PSP that I received did not include it. Both gdb and gdbserver seemed to build cleanly but when I execute gdbserver on my target device (AM389x), I get the following:
>gdbserver hostIpAddress:10000 /home/root/hello_world
/bin/gdbserver: line 1: syntax error: word unexpected (expecting ")")
Note: In the actual command that I execute above, I have a valid IP address where hostIpAddress is.
It doesn't seem to matter what parameters I pass into gdbserver I always get the same error: /bin/gdbserver: line 1: syntax error: word unexpected (expecting ")")
My suspicion is that the gdbserver is built incorrectly but I don't know how to verify this?
Here are the steps I used to build GDB and GDB server:
1) download GDB 7.2
2) create gbd_AM389x directory off of the main GDB source tree
3) cd into gbd_AM389x
4) configure the GDB make file by: ../configure --target=arm-none-linux-gnueabi
5) execute make
6) create gbd_AM389x_server directory off of the main GDB source tree
7) cd into gbd_AM389x_server
8) configure the GDB server make file by: ../gdb/server/configure --target=arm-none-linux-gnueabi
9) make
Both seem to build cleanly but the error I am seeing when I move the gdbserver from my host machine to the target machine lead me to believe otherwise. I'm not sure if it makes any difference but my board it setup to mount an NFS root file system which is located on my host machine. Ideas and suggestions would be appreciated.