Exemplo n.º 1
0
        public static DbgBaseClassTypeInfoBase GetBaseClassTypeInfo(DbgEngDebugger debugger,
                                                                    DbgModuleInfo module,
                                                                    uint typeId)
        {
            if (null == debugger)
            {
                throw new ArgumentNullException("debugger");
            }

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

            RawBaseClassInfo rbci = DbgHelp.GetBaseClassInfo(debugger.DebuggerInterface, module.BaseAddress, typeId);

            if (rbci.IsVirtualBaseClass)
            {
                return(new DbgVirtualBaseClassTypeInfo(debugger,
                                                       module,
                                                       typeId,
                                                       rbci.UdtKind,
                                                       rbci.BaseClassTypeName,
                                                       rbci.BaseClassSize,
                                                       rbci.ChildrenCount,
                                                       rbci.ClassParentId,
                                                       rbci.VirtualTableShapeId,
                                                       rbci.IsVirtualBaseClass,
                                                       rbci.IsIndirectVirtualBaseClass,
                                                       rbci.BaseClassTypeId,
                                                       rbci.VirtualBaseDispIndex,
                                                       rbci.VirtualBasePointerOffset));
            }
            else
            {
                return(new DbgBaseClassTypeInfo(debugger,
                                                module,
                                                typeId,
                                                rbci.UdtKind,
                                                rbci.BaseClassTypeName,
                                                rbci.BaseClassSize,
                                                rbci.ChildrenCount,
                                                rbci.ClassParentId,
                                                rbci.VirtualTableShapeId,
                                                rbci.IsVirtualBaseClass,
                                                rbci.IsIndirectVirtualBaseClass,
                                                rbci.BaseClassTypeId,
                                                rbci.Offset));
            }
        } // end GetBaseClassTypeInfo()