开发者

Tracking disassembly of a c# program

I am trying to understand disassembly of a c# program using objdump, since I am using vsiaul c# 2008 express edition which does not display disassembly.

I am running the following command to get the output:

objdump -S ConsoleApplication4.exe 

since I am not able to identify my function codein the disassembly output, I put in a dummy variable with a value of 0x1234.

 public static void myfun()
    {
        int i;
        i = 0x1234;
        Console.WriteLine(i.ToString());
    }

However, I am not able to find the value of 1234 anywhere in the generated file! i tried othe开发者_开发技巧r options like -t or -T for objdump, but it says no symbol table found. Can someone please tell how to use objdump to view the disassembly of a function, or if there some other free tool?

EDIT : I am aware of MSIL disassmbler, I wanted to know the assembly language equivalent please..


Unless you have NGEN'd your application, it doesn't make sense to disassemble into assembly language since the MSIL isn't compiled into x86 code until it is jitted at runtime.


If this has to do with C# and not C++, use MSIL Disassembler. Also, if you have .Net Reflector, FileDisassembler is a great tool for this as well.

Below are the links to MSIL Disassembler's complete example step-by-step and its msdn article.

http://www.mactech.com/articles/mactech/Vol.19/19.12/NETbinaries/index.html

http://msdn.microsoft.com/en-us/library/f7dy01k1%28v=vs.71%29.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜