It consist of a kernel module which will run gdb gcore on demand from the application.
Usage:
- build
- insert the kernel module
- create the dump device
- link the app with the static library
- call
dump_core()
- Needs a C11 compiler
- Change the makefile and the header as needed
make
- The thread calling
dump_corewill wait until the dump completes. Other threads in the application will continue running for a few jiffies after that call is entered, until the module SIGSTOPs the program. - YMMV with different kernel versions.
- Secure Boot,
selinuxand such might interfere with.- signmod may or may not help