예제 #1
0
        private static DbgTypeInfo _LoadTypeInfo(DbgEngDebugger debugger,
                                                 DbgModuleInfo module,
                                                 uint typeId)
        {
            if (null == debugger)
            {
                throw new ArgumentNullException("debugger");
            }

            if (IsDbgGeneratedType(typeId) &&
                !DbgHelp.PeekSyntheticTypeExists(debugger.DebuggerInterface,
                                                 module.BaseAddress,
                                                 typeId))
            {
                return(new DbgGeneratedTypeInfo(debugger, module, typeId));
            }

            return(debugger.ExecuteOnDbgEngThread(() =>
            {
                var symTag = DbgHelp.GetSymTag(debugger.DebuggerInterface,
                                               module.BaseAddress,
                                               typeId);
                return _LoadTypeInfo(debugger, module, typeId, symTag);
            }));
        }
예제 #2
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