コード例 #1
0
        private void removeNIDInfo(NIDInfo info)
        {
            IDictionary <int, NIDInfo> moduleMap = moduleNidMap[info.ModuleName];

            if (moduleMap != null)
            {
                moduleMap.Remove(info.Nid);
                if (moduleMap.Count == 0)
                {
                    moduleNidMap.Remove(info.ModuleName);
                }
            }

            // For HLE NID's, do not trust the module names defined in pspsharp, use only the NID.
            if (!info.ValidModuleName)
            {
                nidMap.Remove(info.Nid);
            }

            if (info.hasAddress())
            {
                addressMap.Remove(info.Address);
            }

            if (info.hasSyscall())
            {
                syscallMap.Remove(info.Syscall);
            }

            if (info.hasName())
            {
                nameMap.Remove(info.Name);
            }
        }
コード例 #2
0
        private void addNIDInfo(NIDInfo info)
        {
            IDictionary <int, NIDInfo> moduleMap = moduleNidMap[info.ModuleName];

            if (moduleMap == null)
            {
                moduleMap = new Dictionary <int, NIDInfo>();
                moduleNidMap[info.ModuleName] = moduleMap;
            }
            moduleMap[info.Nid] = info;

            // For HLE NID's, do not trust the module names defined in pspsharp, use only the NID.
            if (!info.ValidModuleName)
            {
                nidMap[info.Nid] = info;
            }

            if (info.hasAddress())
            {
                addressMap[info.Address] = info;
            }

            if (info.hasSyscall())
            {
                syscallMap[info.Syscall] = info;
            }

            if (info.hasName())
            {
                nameMap[info.Name] = info;
            }
        }
コード例 #3
0
        public virtual int getAddressByName(string name)
        {
            NIDInfo info = getNIDInfoByName(name);

            if (info == null || !info.hasAddress())
            {
                return(0);
            }

            return(info.Address);
        }
コード例 #4
0
        public virtual int getAddressBySyscall(int syscall)
        {
            NIDInfo info = getNIDInfoBySyscall(syscall);

            if (info == null || !info.hasAddress())
            {
                return(0);
            }

            return(info.Address);
        }
コード例 #5
0
        public virtual int getAddressByNid(int nid, string moduleName)
        {
            NIDInfo info = getNIDInfoByNid(moduleName, nid);

            if (info == null || !info.hasAddress())
            {
                return(0);
            }

            if (!string.ReferenceEquals(moduleName, null) && !info.isFromModule(moduleName))
            {
                Console.WriteLine(string.Format("Trying to resolve {0} from module '{1}'", info, moduleName));
            }

            return(info.Address);
        }