(self, address)
return found
Tries to find the closest matching symbol for the given address.

        @type  address: int
        @param address: Memory address to query.

        @rtype: None or tuple( str, int, int )
        @return: Returns a tuple consisting of:
             - Name
             - Address
             - Size (in bytes)
            Returns C{None} if no symbol could be matched.
Tries to find the closest matching symbol for the given address.
Tries to find the closest matching symbol for the given address .
def get_symbol_at_address(self, address):
        """
        Tries to find the closest matching symbol for the given address.

        @type  address: int
        @param address: Memory address to query.

        @rtype: None or tuple( str, int, int )
        @return: Returns a tuple consisting of:
             - Name
             - Address
             - Size (in bytes)
            Returns C{None} if no symbol could be matched.
        """
        # Any module may have symbols pointing anywhere in memory, so there's
        # no easy way to optimize this. I guess we're stuck with brute force.
        found = None
        for (SymbolName, SymbolAddress, SymbolSize) in self.iter_symbols():
            if SymbolAddress > address:
                continue

            if SymbolAddress == address:
                found = (SymbolName, SymbolAddress, SymbolSize)
                break

            if SymbolAddress < address:
                if found and (address - found[1]) < (address - SymbolAddress):
                    continue
                else:
                    found = (SymbolName, SymbolAddress, SymbolSize)
        return found
def get_symbol_at_address ( self , address ) : # Any module may have symbols pointing anywhere in memory, so there's # no easy way to optimize this. I guess we're stuck with brute force. found = None for ( SymbolName , SymbolAddress , SymbolSize ) in self . iter_symbols ( ) : if SymbolAddress > address : continue if SymbolAddress == address : found = ( SymbolName , SymbolAddress , SymbolSize ) break if SymbolAddress < address : if found and ( address - found [ 1 ] ) < ( address - SymbolAddress ) : continue else : found = ( SymbolName , SymbolAddress , SymbolSize ) return found