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