With Eclipse it is possible to run a process through gdb.
This gives us a pretty GUI which can be used to inspect the call stack, variable contents etc.
Is it possible to open a core dump in Eclipse and inspect it through gdb?
Use one of the options: Select Run | Open Core Dump from the main menu or call this action from Help | Find Action ( Ctrl+Shift+A ). If there are no Core Dump Debug configurations in the project, the Open Core Dump dialog will be shown right away. Otherwise, select New Core Dump from the popup menu.
A “core dump” is a snapshot of memory at the instant the program crashed, typically saved in a file called “core”. GDB can read the core dump and give you the line number of the crash, the arguments that were passed, and more.
By default, all core dumps are stored in /var/lib/systemd/coredump (due to Storage=external ) and they are compressed with zstd (due to Compress=yes ). Additionally, various size limits for the storage can be configured. Note: The default value for kernel.
You can use the gcore command in the gdb (GNU Debugger) interface to get a core image of a running process. This utility accepts the pid of the process for which you want to force the core dump. To get the list of Java processes running on the machine, you can use any of the following commands: ps -ef | grep java.
After switching to the Debug perspective, select Run -> Debug Configurations... (scroll down if you don't see it) -> C/C++ Postmortem Debugger. Then fill in the C/C++ Application and Core file fields with your executable and coredump and hit the Debug button.
Even though there is a logic to their menu organization, the Eclipse CDT developers sure don't make finding the most used operations easy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With