options.h revision 8bd9c19fd8e9864aeeddfbc60b044ededa66f84d
1#include <stdio.h>
2#include <sys/types.h>
3
4#include "forward.h"
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 demangle;   /* -C: demangle low-level names into user-level names */
11	int indent;     /* -n: indent trace output according to program flow */
12	FILE *output;   /* output to a specific file */
13	int summary;    /* count time, calls, and report a summary on program exit */
14	int debug;      /* debug */
15	size_t arraylen;   /* default maximum # of array elements printed */
16	size_t strlen;     /* default maximum # of bytes printed in strings */
17	int follow;     /* trace child processes */
18	int no_signals; /* don't print signals */
19#if defined(HAVE_LIBUNWIND)
20	int bt_depth;	 /* how may levels of stack frames to show */
21#endif /* defined(HAVE_LIBUNWIND) */
22	struct filter *plt_filter;
23	struct filter *static_filter;
24	int hide_caller; /* Whether caller library should be hidden.  */
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
43extern struct opt_p_t *opt_p;	/* attach to process with a given pid */
44
45extern struct opt_F_t *opt_F;	/* alternate configuration file(s) */
46
47extern char **process_options(int argc, char **argv);
48