1

I am debugging an application in Eclipse Neon on Ubuntu 16.04. My project requires that I generate a core dump (which includes all memory (heap, stack, code segments, etc) for the process under debug) while simultaneously having a debug session for that application.

I tried to use "gcore" from a Terminal while debugging the same application in Eclipse. This gives me:

warning: process 32062 is already traced by process 32032
ptrace: Operation not permitted.
You can't do that without a process to debug.
The program is not being run.
gcore: failed to create core.32062

If I use "gcore" without debugging the application in Eclipse a core dump is produced.

I do not find the option to generate a core dump from within Eclipse ... does that exists? Where to find it? Can I add a plugin which allows me to "execute a gcore" (similar) command from within Eclipse while debugging the application?

Thanks! Hope you can help.

René Heuven
  • 197
  • 16

1 Answers1

1

Meanwhile I figured it out. In Eclipse you can select the gdb console tab once you are debugging using the "Debug" perspective. This gdb console is an interactive console (like all other consoles in Eclipse Neon). Here you can just type the command "generate-core-file" which will core dump the memory of the process under debug.

Also good to note is that there is a "suspend" button which you can use to "pauze" your application at any moment in time. After "suspend" you can also create a core dump using "generate-core-file" in the gdb console.

René Heuven
  • 197
  • 16