1 /* Data structures associated with tracepoints in GDB.
2 Copyright (C) 1997 Free Software Foundation, Inc.
4 This file is part of GDB.
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.
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.
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, Boston, MA 02111-1307, USA. */
20 #if !defined (TRACEPOINT_H)
21 #define TRACEPOINT_H 1
23 #if !defined (BREAKPOINT_H)
24 enum enable
{ disabled
, enabled
};
26 /* The data structure for an action: */
29 struct action_line
*next
;
33 /* The data structure for a tracepoint: */
37 struct tracepoint
*next
;
42 /* Type of tracepoint (MVS FIXME: needed?). */
45 /* What to do with this tracepoint after we hit it MVS FIXME: needed?). */
46 enum tpdisp disposition
;
48 /* Number assigned to distinguish tracepoints. */
51 /* Address to trace at, or NULL if not an instruction tracepoint (MVS ?). */
54 /* Line number of this address. Only matters if address is non-NULL. */
57 /* Source file name of this address. Only matters if address is non-NULL. */
60 /* Number of times this tracepoint should single-step
61 and collect additional data */
64 /* Number of times this tracepoint should be hit before disabling/ending. */
67 /* Chain of action lines to execute when this tracepoint is hit. */
68 struct action_line
*actions
;
70 /* Conditional (MVS ?). */
71 struct expression
*cond
;
73 /* String we used to set the tracepoint (malloc'd). Only matters if
74 address is non-NULL. */
77 /* Language we used to set the tracepoint. */
78 enum language language
;
80 /* Input radix we used to set the tracepoint. */
83 /* Count of the number of times this tracepoint was taken, dumped
84 with the info, but not used for anything else. Useful for
85 seeing how many times you hit a tracepoint prior to the program
86 aborting, so you can back up to just before the abort. */
89 /* Thread number for thread-specific breakpoint, or -1 if don't care */
102 /* The tracepont chain of all tracepoints */
104 extern struct tracepoint
*tracepoint_chain
;
106 extern unsigned long trace_running_p
;
108 /* A hook used to notify the UI of tracepoint operations */
110 void (*create_tracepoint_hook
) PARAMS ((struct tracepoint
*));
111 void (*delete_tracepoint_hook
) PARAMS ((struct tracepoint
*));
112 void (*modify_tracepoint_hook
) PARAMS ((struct tracepoint
*));
114 struct tracepoint
*get_tracepoint_by_number
PARAMS ((char **));
115 int get_traceframe_number
PARAMS ((void));
116 void free_actions
PARAMS((struct tracepoint
*));
117 enum actionline_type validate_actionline
PARAMS((char **,
118 struct tracepoint
*));
121 /* Walk the following statement or block through all tracepoints.
122 ALL_TRACEPOINTS_SAFE does so even if the statment deletes the current
125 #define ALL_TRACEPOINTS(t) for (t = tracepoint_chain; t; t = t->next)
127 #define ALL_TRACEPOINTS_SAFE(t,tmp) \
128 for (t = tracepoint_chain; \
129 t ? (tmp = t->next, 1) : 0;\
131 #endif /* TRACEPOINT_H */