'Return all hits of the given lookup path.
I.e. a symbol table lookup across all files in the dirs of this
lib.
"lpath" is a lookup name list, e.g. [\'Casper\', \'Logging\']
or [\'dojo\', \'animation\'].
"ctlr" (optional) is an EvalController instance. If
specified it should be used in the normal way (logging,
checking .is_aborted()).
"curr_buf" (optional), if specified, is the current buf for
which this query is being made. Hits from it should be
skipped (i.e. don\'t bother searching it).
A "hit" is (<CIX node>, <scope-ref>).  Each one represent a
scope-tag or variable-tag hit in all of the blobs for the
execution set buffers.
Returns the empty list if no hits.'

def hits_from_lpath(self, lpath, ctlr=None, curr_buf=None):

    assert isinstance(lpath, tuple)
    self.ensure_all_dirs_scanned(ctlr=ctlr)
    if curr_buf:
        curr_blobname = curr_buf.blob_from_lang.get(self.lang, {}).get('name')
        curr_buf_dir = dirname(curr_buf.path)
    hits = []
    for dir in self.dirs:
        if (ctlr and ctlr.is_aborted()):
            log.debug('ctlr    aborted')
            break
        hit_lpath = lpath
        toplevelname_index = self.lang_zone.load_index(dir, 'toplevelname_index', {})
        for blobname in toplevelname_index.get_blobnames(self.lang, lpath[0], ()):
            if (curr_buf and (curr_buf_dir == dir) and (blobname == curr_blobname)):
                continue
            blob = self.get_blob(blobname, ctlr=ctlr, specific_dir=dir)
            elem = blob
            try:
                for (i, p) in enumerate(lpath):
                    try:
                        elem = elem.names[p]
                    except KeyError:
                        if ((i == 0) and ('\\' in p) and (self.lang == 'PHP')):
                            (namespace, elemname) = p.rsplit('\\', 1)
                            elem = blob.names[namespace].names[elemname]
                            hit_lpath = ((namespace, elemname) + hit_lpath[1:])
                        else:
                            raise
            except KeyError:
                continue
            hits.append((elem, (blob, list(hit_lpath[:(-1)]))))
    return hits
