summaryrefslogtreecommitdiff
path: root/main.c
blob: bd443cfc7c7cf21fcebd205300cf7a84d358347f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <stdio.h>
#include <unistd.h>

#include "ltrace.h"

/*
static int count_call =0;
static int count_ret  =0;

static void
callback_call(Event * ev) {
	count_call ++;
}
static void
callback_ret(Event * ev) {
	count_ret ++;
}

static void
endcallback(Event *ev) {
	printf("%d calls\n%d rets\n",count_call, count_ret);
}
*/

int
main(int argc, char *argv[]) {
	ltrace_init(argc, argv);

/*
	ltrace_add_callback(callback_call, EVENT_SYSCALL);
	ltrace_add_callback(callback_ret, EVENT_SYSRET);
	ltrace_add_callback(endcallback, EVENT_EXIT);
*/

	ltrace_main();
	return 0;
}