tizen 2.0
[external/ltrace.git] / options.h
1 #include <stdio.h>
2 #include <sys/types.h>
3
4 struct options_t {
5         int align;    /* -a: default alignment column for results */
6         char * user;  /* -u: username to run command as */
7         int syscalls; /* -S: display system calls */
8         int libcalls; /* -L: display library calls */
9         int demangle; /* -C: demangle low-level names into user-level names */
10         int indent;   /* -n: indent trace output according to program flow */
11         FILE *output; /* output to a specific file */
12         int summary;  /* count time, calls, and report a summary on program exit */
13         int debug;    /* debug */
14         int arraylen; /* default maximum # of array elements printed */
15         int strlen;   /* default maximum # of bytes printed in strings */
16         int follow;   /* trace child processes */
17 };
18 extern struct options_t options;
19
20 extern int opt_i;               /* instruction pointer */
21 extern int opt_r;               /* print relative timestamp */
22 extern int opt_t;               /* print absolute timestamp */
23 extern int opt_T;               /* show the time spent inside each call */
24
25 struct opt_p_t {
26         pid_t pid;
27         struct opt_p_t *next;
28 };
29
30 struct opt_e_t {
31         char *name;
32         struct opt_e_t *next;
33 };
34
35 struct opt_F_t {
36         char *filename;
37         struct opt_F_t *next;
38 };
39
40 struct opt_x_t {
41         char *name;
42         int found;
43         struct opt_x_t *next;
44 };
45
46 extern struct opt_p_t *opt_p;   /* attach to process with a given pid */
47
48 extern struct opt_e_t *opt_e;   /* list of function names to display */
49 extern int opt_e_enable;        /* 0 if '!' is used, 1 otherwise */
50
51 extern struct opt_F_t *opt_F;   /* alternate configuration file(s) */
52
53 extern struct opt_x_t *opt_x;   /* list of functions to break at */
54
55 extern char **process_options(int argc, char **argv);