Пример #1
0
/* Main function for itrace that
 * sets up the attached to process ID
 * given on commmand line and then 
 * calls do_trace to do the tracing
 */
int main(int argc,
	 char* argv[])
{
  if(3==argc)
  {
    init_attach(argv[2]);
    signal(SIGINT, sigintHandler);
    do_trace();
  }
  return 0;
}
Пример #2
0
/**
 * ./itrace -p [PID]
 *
 * opens an interactive session where you can trace a process single-step
 * the instructions will be disassembled via udis86
 * provided by sample code snyfer.c
 */
int main(int argc,
	 char* argv[])
{
  if(3==argc)
  {
    init_attach(argv[2]);
    create_interpreter();
    do_sniff();
  }else{
    do_usage();
    return -1;
  }

  return 0;
}