Exemplo n.º 1
0
        } // end GetNearNameByOffset()

        public DbgSymbol GetSymbolByAddress(ulong address, out ulong displacement)
        {
            // TODO: Should I handle exceptions and return null?
            ulong tmpDisplacement = 0xffffffffffffffff;
            var   retval          = Debugger.ExecuteOnDbgEngThread(() =>
            {
                SymbolInfo si = DbgHelp.SymFromAddr(Debugger.DebuggerInterface, address, out tmpDisplacement);
                // TODO: This doesn't seem like a good idea to use whatever the "current" context
                // is here... but what can I do? Perhaps I could just get rid of this method.
                return(new DbgPublicSymbol(Debugger, si, Debugger.GetCurrentTarget()));
            });

            displacement = tmpDisplacement;
            return(retval);
        } // end GetSymbolByAddress()