options.h revision 51e74aca71ff7e8be91c074afd4f2264f46294e9
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 25 /* A filter matching library names of libraries, whose 26 * exported symbols we wish to trace. */ 27 struct filter *export_filter; 28 29 int hide_caller; /* Whether caller library should be hidden. */ 30}; 31extern struct options_t options; 32 33extern int opt_i; /* instruction pointer */ 34extern int opt_r; /* print relative timestamp */ 35extern int opt_t; /* print absolute timestamp */ 36extern int opt_T; /* show the time spent inside each call */ 37 38struct opt_p_t { 39 pid_t pid; 40 struct opt_p_t *next; 41}; 42 43struct opt_F_t { 44 char *filename; 45 struct opt_F_t *next; 46}; 47 48extern struct opt_p_t *opt_p; /* attach to process with a given pid */ 49 50extern struct opt_F_t *opt_F; /* alternate configuration file(s) */ 51 52extern char **process_options(int argc, char **argv); 53