Create CVS files tracepoint.c and tracepoint.h. This is new work,
[binutils-gdb.git] / gdb / tracepoint.h
1 /* Data structures associated with tracepoints in GDB.
2 Copyright (C) 1997 Free Software Foundation, Inc.
3
4 This file is part of GDB.
5
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.
10
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.
15
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. */
19
20 #if !defined (TRACEPOINT_H)
21 #define TRACEPOINT_H 1
22
23 enum enabled { disabled, enabled };
24
25 /* The data structure for an action: */
26 struct action_line
27 {
28 struct action_line *next;
29 char *action;
30 };
31
32 /* The data structure for a tracepoint: */
33
34 struct tracepoint
35 {
36 struct tracepoint *next;
37
38 enum enabled enabled;
39
40 #if 0
41 /* Type of tracepoint (MVS FIXME: needed?). */
42 enum tptype type;
43
44 /* What to do with this tracepoint after we hit it MVS FIXME: needed?). */
45 enum tpdisp disposition;
46 #endif
47 /* Number assigned to distinguish tracepoints. */
48 int number;
49
50 /* Address to trace at, or NULL if not an instruction tracepoint (MVS ?). */
51 CORE_ADDR address;
52
53 /* Line number of this address. Only matters if address is non-NULL. */
54 int line_number;
55
56 /* Source file name of this address. Only matters if address is non-NULL. */
57 char *source_file;
58
59 /* Number of times this tracepoint should single-step
60 and collect additional data */
61 long step_count;
62
63 /* Number of times this tracepoint should be hit before disabling/ending. */
64 int pass_count;
65
66 /* Chain of action lines to execute when this tracepoint is hit. */
67 struct action_line *actions;
68
69 /* Conditional (MVS ?). */
70 struct expression *cond;
71
72 /* String we used to set the tracepoint (malloc'd). Only matters if
73 address is non-NULL. */
74 char *addr_string;
75
76 /* Language we used to set the tracepoint. */
77 enum language language;
78
79 /* Input radix we used to set the tracepoint. */
80 int input_radix;
81
82 /* String form of the tracepoint trigger condition (malloc'd),
83 or NULL if there is no condition. */
84 char *cond_string;
85
86 /* Count of the number of times this tracepoint was taken, dumped
87 with the info, but not used for anything else. Useful for
88 seeing how many times you hit a tracepoint prior to the program
89 aborting, so you can back up to just before the abort. */
90 int hit_count;
91
92 /* Thread number for thread-specific breakpoint, or -1 if don't care */
93 int thread;
94 };
95
96
97 #endif /* TRACEPOINT_H */