Exemplo n.º 1
0
 private DbgSimpleSymbol(DbgEngDebugger debugger,
                         string name,
                         DbgNamedTypeInfo type)
     : base(debugger, name, _GetTargetFromType(type))
 {
     m_type = type;
 } // end constructor
Exemplo n.º 2
0
        } // end constructor

        internal DbgSimpleSymbol(DbgEngDebugger debugger,
                                 string name,
                                 DbgNamedTypeInfo type,
                                 ulong address)
            : this(debugger, name, type)
        {
            m_address = address;
        } // end constructor
Exemplo n.º 3
0
        private static DbgTarget _GetTargetFromType(DbgNamedTypeInfo type)
        {
            if (null == type)
            {
                throw new ArgumentNullException("type");
            }

            return(type.Target);
        }
Exemplo n.º 4
0
 internal DbgSimpleSymbol(DbgEngDebugger debugger,
                          string name,
                          DbgNamedTypeInfo type,
                          DbgRegisterInfoBase register,
                          DbgSymbol parent)
     : this(debugger, name, type, register)
 {
     Parent = parent;
 } // end constructor
Exemplo n.º 5
0
        } // end constructor

        internal DbgSimpleSymbol(DbgEngDebugger debugger,
                                 string name,
                                 DbgNamedTypeInfo type,
                                 ulong address,
                                 DbgSymbol parent)
            : this(debugger, name, type, address)
        {
            Parent = parent;
        }
        } // end constructor

        internal DbgSimpleSymbol(DbgEngDebugger debugger,
                                 string name,
                                 DbgNamedTypeInfo type,
                                 object constantValue,
                                 DbgSymbol parent)
            : this(debugger, name, type, constantValue)
        {
            Parent = parent;
        } // end constructor
Exemplo n.º 7
0
        } // _SetContext()

        public SymbolIdentity(string name,
                              ulong moduleBase,
                              ulong offset,
                              DbgNamedTypeInfo type,
                              DbgEngContext processContext)
        {
            Name       = name;
            ModuleBase = moduleBase;
            Offset     = offset;
            Type       = type;
            _SetContext(processContext);
        } // end constructor
Exemplo n.º 8
0
        } // end constructor

        internal DbgSimpleSymbol(DbgEngDebugger debugger,
                                 string name,
                                 DbgNamedTypeInfo type,
                                 DbgRegisterInfoBase register)
            : this(debugger, name, type)
        {
            if (null == register)
            {
                throw new ArgumentNullException("register");
            }

            m_register = register;
        } // end constructor
        } // end constructor

        internal DbgSimpleSymbol(DbgEngDebugger debugger,
                                 string name,
                                 DbgNamedTypeInfo type,
                                 object constantValue)
            : this(debugger, name, type)
        {
            if (null == constantValue)
            {
                throw new ArgumentNullException(nameof(constantValue));
            }

            m_constantValue = constantValue;
        } // end constructor
Exemplo n.º 10
0
        protected override ColorString GetColorName()
        {
            ColorString      csDimensions = new ColorString();
            DbgNamedTypeInfo curDti       = this;

            while (curDti is DbgArrayTypeInfo)
            {
                var ati = (DbgArrayTypeInfo)curDti;
                _AppendDimension(csDimensions, ati.Count);
                curDti = ati.ArrayElementType;
            }
            return(new ColorString(curDti.ColorName).Append(csDimensions).MakeReadOnly());
        } // end GetColorName()
Exemplo n.º 11
0
        public DbgFieldInfo(DbgEngDebugger debugger,
                            DbgTypeInfo owningType,
                            string fieldName,
                            uint fieldOffset,
                            bool is32BitPointer,
                            bool is64BitPointer,
                            bool isArray,
                            //bool isStruct,
                            bool isConstant,
                            bool isStatic,
                            uint size,
                            DbgNamedTypeInfo fieldType)
            : base(debugger)
        {
            if (null == owningType)
            {
                throw new ArgumentNullException("owningType");
            }

            if (String.IsNullOrEmpty(fieldName))
            {
                throw new ArgumentException("You must supply a field name.", "fieldName");
            }

            if (null == fieldType)
            {
                throw new ArgumentNullException("fieldType");
            }

            OwningType     = owningType;
            Type           = fieldType;
            Offset         = fieldOffset;
            Name           = fieldName;
            Is32BitPointer = is32BitPointer;
            Is64BitPointer = is64BitPointer;
            IsArray        = isArray;
            //IsStruct = isStruct;
            IsConstant = isConstant;
            IsStatic   = isStatic;
            Size       = size;
        } // end constructor
Exemplo n.º 12
0
        } // end _AddBaseClassNodesToList()

        private void _AddBaseClassPointerNodesToList(List <DbgTemplateNode> list, DbgPointerTypeInfo pti)
        {
            DbgNamedTypeInfo dnti = pti;
            int numStars          = 0;

            while (dnti is DbgPointerTypeInfo)
            {
                dnti = ((DbgPointerTypeInfo)dnti).PointeeType;
                numStars++;
            }

            if (!typeof(DbgUdtTypeInfo).IsAssignableFrom(dnti.GetType()))
            {
                return; // It doesn't point to a UDT.
            }
            string stars = new String('*', numStars);
            var    q     = new Queue <DbgUdtTypeInfo>();
            var    uti   = (DbgUdtTypeInfo)dnti;

            uti.VisitAllBaseClasses((bc) => list.Add(DbgTemplateNode.CrackTemplate(bc.TemplateNode.FullName + stars)));
        } // end _AddBaseClassPointerNodesToList()
Exemplo n.º 13
0
        internal DbgPublicSymbol(DbgEngDebugger debugger,
                                 SymbolInfo symbolInfo,
                                 DbgTarget target)
            : base(debugger, _VerifySymInfo(symbolInfo), target)
        {
            m_debugSymbols = (WDebugSymbols)debugger.DebuggerInterface;
            m_symInfo      = symbolInfo;
            var typeSymTag = DbgHelp.GetSymTag(debugger.DebuggerInterface,
                                               symbolInfo.ModBase,
                                               symbolInfo.TypeIndex);

            m_type = (DbgNamedTypeInfo)DbgTypeInfo.GetTypeInfo(debugger,
                                                               symbolInfo.ModBase,
                                                               symbolInfo.TypeIndex,
                                                               typeSymTag,
                                                               target);

            m_dmai = new DEBUG_MODULE_AND_ID()
            {
                Id         = symbolInfo.Index,
                ModuleBase = symbolInfo.ModBase
            };
        } // end constructor