blob: da5c5aa4cd31954a4283d0c4b26f33a2bf61db03 [file] [log] [blame]
Juan Cespedesac3db291998-04-25 14:31:58 +02001#if HAVE_CONFIG_H
2#include "config.h"
3#endif
4
Juan Cespedes5e01f651998-03-08 22:31:44 +01005#include <stdio.h>
Juan Cespedesa4850832002-03-03 02:37:50 +01006#include <sys/types.h>
Juan Cespedes5e01f651998-03-08 22:31:44 +01007
Ian Wienand2d45b1a2006-02-20 22:48:07 +01008extern FILE *output;
9extern int opt_a; /* default alignment column for results */
Steve Fink1150bc42006-08-07 06:04:43 +020010extern int opt_A; /* default maximum # of array elements printed */
Ian Wienand2d45b1a2006-02-20 22:48:07 +010011extern int opt_c; /* count time, calls, and report a summary on program exit */
12extern int opt_d; /* debug */
13extern int opt_i; /* instruction pointer */
14extern int opt_s; /* default maximum # of bytes printed in strings */
15extern int opt_L; /* display library calls */
16extern int opt_S; /* display system calls */
17extern int opt_f; /* trace child processes */
18extern char *opt_u; /* username to run command as */
19extern int opt_r; /* print relative timestamp */
20extern int opt_t; /* print absolute timestamp */
21extern int opt_C; /* Demanglelow-level symbol names into user-level names */
22extern int opt_n; /* indent trace output according to program flow */
23extern int opt_T; /* show the time spent inside each call */
Juan Cespedesaee09312007-08-31 18:49:48 +020024extern int opt_o; /* output to a specific file */
Juan Cespedes5e01f651998-03-08 22:31:44 +010025
26struct opt_p_t {
27 pid_t pid;
Ian Wienand2d45b1a2006-02-20 22:48:07 +010028 struct opt_p_t *next;
Juan Cespedes5e01f651998-03-08 22:31:44 +010029};
30
Juan Cespedesac3db291998-04-25 14:31:58 +020031struct opt_e_t {
Ian Wienand2d45b1a2006-02-20 22:48:07 +010032 char *name;
33 struct opt_e_t *next;
Juan Cespedesac3db291998-04-25 14:31:58 +020034};
35
Steve Fink58c73a72006-07-17 23:18:35 +020036struct opt_F_t {
37 char *filename;
38 struct opt_F_t *next;
39};
40
Paul Gilliam24e643a2006-03-13 18:43:13 +010041struct opt_x_t {
42 char *name;
43 int found;
44 struct opt_x_t *next;
45};
46
Ian Wienand2d45b1a2006-02-20 22:48:07 +010047extern struct opt_p_t *opt_p; /* attach to process with a given pid */
Juan Cespedes5e01f651998-03-08 22:31:44 +010048
Ian Wienand2d45b1a2006-02-20 22:48:07 +010049extern struct opt_e_t *opt_e; /* list of function names to display */
Juan Cespedesac3db291998-04-25 14:31:58 +020050extern int opt_e_enable; /* 0 if '!' is used, 1 otherwise */
51
Steve Fink58c73a72006-07-17 23:18:35 +020052extern struct opt_F_t *opt_F; /* alternate configuration file(s) */
53
Paul Gilliam24e643a2006-03-13 18:43:13 +010054extern struct opt_x_t *opt_x; /* list of functions to break at */
Ian Wienand9a2ad352006-02-20 22:44:45 +010055
Ian Wienand2d45b1a2006-02-20 22:48:07 +010056extern char **process_options(int argc, char **argv);