0

Windbg で SOS 拡張コマンド !BPMD のヘルプを求める (つまり、 と入力する!help BPMD) と、特に、一般的に型指定されたメソッドに侵入する方法に関する説明を含むテキストが表示されます。これは次のようになります。

!BPMD works equally well with generic types. Adding a breakpoint on a generic 
type sets breakpoints on all already JIT-ted generic methods and sets a pending 
breakpoint for any instantiation that will be JIT-ted in the future.

Example for generics:
Given the following two classes:

class G3<T1, T2, T3> 
{
    ...
    public void F(T1 p1, T2 p2, T3 p3)
    { ... }
}

public class G1<T> {
    // static method
    static public void G<W>(W w)
    { ... }
}

One would issue the following commands to set breapoints on G3.F() and 
G1.G():

!bpmd myapp.exe G3`3.F
!bpmd myapp.exe G1`1.G

ここで理解できないのは、最後の 2 行で使用されている構文です。アポストロフィ (`) は何を意味し、関連する整数 (アポストロフィの右側にあるもの) の意味は何ですか? これらのコードはメソッドの型 (public void および static public void) に関連していますか、それともテンプレート引数の数を参照していますか? 最初の推測が正しい場合、考えられる型のリストはどこにありますか?

4

1 に答える 1

2

バックティック記号は、IL でジェネリック型を指定するための構文です。バッククォートの後の数字は、ジェネリック パラメーターの数です。

于 2013-05-27T17:35:32.913 に答える