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))
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))
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))
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))
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))
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))
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)))
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))
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)
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))
def get_interface(args): g = get_graph(args) with Timer('direct leak query', args.timers): render(find_interface(g, args.names))
def get_list(args): g = get_graph(args) render([i for i in getattr(g, args.type) if i.endswith(args.filter)])
def get_file_graph(args): g = get_graph(args) with Timer('get file graph query', args.timers): render(generate_file_graph(g))
def get_list(args): g = get_graph(args) render([ i for i in getattr(g, args.type) if i.endswith(args.filter)])