コード例 #1
0
        public IL2NativeMap[] GetILToNativeMapping()
        {
            UInt32 pcMap;

            m_code.GetILToNativeMapping(0, out pcMap, null);
            if (pcMap == 0)
            {
                return(new IL2NativeMap[0]);
            }

            var map = new COR_DEBUG_IL_TO_NATIVE_MAP[pcMap];

            m_code.GetILToNativeMapping((uint)map.Length, out pcMap, map);

            var ret = new IL2NativeMap[map.Length];

            for (int i = 0; i < map.Length; i++)
            {
                ret[i] = new IL2NativeMap((int)map[i].ilOffset,
                                          (int)map[i].nativeStartOffset,
                                          (int)map[i].nativeEndOffset
                                          );
            }
            return(ret);
        }
コード例 #2
0
        public IEnumerable <ILToNativeMap> GetILToNativeMapping()
        {
            const uint bufferSize = 100;
            var        buffer     = new ILToNativeMap[bufferSize];
            uint       actualLength;

            _comCode.GetILToNativeMapping(bufferSize, out actualLength, buffer);
            return(buffer.Take((int)actualLength));
        }