I have a program that I hope to debug in gdb for a segmentation fault, but I’m not sure how I can generate a core file from it.
I tried $ ulimit -c unlimited, but when I ran the program and then navigated into /cores/, there was no core file generated there when I typed ls.
Am I missing anything here?
The way you enable core file generation is dependent on your shell. The syntax you’re showing is for someone using
shorbashas their shell, and it should work fine. e.g.