options.h revision 1e4fed2719443c9de3831b359ff516888114783f
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 *filter;
25};
26extern struct options_t options;
27
28extern int opt_i;		/* instruction pointer */
29extern int opt_r;		/* print relative timestamp */
30extern int opt_t;		/* print absolute timestamp */
31extern int opt_T;		/* show the time spent inside each call */
32
33struct opt_p_t {
34	pid_t pid;
35	struct opt_p_t *next;
36};
37
38struct opt_F_t {
39	char *filename;
40	struct opt_F_t *next;
41};
42
43struct opt_x_t {
44	char *name;
45	int found;
46	unsigned long hash;
47	struct opt_x_t *next;
48};
49
50extern struct opt_p_t *opt_p;	/* attach to process with a given pid */
51
52extern struct opt_F_t *opt_F;	/* alternate configuration file(s) */
53
54extern struct opt_x_t *opt_x;	/* list of functions to break at */
55extern unsigned int opt_x_cnt;
56
57extern char **process_options(int argc, char **argv);
58