5 ms·
On OSX: sudo dtruss -d -t bind,listen,accept,poll,read,write nc -l -p 8080 dtrace: failed to execute nc: dtrace cannot control executables signed with restric
by droopybuns 10y ago
On OSX:
sudo dtruss -d -t bind,listen,accept,poll,read,write nc -l -p 8080
dtrace: failed to execute nc: dtrace cannot control executables signed with restricted entitlements
If you copy nc over to /tmp/ and run dtruss again, it will work. Hope that helps others. Fun article, OP!
- sigjuice 10y agoI never liked dtruss much for complicated debugging because the output shows way too many things in hex. OTOH, output from strace on Linux tends to be much nicer. e.g. $ strace -tebind nc -l -p 8080 14:27:44 bind(3, {sa_family=AF_INET, sin_port=htons(8080), sin_addr=inet_addr("0.0.0.0")}, 16) = 0 $ strace -teconnect nc 10.88.88.140 8080 14:28:29 connect(3, {sa_family=AF_INET, sin_port=htons(8080), sin_addr=inet_addr("10.88.88.140")}, 16) = -1 EINPROGRESS (Operation now in progress) Does anyone know if the various dtrace-based dtruss implementations can be made to do this?
- rdtsc 10y agoYeah same here. When I want to trace my code, boot up a VM just because am more familiar with strace and gdb rather than dtruss and lldb. I can see dtruss having more and fancier features, I but am just too lazy to learn two tools of the same type.