Share via


ICorDebugCode Interface

Represents a segment of either Microsoft intermediate language (MSIL) code or native code.

interface ICorDebugCode : IUnknown {
    HRESULT CreateBreakpoint (
        [in] ULONG32     offset,
        [out] ICorDebugFunctionBreakpoint **ppBreakpoint
    );
        
    HRESULT GetAddress (
        [out] CORDB_ADDRESS *pStart
    );
        
    HRESULT GetCode (
        [in] ULONG32     startOffset, 
        [in] ULONG32     endOffset,
        [in] ULONG32     cBufferAlloc,
        [out, size_is(cBufferAlloc),
            length_is(*pcBufferSize)] BYTE buffer[],
        [out] ULONG32    *pcBufferSize
    );
        
    //
      // GetEnCRemapSequencePoints is not implemented.
    //
    HRESULT GetEnCRemapSequencePoints (
        [in] ULONG32     cMap,
        [out] ULONG32    *pcMap,
        [out, size_is(cMap), length_is(*pcMap)]
            ULONG32      offsets[]
    );
        
    HRESULT GetFunction (
        [out] ICorDebugFunction **ppFunction
    );
        
    HRESULT GetILToNativeMapping (
        [in] ULONG32     cMap,
        [out] ULONG32    *pcMap,
        [out, size_is(cMap), length_is(*pcMap)]
            COR_DEBUG_IL_TO_NATIVE_MAP map[]
    );
        
    HRESULT GetSize (
        [out] ULONG32    *pcBytes
    );
        
    HRESULT GetVersionNumber (
        [out] ULONG32    *nVersion
    );
        
    HRESULT IsIL (
        [out] BOOL       *pbIL
    );
};

Methods

Method Description

ICorDebugCode::CreateBreakpoint Method

Creates a breakpoint at the specified offset.

ICorDebugCode::GetAddress Method

Gets the relative virtual address (RVA) of the code segment that this ICorDebugCode represents.

ICorDebugCode::GetCode Method

Gets all the code for the specified function, formatted for disassembly. This method has been deprecated in the .NET Framework version 2.0. Use ICorDebugCode2::GetCodeChunks Method instead.

ICorDebugCode::GetEnCRemapSequencePoints Method

Not implemented.

ICorDebugCode::GetFunction Method

Gets the ICorDebugFunction Interface associated with this ICorDebugCode.

ICorDebugCode::GetILToNativeMapping Method

Gets an array of COR_DEBUG_IL_TO_NATIVE_MAP Structure instances that represent mappings from MSIL offsets to native offsets.

ICorDebugCode::GetSize Method

Gets the size, in bytes, of the binary code represented by this ICorDebugCode.

ICorDebugCode::GetVersionNumber Method

Gets the one-based number that identifies the version of the code that this ICorDebugCode represents.

ICorDebugCode::IsIL Method

Gets a value that indicates whether this ICorDebugCode is compiled in MSIL.

Remarks

There is a one-to-one relationship between an ICorDebugCode object and an ICorDebugFunction Interface object. In other words, there is one instance of ICorDebugCode for each instance of ICorDebugFunction Interface.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: CorDebug.idl

Library: CorGuids.lib

.NET Framework Version: 2.0, 1.1, 1.0

See Also

Reference

ICorDebugCode2 Interface

Other Resources

Debugging Interfaces