如何在.net 中进行内存转储?
如何从给定内存地址获取内存转储,格式如下:
Address | Hexadecimal representation | ASCII representation
---------------------------------------------------------------------------------------
0x637132687 | 00 00 00 00 00 00 00 00 45 21 65 78 32 F5 12 6C | ....... ahsnfdas
0x637132703 | 00 00 00 00 00 00 00 00 45 21 65 78 32 F5 12 6C | ....... ahsnfdas
0x637132719 | 00 00 00 00 00 00 00 00 45 21 65 78 32 F5 12 6C | ....... ahsnfdas
0x637132735 | 00 00 00 00 00 00 00 00 45 21 65 78 32 F5 12 6C | ....... ahsnfdas
您知道用于该工作的任何 API/框架/工具吗?
How do you obtain a memory dump from a given memory address in the format:
Address | Hexadecimal representation | ASCII representation
---------------------------------------------------------------------------------------
0x637132687 | 00 00 00 00 00 00 00 00 45 21 65 78 32 F5 12 6C | ....... ahsnfdas
0x637132703 | 00 00 00 00 00 00 00 00 45 21 65 78 32 F5 12 6C | ....... ahsnfdas
0x637132719 | 00 00 00 00 00 00 00 00 45 21 65 78 32 F5 12 6C | ....... ahsnfdas
0x637132735 | 00 00 00 00 00 00 00 00 45 21 65 78 32 F5 12 6C | ....... ahsnfdas
Do you know any API/framework/tool for the work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要 Marshal.CopyMemory() 和此代码。 P/调用 VirtualQueryEx() 以确保内存地址有效是避免异常的好主意。
You'll need Marshal.CopyMemory() and this code. P/Invoking VirtualQueryEx() to ensure the memory addresses are valid would be a good idea to avoid exceptions.
当然可以使用 WinDbg 来完成。老实说,我不是使用它的向导,但来自 Microsoft 的 Tess Ferrandez 是,并且有一个 优秀 博客关于使用 WinDbg 调试 .NET 应用程序。
看来您只想浏览普通的内存转储,这应该非常简单。如果您想进一步检查任何内容(关于 .net),您应该使用 WinDbg 的 SOS 扩展。
It can certainly be done using WinDbg. Honestly, I'm not a wizard using it but Tess Ferrandez from Microsoft is and has an excellent blog about using WinDbg to debug .NET applications.
It seems you just want to browse a normal memory dump, that should be pretty straightforward. If you want to examine anything further (with regards to .net) you should use the SOS extensions for WinDbg.