English 中文(简体)
Debugging a core produced by valgrind
原标题:

Valgrind produced a vgcore.NNNN file -- how do I debug the core using GDB? Do I need to use the original executable and supply the core, or is there some other way to do it?

Using valgrind as the root executable doesn t seem to work, and using the executable that was being run under valgrind directly in GDB with the core seems to produce bad backtraces.

最佳回答

This works fine for me:

gdb ./a.out vgcore.21650

and that s how you are supposed to use the vgcore.

If your program corrupted stack before crashing, then obviously you wouldn t get good stack traces from vgcore. You might want to expand your question with actual Valgrind report that led to the crash.

问题回答

暂无回答




相关问题
tell gdb to disassemble "unknown" code

is it possible to configure gdb in order to debug assembly code when there are no debug symbols or no sources available ? I mean showing assembly instruction by assembly instruction when performing a ...

C++ Netbeans debugging issues

I installed netbeans6.7.1 ide for c/c++ also i have mingw/msys cygwin installed and i have given C:Msysin as environment variable path.It has gdb7 version.However wheni run dbugging thru netbeans ...

setting strings in gdb

c++: int main() { string a = "a"; ... ... } when i debug in gdb: (gdb) set var a = "ok" Invalid cast I run the program and pause at a break point after string a has been ...

How to debug programms written in fasm under linux using gdb?

I wrote simple "hello, world" in fasm, and its works, but how i can generate debug info for gdb and edb (Evan s Debugger)? Fasm compiler could only produce debugging symbols in its specific format - "...

How can I display Unicode strings while debugging on linux?

I have been working for some years now as C++ Developer using MS Visual Studio as working platform. Since I privately prefer to use linux, I recently took the chance to move my working environment to ...

Continue to debug after failed assertion on Linux?

When an assertion fails with Visual C++ on Windows, the debugger stops, displays the message, and then lets you continue (or, if no debugging session is running, offers to launch visual studio for you)...

热门标签