c# - WinDbg !dumpmodule 看不到所有类
问题描述
添加到 simpleWpfApplication
默认情况下,它有一个命名空间和两个类。
namespace WpfApp
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
public void Foo1()
{
}
}
}
namespace WpfApp
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public void Foo()
{
}
public MainWindow()
{
InitializeComponent();
}
}
}
执行命令后
0:000> !name2ee WpfApp a
Module: 0265402c
Assembly: WpfApp.exe
0:000> !dumpmodule -mt 0265402c
...
MetaData start address: 00072194 (3528 bytes)
Types defined in this module
MT TypeDef Name
------------------------------------------------------------------------------
026591d4 0x02000002 WpfApp.App
Types referenced in this module
MT TypeRef Name
------------------------------------------------------------------------------
705ef1c8 0x02000001 System.Runtime.CompilerServices.CompilationRelaxationsAttribute
705efba0 0x02000002 System.Runtime.CompilerServices.RuntimeCompatibilityAttribute
705ef268 0x02000003 System.Diagnostics.DebuggableAttribute
705ef6a0 0x02000005 System.Reflection.AssemblyTitleAttribute
705ef720 0x02000006 System.Reflection.AssemblyDescriptionAttribute
705ef6e0 0x02000007 System.Reflection.AssemblyConfigurationAttribute
705ef15c 0x02000008 System.Reflection.AssemblyCompanyAttribute
705ef11c 0x02000009 System.Reflection.AssemblyProductAttribute
705ef854 0x0200000a System.Reflection.AssemblyCopyrightAttribute
705ef894 0x0200000b System.Reflection.AssemblyTrademarkAttribute
705ef4c4 0x0200000c System.Runtime.InteropServices.ComVisibleAttribute
5890eb9c 0x0200000e System.Windows.ThemeInfoAttribute
705ef8d4 0x0200000f System.Reflection.AssemblyFileVersionAttribute
70640cbc 0x02000010 System.Runtime.Versioning.TargetFrameworkAttribute
5890ec5c 0x02000011 System.Windows.Application
似乎0:000> !dumpmodule -mt 0265402c
只显示了一个类WpfApp.App
。但是为什么不显示WpfApp.MainWindow
呢?
Windbg 预览
Attributes: PEFile SupportsUpdateableMethods
Assembly: 026f0e78
LoaderHeap: 00000000
TypeDefToMethodTableMap: 02bd0038
TypeRefToMethodTableMap: 02bd0050
MethodDefToDescMap: 02bd00e0
FieldDefToDescMap: 02bd0120
MemberRefToDescMap: 00000000
FileReferencesMap: 02bd0138
AssemblyReferencesMap: 02bd013c
MetaData start address: 001d2194 (3524 bytes)
Types defined in this module
MT TypeDef Name
------------------------------------------------------------------------------
02bd91d4 0x02000002 WpfApp.App
Types referenced in this module
MT TypeRef Name
------------------------------------------------------------------------------
705ef1c8 0x02000001 System.Runtime.CompilerServices.CompilationRelaxationsAttribute
705efba0 0x02000002 System.Runtime.CompilerServices.RuntimeCompatibilityAttribute
705ef268 0x02000003 System.Diagnostics.DebuggableAttribute
705ef6a0 0x02000005 System.Reflection.AssemblyTitleAttribute
705ef720 0x02000006 System.Reflection.AssemblyDescriptionAttribute
705ef6e0 0x02000007 System.Reflection.AssemblyConfigurationAttribute
705ef15c 0x02000008 System.Reflection.AssemblyCompanyAttribute
705ef11c 0x02000009 System.Reflection.AssemblyProductAttribute
705ef854 0x0200000a System.Reflection.AssemblyCopyrightAttribute
705ef894 0x0200000b System.Reflection.AssemblyTrademarkAttribute
705ef4c4 0x0200000c System.Runtime.InteropServices.ComVisibleAttribute
54eceb9c 0x0200000e System.Windows.ThemeInfoAttribute
705ef8d4 0x0200000f System.Reflection.AssemblyFileVersionAttribute
70640cbc 0x02000010 System.Runtime.Versioning.TargetFrameworkAttribute
54ecec5c 0x02000011 System.Windows.Application
解决方案
推荐阅读
- laravel - 如何在多维数组中求和?
- email - VB6 使用 Gmail 作为远程 SMTP 服务器发送电子邮件
- file - 如何将大量文件上传到谷歌存储桶?
- react-native - 在终端中编写命令时何时使用 expo、npm 和 yarn?
- reactjs - Material-ui 搜索图标需要在输入框的右侧
- python - 检查 yaml 文件中 xPaths 的差异
- javascript - 如何将日期/时间显示从 24 小时转换为 12 小时 AM/PM
- c++ - 共享内存中的健壮互斥体不是那么健壮
- r - 从集群中提取组
- java - 更改 Spring Boot 和 Maven 项目的默认目录结构