gdb is a tool that allows you to debug a live-running application, and also debug a crashed application that generated a core file. The instructions in this doc are for debugging a live-running application.
An application that is created with debug symbols and without optimizations are much easier to debug. To accomplish this, EPICS documentation says to create a Makefile.Host file.
...