Menu

linux_debug_howto Log in to Edit

Debugging fldigi etc, on Linux

After building fldigi, flrig, flmsg, etc. from source you may find it necessary
to run from the gnu debugger. Each of the code snippets assumes that you are in
the top level source directory for the application, for example:

/home/dave/dev/fldigi-4.0.15/

fldigi:
If you already have a fldigi files folder, create a duplicate in the current working directory, pwd.

$ cp -r ~/.fldigi fldigi.test
$ ./configure && make
$ gdb src/fldigi
(gdb) handle SIGUSR2 nostop
(gdb)run --config-dir fldigi.test

flrig:

$ cp -r ~/.flrig flrig.test
$ ./configure && make
$ gdb src/flrig
(gdb) handle SIGUSR2 nostop
(gdb) run --config-dir flrig.test

flmsg:

$ cp -r ~/.nbems flmsg.test
$ ./configure && make
$ gdb src/flmsg
(gdb)handle SIGUSR2 nostop
(gdb) run --flmsg-dir flmsg.test

You will be returned to the gdb prompt if a segmentation fault occurs during testing. You can determine the fault location and the code path to the fault using the gdb back trace command:

(gdb) thread apply all backtrace

You can force an interrupt in the target program by issuing a control-C from the terminal window that is running gdb. This may be useful if the program enters a loop in a thread that interferes with the general program flow. The back trace command will indicate where the program was interrupted.

Quit gdb with the 'q'uit command

(gdb) q

Related

Wiki: build_howto

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.