ICorDebugModule

更新:2007 年 11 月

表示一个公共语言运行库 (CLR) 模块,它可以是一个可执行文件,也可以是一个动态链接库 (DLL)。

interface ICorDebugModule : IUnknown {
    HRESULT _stdcall GetProcess([out] ICorDebugProcess** ppProcess);
    HRESULT _stdcall GetBaseAddress([out] uint64* pAddress);
    HRESULT _stdcall GetAssembly([out] ICorDebugAssembly** ppAssembly);
    HRESULT _stdcall GetName(
                    [in] unsigned int cchName, 
                    [out] unsigned int* pcchName, 
                    [out] ICorDebugModule szName);
    HRESULT _stdcall EnableJITDebugging(
                    [in] long bTrackJITInfo, 
                    [in] long bAllowJitOpts);
    HRESULT _stdcall EnableClassLoadCallbacks([in] long bClassLoadCallbacks);
    HRESULT _stdcall GetFunctionFromToken(
                    [in] unsigned int methodDef, 
                    [out] ICorDebugFunction** ppFunction);
    HRESULT _stdcall GetFunctionFromRVA(
                    [in] uint64 rva, 
                    [out] ICorDebugFunction** ppFunction);
    HRESULT _stdcall GetClassFromToken(
                    [in] unsigned int typeDef, 
                    [out] ICorDebugClass** ppClass);
    HRESULT _stdcall CreateBreakpoint([out] ICorDebugModuleBreakpoint** ppBreakpoint);
    HRESULT _stdcall GetEditAndContinueSnapshot([out] ICorDebugEditAndContinueSnapshot** ppEditAndContinueSnapshot);
    HRESULT _stdcall GetMetaDataInterface(
                    [in] GUID* riid, 
                    [out] IUnknown** ppObj);
    HRESULT _stdcall GetToken([out] unsigned int* pToken);
    HRESULT _stdcall IsDynamic([out] long* pDynamic);
    HRESULT _stdcall GetGlobalVariableValue(
                    [in] unsigned int fieldDef, 
                    [out] ICorDebugValue** ppValue);
    HRESULT _stdcall GetSize([out] unsigned int* pcBytes);
    HRESULT _stdcall IsInMemory([out] long* pInMemory);
};

方法

方法

说明

ICorDebugModule::CreateBreakpoint 方法

未实现。

ICorDebugModule::EnableClassLoadCallbacks 方法

确定是否为此模块调用 ICorDebugManagedCallback::LoadClassICorDebugManagedCallback::UnloadClass 回调。

ICorDebugModule::EnableJITDebugging 方法

确定实时 (JIT) 编译器是否为此模块中的方法保留调试信息。

ICorDebugModule::GetAssembly 方法

获取包含此模块的程序集。

ICorDebugModule::GetBaseAddress 方法

获取该模块的基址。

ICorDebugModule::GetClassFromToken 方法

从元数据中获取 ICorDebugClass

ICorDebugModule::GetEditAndContinueSnapshot 方法

已否决。

ICorDebugModule::GetFunctionFromRVA 方法

未实现。

ICorDebugModule::GetFunctionFromToken 方法

获取由元数据标记指定的函数。

ICorDebugModule::GetGlobalVariableValue 方法

获取指定全局变量的值对象。

ICorDebugModule::GetMetaDataInterface 方法

获取可用于检查模块的元数据的元数据接口指针。

ICorDebugModule::GetName 方法

获取模块的文件名称。

ICorDebugModule::GetProcess 方法

获取此模块的包含进程。

ICorDebugModule::GetSize 方法

获取模块的大小(以字节为单位)。

ICorDebugModule::GetToken 方法

获取此模块所对应的表项的标记。

ICorDebugModule::IsDynamic 方法

指示模块是否为动态模块。

ICorDebugModule::IsInMemory 方法

指示此模块是否仅存在于内存中。

要求

**平台:**请参见 .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

ICorDebugModule2

其他资源

调试接口