'lookup(symb = None, lib = None) -> int
Find the address of ``symbol``, which is found in ``lib``.
Arguments:
symb(str): Named routine to look up
lib(str): Substring to match for the library name.
If omitted, the current library is searched.
If set to ``\'libc\'``, ``\'libc.so\'`` is assumed.
Returns:
Address of the named symbol, or :const:`None`.'

def lookup(self, symb=None, lib=None):

    result = None
    if (lib == 'libc'):
        lib = 'libc.so'
    if (symb and lib):
        pretty = ('%r    in    %r' % (symb, lib))
    else:
        pretty = repr((symb or lib))
    if (not pretty):
        self.failure('Must    specify    a    library    or    symbol')
    self.waitfor(('Resolving    %s' % pretty))
    if (lib is not None):
        dynlib = self._dynamic_load_dynelf(lib)
    else:
        dynlib = self
    if (dynlib is None):
        log.failure(('Could    not    find    %r' % lib))
        return None
    if (symb and self.libcdb):
        self.status('Trying    lookup    based    on    Build    ID')
        build_id = dynlib._lookup_build_id(lib=lib)
        result = None
        if build_id:
            log.info(('Trying    lookup    based    on    Build    ID:    %s' % build_id))
            path = libcdb.search_by_build_id(build_id)
            if path:
                with context.local(log_level='error'):
                    e = ELF(path)
                    e.address = dynlib.libbase
                    result = e.symbols[symb]
        if (not result):
            self.status('Trying    remote    lookup')
            result = dynlib._lookup(symb)
    else:
        result = dynlib.libbase
    if result:
        self.success(('%#x' % result))
    else:
        self.failure(('Could    not    find    %s' % pretty))
    return result
