Пример #1
0
def cuda_get_lookup_table(binary=None):
    if binary is None:
        binary = os.readlink("/proc/self/exe")
    lookup_table = collections.OrderedDict()
    
    symbols = gdb_helper.get_cuda_kernel_names(binary)

    for symb, loc, address in gdb_helper.get_symbol_location(symbols, binary):
        params = cuda_parse(loc, symb)
        lookup_table[address] = symb, params
        
    return lookup_table
Пример #2
0
def cuda_get_lookup_table(binary=None):
    if binary is None:
        binary = os.readlink("/proc/self/exe")
    lookup_table = collections.OrderedDict()

    symbols = gdb_helper.get_cuda_kernel_names(binary)

    for symb, loc, address in gdb_helper.get_symbol_location(symbols, binary):
        params = cuda_parse(loc, symb)
        lookup_table[address] = symb, params

    return lookup_table
Пример #3
0
def cuda_get_raw_lookup_table(binary=None):
    lookup_table = collections.OrderedDict()
    for addr, info in cuda_get_lookup_table(binary).items():
        # convert str(addr) to int
        lookup_table[int(addr, 16)] = info

    return lookup_table

def cuda_get_lookup_table(binary=None):
    if binary is None:
        binary = os.readlink("/proc/self/exe")
    lookup_table = collections.OrderedDict()
    
    symbols = gdb_helper.get_cuda_kernel_names(binary)

    for symb, loc, address in gdb_helper.get_symbol_location(symbols, binary):
        params = cuda_parse(loc, symb)
        lookup_table[address] = symb, params
        
    return lookup_table


if __name__ == "__main__":
    binary = sys.argv[1] if len(sys.argv) > 1 else "./hello"
    symbols = gdb_helper.get_cuda_kernel_names()
    
    for symb, loc, address in gdb_helper.get_symbol_location(symbols):
        print(symb)
        print(cuda_parse(loc, symb))
Пример #4
0
def cuda_get_raw_lookup_table(binary=None):
    lookup_table = collections.OrderedDict()
    for addr, info in cuda_get_lookup_table(binary).items():
        # convert str(addr) to int
        lookup_table[int(addr, 16)] = info

    return lookup_table


def cuda_get_lookup_table(binary=None):
    if binary is None:
        binary = os.readlink("/proc/self/exe")
    lookup_table = collections.OrderedDict()

    symbols = gdb_helper.get_cuda_kernel_names(binary)

    for symb, loc, address in gdb_helper.get_symbol_location(symbols, binary):
        params = cuda_parse(loc, symb)
        lookup_table[address] = symb, params

    return lookup_table


if __name__ == "__main__":
    binary = sys.argv[1] if len(sys.argv) > 1 else "./hello"
    symbols = gdb_helper.get_cuda_kernel_names()

    for symb, loc, address in gdb_helper.get_symbol_location(symbols):
        print(symb)
        print(cuda_parse(loc, symb))