def funsCallGraph(funs,dir_name,ignore_funs):
    #dict to dicts of fun to funcs called
    cg = {}
    ignore_funs = ignore_funs + [f for f in funs if isSpecIns(f)]
    for f in funs:
        if isSpecIns(f):
            continue
        cg[f] = gFuncsCalled(f,funs,ignore_funs)
    return cg
Beispiel #2
0
def funsCallGraph(funs, dir_name, ignore_funs):
    #dict to dicts of fun to funcs called
    cg = {}
    ignore_funs = ignore_funs + [f for f in funs if isSpecIns(f)]
    for f in funs:
        if isSpecIns(f):
            continue
        cg[f] = gFuncsCalled(f, funs, ignore_funs)
    return cg
def transitivelyCalled(f,cg):
    ret = set()
    vs = list(cg[f]) # copy the list
    #print '     cg[%s] : %s' % (f, cg[f])
    while vs:
       ff = elfFile().gFunName(vs.pop())
       assert '.' not in ff
       if ff not in ret and not isSpecIns(ff):
          ret.add(ff)
          vs += cg[ff]
    return ret
Beispiel #4
0
def transitivelyCalled(f, cg):
    ret = set()
    vs = list(cg[f])  # copy the list
    #print '     cg[%s] : %s' % (f, cg[f])
    while vs:
        ff = elfFile().gFunName(vs.pop())
        assert '.' not in ff
        if ff not in ret and not isSpecIns(ff):
            ret.add(ff)
            vs += cg[ff]
    return ret