options.h revision cc813cd481c74ee4861baa5dd6154c3f234c7901
1#if HAVE_CONFIG_H 2#include "config.h" 3#endif 4 5#include <stdio.h> 6#include <sys/types.h> 7 8struct options_t { 9 int align; /* -a: default alignment column for results */ 10 char * user; /* -u: username to run command as */ 11 int syscalls; /* -S: display system calls */ 12 int libcalls; /* -L: display library calls */ 13 int demangle; /* -C: demangle low-level names into user-level names */ 14 int indent; /* -n: indent trace output according to program flow */ 15 FILE *output; /* output to a specific file */ 16 int summary; /* count time, calls, and report a summary on program exit */ 17 int debug; /* debug */ 18 int arraylen; /* default maximum # of array elements printed */ 19 int strlen; /* default maximum # of bytes printed in strings */ 20 int follow; /* trace child processes */ 21}; 22extern struct options_t options; 23 24extern int opt_i; /* instruction pointer */ 25extern int opt_r; /* print relative timestamp */ 26extern int opt_t; /* print absolute timestamp */ 27extern int opt_T; /* show the time spent inside each call */ 28 29struct opt_p_t { 30 pid_t pid; 31 struct opt_p_t *next; 32}; 33 34struct opt_e_t { 35 char *name; 36 struct opt_e_t *next; 37}; 38 39struct opt_F_t { 40 char *filename; 41 struct opt_F_t *next; 42}; 43 44struct opt_x_t { 45 char *name; 46 int found; 47 struct opt_x_t *next; 48}; 49 50extern struct opt_p_t *opt_p; /* attach to process with a given pid */ 51 52extern struct opt_e_t *opt_e; /* list of function names to display */ 53extern int opt_e_enable; /* 0 if '!' is used, 1 otherwise */ 54 55extern struct opt_F_t *opt_F; /* alternate configuration file(s) */ 56 57extern struct opt_x_t *opt_x; /* list of functions to break at */ 58 59extern char **process_options(int argc, char **argv); 60