options.h revision ab3b72cc5d2d3efb3542192f0d72ff2ea4b082f9
1#include <stdio.h>
2#include <sys/types.h>
3
4struct 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	int no_plt;     /* set bps on PLT entries */
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};
23extern struct options_t options;
24
25extern int opt_i;		/* instruction pointer */
26extern int opt_r;		/* print relative timestamp */
27extern int opt_t;		/* print absolute timestamp */
28extern int opt_T;		/* show the time spent inside each call */
29
30struct opt_p_t {
31	pid_t pid;
32	struct opt_p_t *next;
33};
34
35struct opt_e_t {
36	char *name;
37	struct opt_e_t *next;
38};
39
40struct opt_F_t {
41	char *filename;
42	struct opt_F_t *next;
43};
44
45struct opt_x_t {
46	char *name;
47	int found;
48	struct opt_x_t *next;
49};
50
51extern struct opt_p_t *opt_p;	/* attach to process with a given pid */
52
53extern struct opt_e_t *opt_e;	/* list of function names to display */
54extern int opt_e_enable;	/* 0 if '!' is used, 1 otherwise */
55
56extern struct opt_F_t *opt_F;	/* alternate configuration file(s) */
57
58extern struct opt_x_t *opt_x;	/* list of functions to break at */
59
60extern char **process_options(int argc, char **argv);
61