【问题标题】:How to figure out method name by assembly and methoddef?如何通过程序集和methoddef找出方法名称?
【发布时间】:2012-02-27 13:36:49
【问题描述】:

在装有 Windows XP 的机器上开发并正常运行的应用程序在装有 Windows Server 2008 的目标机器上存在严重问题。即,它无法正常启动,并提供以下信息:

Description:

  Stopped working


Problem signature:

  Problem Event Name:   CLR20r3

  Problem Signature 01: neolant.asrm.rcpfreshner.service

  Problem Signature 02: 1.0.7.0

  Problem Signature 03: 4f4b66d2

  Problem Signature 04: mscorlib

  Problem Signature 05: 2.0.0.0

  Problem Signature 06: 4bf4c743

  Problem Signature 07: e47

  Problem Signature 08: 20e

  Problem Signature 09: Exception

  OS Version:   6.0.6002.2.2.0.272.7

  Locale ID:    1049

我想从中提取所有可能的信息,这意味着我需要知道 mscorlib 中的哪个方法具有 e47 的 methoddef。

我如何检索这些信息?

【问题讨论】:

    标签: .net windows-server-2008


    【解决方案1】:

    您可以使用ildasm(Microsoft 中间语言反汇编程序)。在 ildasm 中打开程序集,然后从主菜单中选择 View -> MetaInfo -> Show!。您将看到带有 *Def/*Ref 标识符的程序集元数据。

    【讨论】:

    • 谢谢!这帮助很大。
    • 感谢您指出的工具,我找到了错误详细信息所描述的代码。结果它清除了堆栈并重新抛出 System.Runtype.CreateInsanceImpl 中某处捕获的异常(一个有 5 个参数)。现在以某种方式 gt 持有该异常并从其堆栈中找出应归咎于什么......
    【解决方案2】:

    Navreen 在此处对如何解码“Watson Bucket”转储进行了很好的描述。

    http://naveensrinivasan.github.io/2010/11/17/decoding-clr20r3-.net-exception---using-mono-cecil/

    他还有一个脚本,该脚本使用 Mono Cecil 自动将 Watson Bucket 解码为问题发生位置的 IL 转储。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-03-06
      • 1970-01-01
      • 2018-10-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多