次の方法で共有


ICorDebugManagedCallback

更新 : 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);
};

メソッド

メソッド

説明

ICorDebugManagedCallback::Break メソッド

コード ストリーム内で Break 命令が実行されたときにデバッガに通知します。

ICorDebugManagedCallback::Breakpoint メソッド

ブレークポイントが検出されたときにデバッガに通知します。

ICorDebugManagedCallback::BreakpointSetError メソッド

関数が Just-In-Time (JIT) コンパイルされる前に設定されたブレークポイントを、共通言語ランタイム (CLR: Common Language Runtime) が正確にバインドできなかったことをデバッガに通知します。

ICorDebugManagedCallback::ControlCTrap メソッド

デバッグ中のプロセスで Ctrl + C キーがトラップされたことをデバッガに通知します。

ICorDebugManagedCallback::CreateAppDomain メソッド

アプリケーション ドメインが作成されたことをデバッガに通知します。

ICorDebugManagedCallback::CreateProcess メソッド

プロセスが初めてアタッチまたは開始されたときに、デバッガに通知します。

ICorDebugManagedCallback::CreateThread メソッド

スレッドがマネージ コードの実行を開始していることをデバッガに通知します。

ICorDebugManagedCallback::DebuggerError メソッド

CLR のイベントを処理しようとしてエラーが発生したことを、デバッガに通知します。

ICorDebugManagedCallback::EditAndContinueRemap メソッド

この使用は推奨されません。再マップ イベントが統合開発環境 (IDE: Integrated Development Environment) に送信したことをデバッガに通知します。

ICorDebugManagedCallback::EvalComplete メソッド

評価が完了していることをデバッガに通知します。

ICorDebugManagedCallback::EvalException メソッド

評価が処理されない例外で終了したことをデバッガに通知します。

ICorDebugManagedCallback::Exception メソッド

マネージ コードから例外がスローされたことをデバッガに通知します。

ICorDebugManagedCallback::ExitAppDomain メソッド

アプリケーション ドメインが終了していることをデバッガに通知します。

ICorDebugManagedCallback::ExitProcess メソッド

プロセスが終了していることをデバッガに通知します。

ICorDebugManagedCallback::ExitThread メソッド

マネージ コードを実行したスレッドが終了していることをデバッガに通知します。

ICorDebugManagedCallback::LoadAssembly メソッド

CLR アセンブリが正常に読み込まれたことをデバッガに通知します。

ICorDebugManagedCallback::LoadClass メソッド

クラスが読み込まれていることをデバッガに通知します。

ICorDebugManagedCallback::LoadModule メソッド

CLR モジュールが正常に読み込まれたことをデバッガに通知します。

ICorDebugManagedCallback::LogMessage メソッド

CLR のマネージ スレッドが EventLog クラスのメソッドを呼び出してイベントを記録したことをデバッガに通知します。

ICorDebugManagedCallback::LogSwitch メソッド

CLR のマネージ スレッドが、Switch クラスのメソッドを呼び出して、デバッグ/トレース スイッチを作成、変更、または削除したことをデバッガに通知します。

ICorDebugManagedCallback::NameChange メソッド

アプリケーション ドメインまたはスレッドの名前が変化したことをデバッガに通知します。

ICorDebugManagedCallback::StepComplete メソッド

ステップが完了していることをデバッガに通知します。

ICorDebugManagedCallback::UnloadAssembly メソッド

CLR アセンブリがアンロードされたことをデバッガに通知します。

ICorDebugManagedCallback::UnloadClass メソッド

クラスがアンロードされていることをデバッガに通知します。

ICorDebugManagedCallback::UnloadModule メソッド

CLR モジュール (DLL) がアンロードされたことをデバッガに通知します。

ICorDebugManagedCallback::UpdateModuleSymbols メソッド

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

参照

参照

ICorDebug

ICorDebugManagedCallback2

その他の技術情報

デバッグのインターフェイス