options.h revision da3edbf059fe6c6d010b47ac50876783b4ed49ce
1#include <stdio.h>
2#include <sys/types.h>
3
4struct filter;
5
6struct options_t {
7	int align;      /* -a: default alignment column for results */
8	char * user;    /* -u: username to run command as */
9	int syscalls;   /* -S: display system calls */
10	int libcalls;   /* -L: display library calls */
11	int demangle;   /* -C: demangle low-level names into user-level names */
12	int indent;     /* -n: indent trace output according to program flow */
13	FILE *output;   /* output to a specific file */
14	int summary;    /* count time, calls, and report a summary on program exit */
15	int debug;      /* debug */
16	size_t arraylen;   /* default maximum # of array elements printed */
17	size_t strlen;     /* default maximum # of bytes printed in strings */
18	int follow;     /* trace child processes */
19	int no_plt;     /* set bps on PLT entries */
20	int no_signals; /* don't print signals */
21#if defined(HAVE_LIBUNWIND)
22	int bt_depth;	 /* how may levels of stack frames to show */
23#endif /* defined(HAVE_LIBUNWIND) */
24	struct filter *plt_filter;
25	struct filter *static_filter;
26	int hide_caller; /* Whether caller library should be hidden.  */
27};
28extern struct options_t options;
29
30extern int opt_i;		/* instruction pointer */
31extern int opt_r;		/* print relative timestamp */
32extern int opt_t;		/* print absolute timestamp */
33extern int opt_T;		/* show the time spent inside each call */
34
35struct opt_p_t {
36	pid_t pid;
37	struct opt_p_t *next;
38};
39
40struct opt_F_t {
41	char *filename;
42	struct opt_F_t *next;
43};
44
45extern struct opt_p_t *opt_p;	/* attach to process with a given pid */
46
47extern struct opt_F_t *opt_F;	/* alternate configuration file(s) */
48
49extern char **process_options(int argc, char **argv);
50