How to generate a core dump programmatically?
I know how to setup Linux to create core dump when a process crashes.
But it is required to be able to generate the core dump when my process crashes programmatically, so I can control where the core dump is generated and what is the name of the file. Also it would be great if I can do this without modifying any system settings. On Windows, all these are possible, is this doable on Linux? Thanks. |
Send just about any unhandled signal to force a core dump; 'SIGSEGV' is a favorite.
Within the program, you do this with 'raise' (man 3 raise) |
All times are GMT -5. The time now is 07:45 PM. |