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