2008-11-20 100 views
18

當讀取一個堆棧跟蹤,如:堆棧跟蹤中方法名稱末尾的「+ n」值是什麼意思?

[FormatException: Input string was not in a correct format.] 
    System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2755599 
    System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +112 
    System.Convert.ToInt32(String value) +68 

什麼做的+68,+112等數字的意思。我猜他們是對某事的抵消。如果是這樣,什麼?

回答

2

這意味着:

它的偏移該方法的原生指令。

閱讀this瞭解更多詳情。

15

我相信他們的偏移到方法的代碼 - 無論是IL或JIT編譯組裝字節,我不知道......

(基本上他們正在採取行號的地方,這當然是沒有pdbs的情況下可用的。)

+1

它們是從函數開始到返回地址的字節偏移量。 – plinth 2008-11-20 13:18:27

+0

但是在IL還是機器代碼? – 2008-11-20 13:30:03

2

它是本地代碼的字節偏移量。

隨着ILDASM你知道爲什麼。

相關問題