dbx コマンドによるデバッグ

whatis name

関数テンプレートおよびクラステンプレートと、インスタンス化された関数やクラスの定義を出力するために使用します。

クラステンプレートの場合は、次のように入力します。


(dbx) whatis Array
template<class T> class Array ;
完全なテンプレート宣言を得るために次を実行してください:
															 'whatis -t Array<int>';

関数テンプレートの場合は、次のように入力します。


(dbx) whatis square
template<class C> void square(C num, C *result);

クラステンプレートのインスタンス化の場合は、次のように入力します。


(dbx) whatis -t Array<int>
class Array<int> {
public:
   int Array<int>::getlength();
   int &Array<int>::operator[](int i);
   Array<int>::Array<int>(int l);
   Array<int>::‾Array<int>();
private:
   int length;
   int *array;
};