Пример #1
0
        } // end GetSymbolFields

        private int _My_SYM_DUMP_FIELD_CALLBACK(FIELD_INFO pField, IntPtr userContext)
        {
            GCHandle         gchFields = GCHandle.FromIntPtr(userContext);
            List <FieldInfo> fields    = (List <FieldInfo>)gchFields.Target;

            fields.Add(new FieldInfo(fields.Count, pField));
            return(0);
        } // end _My_SYM_DUMP_FIELD_CALLBACK()
Пример #2
0
        }                                                         // gets set post-construction

        internal FieldInfo(int index, FIELD_INFO nativeFi)
        {
            Index     = index;
            Name      = nativeFi.fName;
            PrintName = nativeFi.printName;
            Size      = nativeFi.size;
            //fOptions = nativeFi.fOptions;
            //Address = nativeFi.address;
            TypeId = nativeFi.TypeId;
            // The nativeFi.FieldOffset field is 0. What is it for? I don't know. Perhaps
            // there is a different usage of the FIELD_INFO struct.
            // According to comments in wdbgexts.h, if we had supplied an address in the
            // SYM_DUMP_PARAM structure, then address would have the address of the field,
            // (address in SYM_DUMP_PARAM plus field offset), but we pass 0, so address is
            // just the field offset.
            FieldOffset = (uint)nativeFi.address;
            PointerFlag = (PointerFlag)(nativeFi.Flags & 0x0003);
            IsArray     = 0 != (nativeFi.Flags & 0x0004);
            IsStruct    = 0 != (nativeFi.Flags & 0x0008);
            IsConstant  = 0 != (nativeFi.Flags & 0x0010);
            IsStatic    = 0 != (nativeFi.Flags & 0x0020);
        } // end constructor