Example #1
0
def get_relationship_node(args):
    g = get_graph(args)

    try:
        name = args.name

        rel = args.relationship

        if rel is None:
            raise Exception('invalid relationship type.')

        result = {}
        if get_relationship_types()[rel][1] == 'symbol':
            full_symbol_names = expand_symbol_names(g, args.name)
            for full_symbol_name in full_symbol_names:
                result[full_symbol_name] = g.get(
                    get_relationship_types()[rel][0], full_symbol_name)
        else:
            full_file_names = expand_file_names(g, args.name)
            for full_file_name in full_file_names:
                result[full_file_name] = g.get(
                    get_relationship_types()[rel][0], full_file_name)
        render(result)
    except KeyError:
        print('[wil]: there is no {0} named {1}'.format(args.thing, args.name))
Example #2
0
def get_file_family_tree(args):
    if args.g is None:
        g = get_graph(args)
    else:
        g = args.g

    with Timer('get file family tree query', args.timers):
        render(file_family_tree(g, args.name, args.depth))
Example #3
0
def get_required_libs(args):
    if args.g is None:
        g = get_graph(args)
    else:
        g = args.g

    with Timer('get libs needed query', args.timers):
        render(find_libraries_needed_multi(g, args.names))
Example #4
0
def get_file_family_tree(args):
    if args.g is None:
        g = get_graph(args)
    else:
        g = args.g

    with Timer('get file family tree query', args.timers):
        render(file_family_tree(g, args.name, args.depth))
Example #5
0
def get_circle_deps(args):
    if args.g is None:
        g = get_graph(args)
    else:
        g = args.g

    with Timer('get libs needed query', args.timers):
        render(find_libraries_needed_full(g, args.names))
Example #6
0
def get_circle_deps(args):
    if args.g is None:
        g = get_graph(args)
    else:
        g = args.g

    with Timer('get libs needed query', args.timers):
        render(find_libraries_needed_full(g, args.names))
Example #7
0
def get_required_libs(args):
    if args.g is None:
        g = get_graph(args)
    else:
        g = args.g

    with Timer('get libs needed query', args.timers):
        render(find_libraries_needed_multi(g, args.names))
Example #8
0
def get_executables(args):
    if args.g is None:
        g = get_graph(args)
    else:
        g = args.g

    with Timer('get executables query', args.timers):
        render(get_executable_list(g, args.name))
Example #9
0
def get_leaks(args):
    if args.g is None:
        g = get_graph(args)
    else:
        g = args.g

    with Timer('leaks tree query', args.timers):
        render(
            resolve_leak_info(g, args.names, args.depth, args.timers,
                              args.source_names))
Example #10
0
def get_unneeded_libdeps(args):
    g = get_graph(args)

    ct = 0
    for filename in g.files:
        if filename.endswith(".a"):
            ct += 1
    print('[wil]: total number of archives: ' + str(ct))

    with Timer('find unneeded libdeps', args.timers):
        render(list(find_extra_archives(g, args.name)))
Example #11
0
def get_symbol_family_tree(args):
    if args.g is None:
        g = get_graph(args)
    else:
        g = args.g

    if len(args.name) > 0:
        raise Exception('Currently only one symbol is allowed')

    with Timer('get symbol family tree query', args.timers):
        render(symbol_family_tree(g, args.name[0], args.depth))
Example #12
0
def get_symbol_family_tree(args):
    if args.g is None:
        g = get_graph(args)
    else:
        g = args.g

    if len(args.name) > 0:
        raise Exception('Currently only one symbol is allowed')

    with Timer('get symbol family tree query', args.timers):
        render(symbol_family_tree(g, args.name[0], args.depth))
Example #13
0
def get_tree(args):
    g = get_graph(args)

    for tree_type in get_tree_types().keys():
        if getattr(args, tree_type) is not None:
            tree = tree_type
            args.name = getattr(args, tree)
            break

    if tree is None:
        raise Exception('invalid tree type.')

    args.g = g
    get_tree_types()[tree](args)
Example #14
0
def get_tree(args):
    g = get_graph(args)

    for tree_type in get_tree_types().keys():
        if getattr(args, tree_type) is not None:
            tree = tree_type
            args.name = getattr(args, tree)
            break

    if tree is None:
        raise Exception('invalid tree type.')

    args.g = g
    get_tree_types()[tree](args)
Example #15
0
def get_relationship_node(args):
    g = get_graph(args)

    try:
        name = args.name

        rel = args.relationship

        if rel is None:
            raise Exception('invalid relationship type.')

        result = {}
        if get_relationship_types()[rel][1] == 'symbol':
            full_symbol_names = expand_symbol_names(g, args.name)
            for full_symbol_name in full_symbol_names:
                result[full_symbol_name] = g.get(get_relationship_types()[rel][0], full_symbol_name)
        else:
            full_file_names = expand_file_names(g, args.name)
            for full_file_name in full_file_names:
                result[full_file_name] = g.get(get_relationship_types()[rel][0], full_file_name)
        render(result)
    except KeyError:
        print('[wil]: there is no {0} named {1}'.format(args.thing, args.name))
Example #16
0
def get_interface(args):
    g = get_graph(args)

    with Timer('direct leak query', args.timers):
        render(find_interface(g, args.names))
Example #17
0
def get_list(args):
    g = get_graph(args)

    render([i for i in getattr(g, args.type) if i.endswith(args.filter)])
Example #18
0
def get_interface(args):
    g = get_graph(args)

    with Timer('direct leak query', args.timers):
        render(find_interface(g, args.names))
Example #19
0
def get_file_graph(args):
    g = get_graph(args)

    with Timer('get file graph query', args.timers):
        render(generate_file_graph(g))
Example #20
0
def get_list(args):
    g = get_graph(args)

    render([ i for i in getattr(g, args.type) if i.endswith(args.filter)])
Example #21
0
def get_file_graph(args):
    g = get_graph(args)

    with Timer('get file graph query', args.timers):
        render(generate_file_graph(g))