Many IDEs such as Eclipse and KDevelop use GDB MI (Machine Interface). It is line based machine oriented text interface to GDB. See full list here: https://sourceware.org/gdb/wiki/GDB%20Front%20Ends.
See these links to get started with GDB MI:
- https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI.html
- http://www.ibm.com/developerworks/library/os-eclipse-cdt-debug2/