* linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
[deliverable/binutils-gdb.git] / gdb / tracepoint.h
CommitLineData
c906108c 1/* Data structures associated with tracepoints in GDB.
b6ba6518 2 Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
c906108c 3
c5aa993b 4 This file is part of GDB.
c906108c 5
c5aa993b
JM
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
c906108c 10
c5aa993b
JM
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
c906108c 15
c5aa993b
JM
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
c906108c
SS
20
21#if !defined (TRACEPOINT_H)
22#define TRACEPOINT_H 1
23
c906108c 24/* The data structure for an action: */
c5aa993b
JM
25struct action_line
26 {
27 struct action_line *next;
28 char *action;
29 };
c906108c
SS
30
31/* The data structure for a tracepoint: */
32
33struct tracepoint
c5aa993b
JM
34 {
35 struct tracepoint *next;
c906108c 36
b5de0fa7 37 int enabled_p;
c906108c
SS
38
39#if 0
c5aa993b
JM
40 /* Type of tracepoint (MVS FIXME: needed?). */
41 enum tptype type;
c906108c 42
c5aa993b
JM
43 /* What to do with this tracepoint after we hit it MVS FIXME: needed?). */
44 enum tpdisp disposition;
c906108c 45#endif
c5aa993b
JM
46 /* Number assigned to distinguish tracepoints. */
47 int number;
c906108c 48
c5aa993b
JM
49 /* Address to trace at, or NULL if not an instruction tracepoint (MVS ?). */
50 CORE_ADDR address;
c906108c 51
c5aa993b
JM
52 /* Line number of this address. Only matters if address is non-NULL. */
53 int line_number;
c906108c 54
c5aa993b
JM
55 /* Source file name of this address. Only matters if address is non-NULL. */
56 char *source_file;
c906108c 57
c5aa993b
JM
58 /* Number of times this tracepoint should single-step
59 and collect additional data */
60 long step_count;
c906108c 61
c5aa993b
JM
62 /* Number of times this tracepoint should be hit before disabling/ending. */
63 int pass_count;
c906108c 64
c5aa993b
JM
65 /* Chain of action lines to execute when this tracepoint is hit. */
66 struct action_line *actions;
c906108c 67
c5aa993b
JM
68 /* Conditional (MVS ?). */
69 struct expression *cond;
c906108c 70
c5aa993b
JM
71 /* String we used to set the tracepoint (malloc'd). Only matters if
72 address is non-NULL. */
73 char *addr_string;
c906108c 74
c5aa993b
JM
75 /* Language we used to set the tracepoint. */
76 enum language language;
c906108c 77
c5aa993b
JM
78 /* Input radix we used to set the tracepoint. */
79 int input_radix;
c906108c 80
c5aa993b
JM
81 /* Count of the number of times this tracepoint was taken, dumped
82 with the info, but not used for anything else. Useful for
83 seeing how many times you hit a tracepoint prior to the program
84 aborting, so you can back up to just before the abort. */
85 int hit_count;
c906108c 86
c5aa993b
JM
87 /* Thread number for thread-specific tracepoint, or -1 if don't care */
88 int thread;
89
90 /* BFD section, in case of overlays:
91 no, I don't know if tracepoints are really gonna work with overlays. */
92 asection *section;
93 };
c906108c
SS
94
95enum actionline_type
c5aa993b
JM
96 {
97 BADLINE = -1,
98 GENERIC = 0,
99 END = 1,
100 STEPPING = 2
101 };
c906108c
SS
102
103
cddb0f80 104/* The tracepoint chain of all tracepoints */
c906108c
SS
105
106extern struct tracepoint *tracepoint_chain;
107
108extern unsigned long trace_running_p;
109
110/* A hook used to notify the UI of tracepoint operations */
111
507f3c78
KB
112void (*create_tracepoint_hook) (struct tracepoint *);
113void (*delete_tracepoint_hook) (struct tracepoint *);
114void (*modify_tracepoint_hook) (struct tracepoint *);
115void (*trace_find_hook) (char *arg, int from_tty);
116void (*trace_start_stop_hook) (int start, int from_tty);
c906108c 117
a14ed312
KB
118struct tracepoint *get_tracepoint_by_number (char **, int, int);
119int get_traceframe_number (void);
120void free_actions (struct tracepoint *);
121enum actionline_type validate_actionline (char **, struct tracepoint *);
c906108c
SS
122
123
124/* Walk the following statement or block through all tracepoints.
125 ALL_TRACEPOINTS_SAFE does so even if the statment deletes the current
126 breakpoint. */
127
128#define ALL_TRACEPOINTS(t) for (t = tracepoint_chain; t; t = t->next)
129
130#define ALL_TRACEPOINTS_SAFE(t,tmp) \
131 for (t = tracepoint_chain; \
132 t ? (tmp = t->next, 1) : 0;\
133 t = tmp)
134#endif /* TRACEPOINT_H */
This page took 0.385858 seconds and 4 git commands to generate.