| Juan Cespedes | ac3db29 | 1998-04-25 14:31:58 +0200 | [diff] [blame] | 1 | #if HAVE_CONFIG_H |
| 2 | #include "config.h" |
| 3 | #endif |
| 4 | |
| Juan Cespedes | 5e01f65 | 1998-03-08 22:31:44 +0100 | [diff] [blame] | 5 | #include <stdio.h> |
| Juan Cespedes | a485083 | 2002-03-03 02:37:50 +0100 | [diff] [blame] | 6 | #include <sys/types.h> |
| Juan Cespedes | 5e01f65 | 1998-03-08 22:31:44 +0100 | [diff] [blame] | 7 | |
| Ian Wienand | 2d45b1a | 2006-02-20 22:48:07 +0100 | [diff] [blame] | 8 | extern FILE *output; |
| 9 | extern int opt_a; /* default alignment column for results */ |
| Steve Fink | 1150bc4 | 2006-08-07 06:04:43 +0200 | [diff] [blame] | 10 | extern int opt_A; /* default maximum # of array elements printed */ |
| Ian Wienand | 2d45b1a | 2006-02-20 22:48:07 +0100 | [diff] [blame] | 11 | extern int opt_c; /* count time, calls, and report a summary on program exit */ |
| 12 | extern int opt_d; /* debug */ |
| 13 | extern int opt_i; /* instruction pointer */ |
| 14 | extern int opt_s; /* default maximum # of bytes printed in strings */ |
| 15 | extern int opt_L; /* display library calls */ |
| 16 | extern int opt_S; /* display system calls */ |
| 17 | extern int opt_f; /* trace child processes */ |
| 18 | extern char *opt_u; /* username to run command as */ |
| 19 | extern int opt_r; /* print relative timestamp */ |
| 20 | extern int opt_t; /* print absolute timestamp */ |
| 21 | extern int opt_C; /* Demanglelow-level symbol names into user-level names */ |
| 22 | extern int opt_n; /* indent trace output according to program flow */ |
| 23 | extern int opt_T; /* show the time spent inside each call */ |
| Juan Cespedes | aee0931 | 2007-08-31 18:49:48 +0200 | [diff] [blame^] | 24 | extern int opt_o; /* output to a specific file */ |
| Juan Cespedes | 5e01f65 | 1998-03-08 22:31:44 +0100 | [diff] [blame] | 25 | |
| 26 | struct opt_p_t { |
| 27 | pid_t pid; |
| Ian Wienand | 2d45b1a | 2006-02-20 22:48:07 +0100 | [diff] [blame] | 28 | struct opt_p_t *next; |
| Juan Cespedes | 5e01f65 | 1998-03-08 22:31:44 +0100 | [diff] [blame] | 29 | }; |
| 30 | |
| Juan Cespedes | ac3db29 | 1998-04-25 14:31:58 +0200 | [diff] [blame] | 31 | struct opt_e_t { |
| Ian Wienand | 2d45b1a | 2006-02-20 22:48:07 +0100 | [diff] [blame] | 32 | char *name; |
| 33 | struct opt_e_t *next; |
| Juan Cespedes | ac3db29 | 1998-04-25 14:31:58 +0200 | [diff] [blame] | 34 | }; |
| 35 | |
| Steve Fink | 58c73a7 | 2006-07-17 23:18:35 +0200 | [diff] [blame] | 36 | struct opt_F_t { |
| 37 | char *filename; |
| 38 | struct opt_F_t *next; |
| 39 | }; |
| 40 | |
| Paul Gilliam | 24e643a | 2006-03-13 18:43:13 +0100 | [diff] [blame] | 41 | struct opt_x_t { |
| 42 | char *name; |
| 43 | int found; |
| 44 | struct opt_x_t *next; |
| 45 | }; |
| 46 | |
| Ian Wienand | 2d45b1a | 2006-02-20 22:48:07 +0100 | [diff] [blame] | 47 | extern struct opt_p_t *opt_p; /* attach to process with a given pid */ |
| Juan Cespedes | 5e01f65 | 1998-03-08 22:31:44 +0100 | [diff] [blame] | 48 | |
| Ian Wienand | 2d45b1a | 2006-02-20 22:48:07 +0100 | [diff] [blame] | 49 | extern struct opt_e_t *opt_e; /* list of function names to display */ |
| Juan Cespedes | ac3db29 | 1998-04-25 14:31:58 +0200 | [diff] [blame] | 50 | extern int opt_e_enable; /* 0 if '!' is used, 1 otherwise */ |
| 51 | |
| Steve Fink | 58c73a7 | 2006-07-17 23:18:35 +0200 | [diff] [blame] | 52 | extern struct opt_F_t *opt_F; /* alternate configuration file(s) */ |
| 53 | |
| Paul Gilliam | 24e643a | 2006-03-13 18:43:13 +0100 | [diff] [blame] | 54 | extern struct opt_x_t *opt_x; /* list of functions to break at */ |
| Ian Wienand | 9a2ad35 | 2006-02-20 22:44:45 +0100 | [diff] [blame] | 55 | |
| Ian Wienand | 2d45b1a | 2006-02-20 22:48:07 +0100 | [diff] [blame] | 56 | extern char **process_options(int argc, char **argv); |