int main() { /* * These function calls should not be traced */ IsTraced(); NotTraced(); /* * This signal is caught by the tool and enables instrumentation. * More commonly, the application wouldn't send the signal, but the * user would type "kill -USR2 <pid>" at the command prompt while * the application was running under Pin. */ kill(getpid(), SIGUSR2); /* * This call is traced by Pin. */ IsTraced(); return 0; }
void DebugUtil::PrintSmartPointerIDs(const Object* objectPointer, std::ostream& stream, const std::list<unsigned int>& excludeList) { stream << "SmartPointer IDs [ "; if (IsTraced(objectPointer)) { std::list<unsigned int> ids = GetSmartPointerIDs(objectPointer, excludeList); for (std::list<unsigned int>::const_iterator iter = ids.begin(); iter != ids.end(); ++iter) { stream << *iter << " "; } } else { stream << "n/a "; } stream << "]\n"; }