Пример #1
0
        /// <summary>
        /// Gets the symbol name by address.
        /// </summary>
        /// <param name="process">The process.</param>
        /// <param name="address">The address.</param>
        public Tuple <string, ulong> GetSymbolNameByAddress(Process process, ulong address)
        {
            ulong  distance;
            Module module;
            ISymbolProviderModule diaModule = GetDiaModule(process, address, out distance, out module);
            var result = diaModule.GetSymbolNameByAddress(process, address, (uint)distance);

            return(new Tuple <string, ulong>(module.Name + "!" + result.Item1, result.Item2));
        }
Пример #2
0
        /// <summary>
        /// Gets the symbol name by address.
        /// </summary>
        /// <param name="process">The process.</param>
        /// <param name="address">The address.</param>
        public Tuple <string, ulong> GetSymbolNameByAddress(Process process, ulong address)
        {
            ulong  distance;
            Module module;
            ISymbolProviderModule symbolProviderModule = GetSymbolProviderModule(process, address, out distance, out module);

            if (symbolProviderModule == null)
            {
                return(FallbackSymbolProvider?.GetSymbolNameByAddress(process, address));
            }

            var result = symbolProviderModule.GetSymbolNameByAddress((uint)distance);

            return(new Tuple <string, ulong>(module.Name + "!" + result.Item1, result.Item2));
        }