4 ms·
If you're familiar with Go you can read the source of the apply function here: the loadKernel function reads in the kernel and builds a symbol table looking fo
by f2f 13y ago
If you're familiar with Go you can read the source of the apply function here:
the loadKernel function reads in the kernel and builds a symbol table looking for the bsd_ast and current_thread symbols here:
https://code.google.com/p/rsc/source/browse/cmd/pprof_mac_fix/main.go#231 https://code.google.com/p/rsc/source/browse/cmd/pprof_mac_fi...
then the "apply" func writes the modified binary instructions code:
https://code.google.com/p/rsc/source/browse/cmd/pprof_mac_fix/main.go#464 https://code.google.com/p/rsc/source/browse/cmd/pprof_mac_fi...