1 /* Data structures associated with tracepoints in GDB.
2 Copyright (C) 1997, 1998, 1999, 2000, 2007, 2008
3 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 #if !defined (TRACEPOINT_H)
21 #define TRACEPOINT_H 1
23 /* The data structure for an action: */
26 struct action_line
*next
;
30 /* The data structure for a tracepoint: */
34 struct tracepoint
*next
;
39 /* Type of tracepoint. (MVS FIXME: needed?) */
42 /* What to do with this tracepoint after we hit it
43 MVS FIXME: needed?). */
44 enum tpdisp disposition
;
46 /* Number assigned to distinguish tracepoints. */
49 /* Address to trace at, or NULL if not an instruction tracepoint.
53 /* Line number of this address.
54 Only matters if address is non-NULL. */
57 /* Source file name of this address.
58 Only matters if address is non-NULL. */
61 /* Number of times this tracepoint should single-step
62 and collect additional data. */
65 /* Number of times this tracepoint should be hit before
69 /* Chain of action lines to execute when this tracepoint is hit. */
70 struct action_line
*actions
;
72 /* Conditional (MVS ?). */
73 struct expression
*cond
;
75 /* String we used to set the tracepoint (malloc'd).
76 Only matters if address is non-NULL. */
79 /* Language we used to set the tracepoint. */
80 enum language language
;
82 /* Input radix we used to set the tracepoint. */
85 /* Count of the number of times this tracepoint was taken, dumped
86 with the info, but not used for anything else. Useful for
87 seeing how many times you hit a tracepoint prior to the program
88 aborting, so you can back up to just before the abort. */
91 /* Thread number for thread-specific tracepoint,
92 or -1 if don't care. */
95 /* BFD section, in case of overlays: no, I don't know if
96 tracepoints are really gonna work with overlays. */
109 /* The tracepoint chain of all tracepoints. */
111 extern struct tracepoint
*tracepoint_chain
;
113 extern unsigned long trace_running_p
;
115 /* A hook used to notify the UI of tracepoint operations. */
117 void (*deprecated_create_tracepoint_hook
) (struct tracepoint
*);
118 void (*deprecated_delete_tracepoint_hook
) (struct tracepoint
*);
119 void (*deprecated_modify_tracepoint_hook
) (struct tracepoint
*);
120 void (*deprecated_trace_find_hook
) (char *arg
, int from_tty
);
121 void (*deprecated_trace_start_stop_hook
) (int start
, int from_tty
);
123 struct tracepoint
*get_tracepoint_by_number (char **, int, int);
124 int get_traceframe_number (void);
125 void free_actions (struct tracepoint
*);
126 enum actionline_type
validate_actionline (char **, struct tracepoint
*);
129 /* Walk the following statement or block through all tracepoints.
130 ALL_TRACEPOINTS_SAFE does so even if the statment deletes the
131 current breakpoint. */
133 #define ALL_TRACEPOINTS(t) for (t = tracepoint_chain; t; t = t->next)
135 #define ALL_TRACEPOINTS_SAFE(t,tmp) \
136 for (t = tracepoint_chain; \
137 t ? (tmp = t->next, 1) : 0;\
139 #endif /* TRACEPOINT_H */