gdbserver allows you to connect your program with
a remote GDB using the "target remote" command. On the target
machine, you need to have a copy of the program you want to debug.
gdbserver does not need your program's symbol
table, so you can strip the program if necessary to save space.
GDB on the host system does all the symbol
handling. Here is an example:

If the target program you want to debug is linked against shared
libraries, you must tell GDB where the proper target libraries are
located. This is done using the set solib-absolute-prefix GDB
command. If this command is omitted, then, apparently, GDB loads the
host versions of the libraries and gets crazy because of that.