Beispiel #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))
Beispiel #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))
Beispiel #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))
Beispiel #4
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))
Beispiel #5
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))
Beispiel #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))
Beispiel #7
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))
Beispiel #8
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))
Beispiel #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))
Beispiel #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)))
Beispiel #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))
Beispiel #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))
Beispiel #13
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))
Beispiel #14
0
def get_list(args):
    g = get_graph(args)

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

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

    with Timer('get file graph query', args.timers):
        render(generate_file_graph(g))
Beispiel #17
0
def get_file_graph(args):
    g = get_graph(args)

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

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

    with Timer('direct leak query', args.timers):
        render(find_interface(g, args.names))