The standard tool for debugging programs under Linux is the GNU project debugger GDB. For more information on GDB, see the project website, which includes full user documentation on GDB describing its extensive range of features, capabilities and commands.
There are two ways to use GDB to debug a user program running on a target system under STLinux.
In most cases, the cross debug techinque is recommended. It allows the debugger to be executed on the system that built the application, giving easy access to the sources, and means that the majority of the memory and cpu required for the debugger come from the host system.
These methods are described in Cross debugging with GDB and Native debugging with GDB.