开发者

Generating thread dump of C++ process

I would like to debug and identify a memory leak in one/some of the threads开发者_StackOverflow in a C++ process. I would like to get a thread dump of the process once the memory usage is very high.

I know for java the following commands work, 'kill -3 ' [linux] or 'sendsignal.exe ' (http://www.latenighthacking.com/projects/2003/sendSignal/)

Is there any way to a get thread dump for C++ process on Windows.

can this thread be related: How to programmatically cause a core dump in C/C++

Thank you.


Minidump, not "thread dump". It is built into Taskmgr.exe for Vista and Win7. Right-click the process in the Processes tab, Create Dump File. All the different ways are listed here.


You can also generate memory dumps (mini-dumps) based on performance counters (handle count, memory consumption) automatically using procdump from SysInternals: http://technet.microsoft.com/en-us/sysinternals/dd996900

You can then load and analyze the generated file(s) in WinDbg (or in VS2010 which can now also load memory dumps)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜