Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse CDT / GDB - open core dump?

Tags:

eclipse

gdb

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?

like image 782
Steve Lorimer Avatar asked May 07 '13 07:05

Steve Lorimer


People also ask

How do I open a core dump file?

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.

What is GDB core dump?

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.

Where can I find core dump?

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.

How does GDB analyze core dump in Java?

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.


1 Answers

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.

like image 117
scottt Avatar answered Sep 23 '22 05:09

scottt