0

I've been getting segmentation fault errors on a vulkan renderer I wrote in c++ and the terminal says it has been core dumped, I want to send the core dump file through gdb to debug where the segmentation fault is happening, but I cannot find the core dump file in the project directory nor anywhere else. I noticed that in apport.logs (the apport.logs file) it appears as if the core limit is set to 0, so I suppose no core dump file is being generated. I tried changing the ulimit -c limit in the shell session where I want to generate the core dump, but it does not seem to work. I also tried setting the core dump limit to unlimited on limits.conf, it didn't work too. Please help.

1 Answer 1

1

I want to send the core dump file through gdb to debug where the segmentation fault is happening

Note that you don't need a core dump to debug -- you can debug a live process instead. Just do gdb --args /path/to/binary args.... Then use run to run the binary, and where once GDB stops due to a crash.

If you really want to get a core, you can tweak /proc/sys/kernel/core_pattern. Use cat /proc/sys/kernel/core_pattern to see where the core dumps are currently going (probably a pipe to apport).

Use echo core | sudo tee /proc/sys/kernel/core_pattern to make core appear in the current directory.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.