我应该对小型转储使用哪些设置?
目前,我们使用 MiniDumpNormal | 调用
标志。 这对于调试配置中的内部构建来说效果很好,但没有提供我们在发布配置中需要的那么多信息。MiniDumpWriteDump
MiniDumpWithIndirectlyReferencedMemory
在发布版中,小型转储数据包含足够的堆栈信息,供调试器确定代码中发生故障的位置,但没有其他数据。 我并不是简单地意味着由于优化而导致局部变量丢失,正如您在发布版本中所期望的那样 - 我的意思是,除了调用堆栈和当前代码行之外,没有任何有用的东西。 没有寄存器,没有本地变量,没有全局变量,没有本地变量指向的对象——什么都没有。 我们甚至没有得到允许我们查看当前对象的“this”。 这就是使用 MiniDumpWithIndirectlyReferencedMemory 的要点 - 它应该包含本地变量和堆栈变量引用的内存,但似乎没有。
我们应该使用什么标志来代替? 我们不想使用 MiniDumpWithFullMemory 并开始生成 600MB 以上的转储,但如果这意味着获得更多有用的数据,我们很乐意将转储扩展到我们当前获得的 90KB 之外。 也许我们应该使用 MiniDumpWithDataSegments
(全局变量)或者...?
Currently we call MiniDumpWriteDump
with the MiniDumpNormal | MiniDumpWithIndirectlyReferencedMemory
flags. That works just fine for internal builds in Debug configuration, but isn't giving as much information as we need in Release configuration.
In Release, the minidump data contains enough stack information for the debugger to work out where in the code the failure occurred, but no other data. I don't simply mean local variables are missing due to being optimised out, as you'd expect in a Release build - I mean, there is nothing useful except for the call stack and current code line. No registers, no locals, no globals, no objects pointed to by locals - nothing. We don't even get 'this' which would allow us to view the current object. That was the point of using MiniDumpWithIndirectlyReferencedMemory
- it should have included memory referenced by locals and stack variables, but doesn't seem to.
What flags should we be using instead? We don't want to use MiniDumpWithFullMemory
and start generating 600MB+ dumps, but would happily expand the dumps somewhat beyond the 90KB we currently get if it meant getting more useful data. Perhaps we should be using MiniDumpWithDataSegments
(globals) or...?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
WinDbg 对
.dump /ma
使用以下标志:我建议您将
MiniDumpWithFullMemory
替换为MiniDumpWithIndirectlyReferencedMemory
。WinDbg uses the following flags for a
.dump /ma
:I suggest you replace
MiniDumpWithFullMemory
byMiniDumpWithIndirectlyReferencedMemory
.