1

我正在查看 Visual Studio 2019 中的 *.dmp 文件 - 它显示了加载系统 DLL、文件名、版本、文件夹等的列表。

我想复制此信息以粘贴到 Excel 中,但我无法从 Visual Studio 中复制它。

任何人都知道我是否可以将其从转储文件导出到文本文件?

4

2 回答 2

2

WinDbg 已经包含在另一个答案中,所以我将参考下面的 Visual Studio。

第一步是将 DMP 文件加载到 VS 中。

在此处输入图像描述

此初始屏幕还显示已加载模块的列表,但不允许从中复制。相反,单击右侧的仅使用本机调试(或调试托管或混合模式应用程序时可用的其他选项之一),然后等待符号加载。

然后使用菜单打开 Debug / Windows / Modules 窗口。

在此处输入图像描述

这是一个常规列表,您可以在其中选择行(包括所有行)并 Ctrl-C 将它们复制为文本。

或者,从菜单中打开查看/其他窗口/命令窗口,然后输入debug.listModules命令。

在此处输入图像描述

这是一个常规文本框,同样,您可以根据需要选择并按 Ctrl-C 复制。

于 2020-05-07T15:18:36.557 回答
1

您是在谈论像下面粘贴这样的数据吗?

00120000 00148000   cdb        (deferred)             
    Image path: cdb.exe
    Image name: cdb.exe
    Image was built with /Brepro flag.
    Timestamp:        0324D46E (This is a reproducible build file hash, not a timestamp)
    CheckSum:         00025C20
    ImageSize:        00028000
    File version:     10.0.18362.1
    Product version:  10.0.18362.1
    File flags:       0 (Mask 3F)
    File OS:          40004 NT Win32
    File type:        1.0 App
    File date:        00000000.00000000
    Translations:     0409.04b0
    Information from resource tables:
        CompanyName:      Microsoft Corporation
        ProductName:      Microsoft® Windows® Operating System
        InternalName:     CDB.Exe
        OriginalFilename: CDB.Exe
        ProductVersion:   10.0.18362.1
        FileVersion:      10.0.18362.1 (WinBuild.160101.0800)
        FileDescription:  Symbolic Debugger for Windows
        LegalCopyright:   © Microsoft Corporation. All rights reserved.

这是由 windbg 中的 lmv 命令生成的(我不知道它在 vs 中是什么等价物

既然你标记了windbg,我会给你一个简短的演示,将这些信息收集到一个文本文件中

D:\>cdb -logo cdbmods.txt -c "lmv;q" -z cdb.dmp

可以复制粘贴、转置等的输出

D:\>dir /b *cdb*
cdb.dmp
cdbmods.txt

D:\>wc -l cdbmods.txt
894 cdbmods.txt


D:\>sed -n 44,48p cdbmods.txt
00360000 00388000   cdb        (deferred)
    Image path: cdb.exe
    Image name: cdb.exe
    Image was built with /Brepro flag.
    Timestamp:        0324D46E (This is a reproducible build file hash, not a timestamp)

D:\>
于 2020-05-07T14:30:18.530 回答