自动化的WinDBG或以其他方式从转储文件中提取信息? [英] Automating WinDBG or otherwise extracting information from Dump Files?

查看:351
本文介绍了自动化的WinDBG或以其他方式从转储文件中提取信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们说我有一个进程的内存转储。我想在其上运行的报告,所以基本上我想开的WinDBG,SOS加载和运行,运行一些命令的脚本,解析输出,然后运行一些基于更多的命令。

Let's say I have a memory dump of a process. I want to run a report on it, so essentially I want to open WinDBG, load SOS and run a script that runs some commands, parses the output and then runs some more commands based on that.

除了hackish的东西一样的SendKeys,是有办法来自动/脚本这一进程?或者,我可以写我自己的工具,在SOS.dll顶部/什么?

Apart from hackish stuff like SendKeys, is there a way to automate/script this process? Or can I write my own tool on top of SOS.dll/whatever?

推荐答案

要做到这一点,最好的方法是通过DbgEng的应用程序。本质上,这可作为替代WinDBG的,这是真的只是覆盖在DbgEng API的图形用户界面。我们写了这些备份的联机故障分析仪为我们的网站之一:

The best way to do this is through a DbgEng based application. Essentially this serves as a replacement for WinDBG, which is really just a GUI interface layered over the DbgEng APIs. We wrote one of these to back the Online Crash Analyzer for our site:

http://www.osronline.com/page.cfm?name=analyze

这真的给你最大的灵活性,以做任何你想要的转储文件。这种类型的应用的一个例子是\ SDK \样品中设置有WinDBG中\ dumpstk目录。

It really gives you the maximum flexibility to do whatever you want with the dump file. An example of this type of application is provided with WinDBG in the \sdk\samples\dumpstk directory.

在实施这些方面,我写了一篇关于DbgEng很短的介绍文章在这里:

In terms of implementing these, I wrote a short intro article about DbgEng here:

http://www.osronline.com/article.cfm?article=559

它是面向使用DbgEng编写扩展DLL来WinDBG的,但其中的概念是相同的一个独立的应用程序。

It's geared towards using DbgEng to write an extension DLL to WinDBG, though the concepts are the same for a standalone application.

另一种方法你可能尝试写,你作为WinDbg的命令行的一部分执行(参见-c命令行选项)的脚本或扩展。这可能是更容易上手,但我想,如果你开始与DbgEng你会更快乐,从长远来看。

As an alternative you could possibly try writing a script or extension that you execute as part of the WinDBG command line (see the "-c" command line option). This is probably easier to get started, though I suspect you'll be happier in the long run if you start with DbgEng.

这篇关于自动化的WinDBG或以其他方式从转储文件中提取信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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