
//typedef long long ino64_t;
#define _GNU_SOURCE

#include <hurd.h>
#include <argp.h>
#include <error.h>
#include <stdio.h>
#include <cthreads.h>

#include "probe_lib.c"

int pre_exec(int probe, char* mem, int mem_size, void* data)
{
  (*(int*)data)++;
  printf("Pre Exec %d\n", *(int*)data);
  return PROBE_CONT;
}

int post_exec(int probe, char* mem, int mem_size, void* data)
{
  return PROBE_CONT;
}

int main(int argc, char* argv[])
{
  printf("Mach arm probe: %x\n", mach_arm_probe);

  int sum = 0;
  instrument_sym("mach_host_self", 0, 0, pre_exec, post_exec, &sum);

  printf("X\n");
  return 0;
}
