blob: e2d0e7f5b7971e6e38d2f8138f17d20aa41d6369 [file] [log] [blame]
Juan Cespedes5e01f651998-03-08 22:31:44 +01001#include <stdio.h>
Juan Cespedesa4850832002-03-03 02:37:50 +01002#include <sys/types.h>
Juan Cespedes5e01f651998-03-08 22:31:44 +01003
Juan Cespedesce377d52008-12-16 19:38:10 +01004struct options_t {
Joe Damato59e3fb12009-11-06 19:45:10 -08005 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 */
Juan Cespedesce377d52008-12-16 19:38:10 +010019};
20extern struct options_t options;
21
Ian Wienand2d45b1a2006-02-20 22:48:07 +010022extern int opt_i; /* instruction pointer */
Ian Wienand2d45b1a2006-02-20 22:48:07 +010023extern int opt_r; /* print relative timestamp */
24extern int opt_t; /* print absolute timestamp */
Ian Wienand2d45b1a2006-02-20 22:48:07 +010025extern int opt_T; /* show the time spent inside each call */
Juan Cespedes5e01f651998-03-08 22:31:44 +010026
27struct opt_p_t {
28 pid_t pid;
Ian Wienand2d45b1a2006-02-20 22:48:07 +010029 struct opt_p_t *next;
Juan Cespedes5e01f651998-03-08 22:31:44 +010030};
31
Juan Cespedesac3db291998-04-25 14:31:58 +020032struct opt_e_t {
Ian Wienand2d45b1a2006-02-20 22:48:07 +010033 char *name;
34 struct opt_e_t *next;
Juan Cespedesac3db291998-04-25 14:31:58 +020035};
36
Steve Fink58c73a72006-07-17 23:18:35 +020037struct opt_F_t {
38 char *filename;
39 struct opt_F_t *next;
40};
41
Paul Gilliam24e643a2006-03-13 18:43:13 +010042struct opt_x_t {
43 char *name;
44 int found;
45 struct opt_x_t *next;
46};
47
Ian Wienand2d45b1a2006-02-20 22:48:07 +010048extern struct opt_p_t *opt_p; /* attach to process with a given pid */
Juan Cespedes5e01f651998-03-08 22:31:44 +010049
Ian Wienand2d45b1a2006-02-20 22:48:07 +010050extern struct opt_e_t *opt_e; /* list of function names to display */
Juan Cespedesac3db291998-04-25 14:31:58 +020051extern int opt_e_enable; /* 0 if '!' is used, 1 otherwise */
52
Steve Fink58c73a72006-07-17 23:18:35 +020053extern struct opt_F_t *opt_F; /* alternate configuration file(s) */
54
Paul Gilliam24e643a2006-03-13 18:43:13 +010055extern struct opt_x_t *opt_x; /* list of functions to break at */
Ian Wienand9a2ad352006-02-20 22:44:45 +010056
Ian Wienand2d45b1a2006-02-20 22:48:07 +010057extern char **process_options(int argc, char **argv);