更新 : 2007 年 11 月
デバッガのコールバックを処理するメソッドを提供します。
interface ICorDebugManagedCallback : IUnknown {
HRESULT _stdcall Break(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugThread* thread);
HRESULT _stdcall Breakpoint(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugThread* pThread,
[in] ICorDebugBreakpoint* pBreakpoint);
HRESULT _stdcall BreakpointSetError(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugThread* pThread,
[in] ICorDebugBreakpoint* pBreakpoint,
[in] unsigned long dwError);
HRESULT _stdcall ControlCTrap([in] ICorDebugProcess* pProcess);
HRESULT _stdcall CreateAppDomain(
[in] ICorDebugProcess* pProcess,
[in] ICorDebugAppDomain* pAppDomain);
HRESULT _stdcall CreateProcess([in] ICorDebugProcess* pProcess);
HRESULT _stdcall CreateThread(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugThread* thread);
HRESULT _stdcall DebuggerError(
[in] ICorDebugProcess* pProcess,
[in] HRESULT errorHR,
[in] unsigned long errorCode);
HRESULT _stdcall EditAndContinueRemap(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugThread* pThread,
[in] ICorDebugFunction* pFunction,
[in] long fAccurate);
HRESULT _stdcall EvalComplete(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugThread* pThread,
[in] ICorDebugEval* pEval);
HRESULT _stdcall EvalException(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugThread* pThread,
[in] ICorDebugEval* pEval);
HRESULT _stdcall Exception(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugThread* pThread,
[in] long unhandled);
HRESULT _stdcall ExitAppDomain(
[in] ICorDebugProcess* pProcess,
[in] ICorDebugAppDomain* pAppDomain);
HRESULT _stdcall ExitProcess([in] ICorDebugProcess* pProcess);
HRESULT _stdcall ExitThread(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugThread* thread);
HRESULT _stdcall LoadAssembly(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugAssembly* pAssembly);
HRESULT _stdcall LoadClass(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugClass* c);
HRESULT _stdcall LoadModule(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugModule* pModule);
HRESULT _stdcall LogMessage(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugThread* pThread,
[in] long lLevel,
[in] unsigned short* pLogSwitchName,
[in] unsigned short* pMessage);
HRESULT _stdcall LogSwitch(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugThread* pThread,
[in] long lLevel,
[in] unsigned long ulReason,
[in] unsigned short* pLogSwitchName,
[in] unsigned short* pParentName);
HRESULT _stdcall NameChange(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugThread* pThread);
HRESULT _stdcall StepComplete(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugThread* pThread,
[in] ICorDebugStepper* pStepper,
[in] CorDebugStepReason reason);
HRESULT _stdcall UnloadAssembly(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugAssembly* pAssembly);
HRESULT _stdcall UnloadClass(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugClass* c);
HRESULT _stdcall UnloadModule(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugModule* pModule);
HRESULT _stdcall UpdateModuleSymbols(
[in] ICorDebugAppDomain* pAppDomain,
[in] ICorDebugModule* pModule,
[in] IStream* pSymbolStream);
};
メソッド
メソッド |
説明 |
---|---|
コード ストリーム内で Break 命令が実行されたときにデバッガに通知します。 |
|
ブレークポイントが検出されたときにデバッガに通知します。 |
|
関数が Just-In-Time (JIT) コンパイルされる前に設定されたブレークポイントを、共通言語ランタイム (CLR: Common Language Runtime) が正確にバインドできなかったことをデバッガに通知します。 |
|
デバッグ中のプロセスで Ctrl + C キーがトラップされたことをデバッガに通知します。 |
|
アプリケーション ドメインが作成されたことをデバッガに通知します。 |
|
プロセスが初めてアタッチまたは開始されたときに、デバッガに通知します。 |
|
スレッドがマネージ コードの実行を開始していることをデバッガに通知します。 |
|
CLR のイベントを処理しようとしてエラーが発生したことを、デバッガに通知します。 |
|
この使用は推奨されません。再マップ イベントが統合開発環境 (IDE: Integrated Development Environment) に送信したことをデバッガに通知します。 |
|
評価が完了していることをデバッガに通知します。 |
|
評価が処理されない例外で終了したことをデバッガに通知します。 |
|
マネージ コードから例外がスローされたことをデバッガに通知します。 |
|
アプリケーション ドメインが終了していることをデバッガに通知します。 |
|
プロセスが終了していることをデバッガに通知します。 |
|
マネージ コードを実行したスレッドが終了していることをデバッガに通知します。 |
|
CLR アセンブリが正常に読み込まれたことをデバッガに通知します。 |
|
クラスが読み込まれていることをデバッガに通知します。 |
|
CLR モジュールが正常に読み込まれたことをデバッガに通知します。 |
|
CLR のマネージ スレッドが EventLog クラスのメソッドを呼び出してイベントを記録したことをデバッガに通知します。 |
|
CLR のマネージ スレッドが、Switch クラスのメソッドを呼び出して、デバッグ/トレース スイッチを作成、変更、または削除したことをデバッガに通知します。 |
|
アプリケーション ドメインまたはスレッドの名前が変化したことをデバッガに通知します。 |
|
ステップが完了していることをデバッガに通知します。 |
|
CLR アセンブリがアンロードされたことをデバッガに通知します。 |
|
クラスがアンロードされていることをデバッガに通知します。 |
|
CLR モジュール (DLL) がアンロードされたことをデバッガに通知します。 |
|
CLR モジュールのシンボルが変更されたことをデバッガに通知します。 |
解説
すべてのコールバックがシリアル化され、同じスレッド内で、同期された状態のプロセスと共に呼び出されます。
コールバックの各実装が、ICorDebugController::Continue を呼び出して実行を再開する必要があります。コールバックが返される前に ICorDebugController::Continue を呼び出さないと、プロセスが停止したままになり、ICorDebugController::Continue を呼び出すまで他のイベント コールバックは発生しません。
.NET Framework Version 2.0 アプリケーションをデバッグする場合は、デバッガに ICorDebugManagedCallback2 を実装する必要があります。ICorDebugManagedCallback または ICorDebugManagedCallback2 のインスタンスは、コールバック オブジェクトとして ICorDebug::SetManagedHandler に渡されます。
必要条件
プラットフォーム : 「.NET Framework システム要件」を参照
ヘッダー : CorDebug.idl
ライブラリ : CorGuids.lib
.NET Framework のバージョン : 3.5 SP1、3.5、3.0 SP1、3.0、2.0 SP1、2.0、1.1、1.0