c++11: NULL -> nullptr
c++11: ptrace: use range-based for loops