options.h revision 7b0a7dea2ca8f98bb530e60bf5ffd9d82f445cb5
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	unsigned long hash;
49	struct opt_x_t *next;
50};
51
52extern struct opt_p_t *opt_p;	/* attach to process with a given pid */
53
54extern struct opt_e_t *opt_e;	/* list of function names to display */
55extern int opt_e_enable;	/* 0 if '!' is used, 1 otherwise */
56
57extern struct opt_F_t *opt_F;	/* alternate configuration file(s) */
58
59extern struct opt_x_t *opt_x;	/* list of functions to break at */
60extern unsigned int opt_x_cnt;
61
62extern char **process_options(int argc, char **argv);
63