Beispiel #1
0
        } // end GetTypeNames()

        /// <summary>
        ///    Creates or gets a pointer type, pointing to the current type.
        /// </summary>
        /// <remarks>
        ///    This creates a synthetic pointer type (or retrieves a previously created
        ///    one) because it doesn't work well to query for a pointer type (the '*' is
        ///    interpreted as a wildcard, and the results do not include the desired
        ///    pointer types).
        /// </remarks>
        public DbgPointerTypeInfo GetPointerType()
        {
            _EnsureValid();
            uint pointerTypeId = DbgHelp.TryGetSynthPointerTypeIdByPointeeTypeId(Debugger.DebuggerInterface,
                                                                                 Module.BaseAddress,
                                                                                 TypeId);

            if (0 == pointerTypeId)
            {
                pointerTypeId = DbgHelp.AddSyntheticPointerTypeInfo(Debugger.DebuggerInterface,
                                                                    Module.BaseAddress,
                                                                    TypeId,
                                                                    Debugger.PointerSize,
                                                                    0);   // no predetermined typeId
            }
            var ptrType = new DbgPointerTypeInfo(Debugger,
                                                 Module,
                                                 pointerTypeId,
                                                 TypeId,
                                                 Debugger.PointerSize,
                                                 false);

            return(ptrType);
        }