在Windows minidump文件中嵌入线程名称 [英] Embedding thread names in Windows minidump files

查看:94
本文介绍了在Windows minidump文件中嵌入线程名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的32位C ++应用程序在Windows上使用标准方法来命名其线程.当发生错误时,我们会生成小型转储,但是当转储加载到Visual Studio 2013中时,线程名称会丢失.鉴于存在大量线程,这使得调试问题变得更加困难.

Our 32-bit C++ application names its threads using the standard approach on Windows. We generate minidumps when errors occur, but when the dumps are loaded into Visual Studio 2013 the thread names are missing. This makes it harder to debug the problem given the high number of threads present.

我听说改善此问题的唯一方法来自此

The only way I've heard of to improve this comes from this Microsoft User Voice posting, where the caller suggests embedding them in a custom stream, and writing a custom Visual Studio extension to rename the threads upon loading the dump. However, this seems cumbersome and apparently adds a lot of time to the loading process.

是否有更简单的方法将线程名称嵌入转储中,以便在Visual Studio中加载它们时可以正常工作"?

Is there an easier way to embed thread names in the dump so they "just work" when loading them in Visual Studio?

供参考:我们使用Visual Studio 2013进行构建,我们的应用程序在Win7或更高版本上运行,并且我们使用Google Breakpad生成转储.

For reference: we use Visual Studio 2013 to build, our apps run on Win7 or higher, and we use Google Breakpad to generate dumps.

推荐答案

Microsoft表示

Microsoft has indicated that the SetThreadDescription API will be the basis for any proper support they add in the future for thread names in dumps, debuggers, and/or analysis tools.

不幸的是,此API似乎很新,并且转储,WinDbg,Visual Studio Debugger等尚不支持.有

Unfortunately it appears that this API is rather new and is not yet supported in dumps, WinDbg, Visual Studio Debugger, etc. There is a User Voice request to add this support, so please vote for it if you would like a way to properly give threads a persistent name.

这篇关于在Windows minidump文件中嵌入线程名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆