Core dump file is not generated

This link contains a good checklist why core dumps are not generated: The core would have been larger than the current limit. You don’t have the necessary permissions to dump core (directory and file). Notice that core dumps are placed in the dumping process’ current directory which could be different from the parent process. Verify … Read more

Tell gdb to skip standard files

gdb 7.12 supports file globbing to specify the files to skip in the debugger. The documentation for the same is as below: https://sourceware.org/gdb/onlinedocs/gdb/Skipping-Over-Functions-and-Files.html To skip stepping into all library headers in the directory /usr/include/c++/5/bits, add the below lines to ~/.gdbinit # To skip all .h files in /usr/include/c++/5/bits skip -gfi /usr/include/c++/5/bits/*.h Instead to skip a … Read more

gdb – debugging with pipe

At first, you may run the program and debug it by pid. This solution, of course, doesn’t cover all cases. Another approach is to use Linux capabilities for inter-process communication. In short, you redirect the output of ret to a FIFO special file (“named pipe”) and then read from that FIFO via debugger. Here’s how … Read more

gdb split view with code

It’s called the TUI (no kidding). Start for example with gdbtui or gdb -tui … Please also see this answer by Ciro Santilli. It wasn’t available in 2012 to the best of my knowledge, but definitely worth a look.