Source code for mcgdb.model.gpu.environment.cuda.capture.cudaFree

import gdb

import mcgdb
from mcgdb.toolbox.target import my_archi
from mcgdb.model.gpu import representation

[docs]class cudaFreeBP(mcgdb.capture.FunctionBreakpoint): func_type = mcgdb.capture.FunctionTypes.define_func def __init__(self): mcgdb.capture.FunctionBreakpoint.__init__(self, "cudaFree")
[docs] def prepare_before (self): data = {} data["buffer"] = my_archi.first_arg(my_archi.VOID_P) representation.releaseBuffer(data["buffer"]) return (False, False, data)
[docs]def activate(): cudaFreeBP()