gdb, testsuite: Fix return value in gdb.base/foll-fork.exp
[binutils-gdb.git] / gdb / stap-probe.h
blob1401b876ba7af18b2b899b6731ba8dc2aea16ce9
1 /* SystemTap probe support for GDB.
3 Copyright (C) 2012-2024 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 (STAP_PROBE_H)
21 #define STAP_PROBE_H 1
23 #include "parser-defs.h"
25 /* Structure which holds information about the parsing process of one probe's
26 argument. */
28 struct stap_parse_info
30 stap_parse_info (const char *arg_, struct type *arg_type_,
31 const struct language_defn *lang,
32 struct gdbarch *gdbarch)
33 : arg (arg_),
34 pstate (lang, gdbarch),
35 saved_arg (arg_),
36 arg_type (arg_type_),
37 gdbarch (gdbarch),
38 inside_paren_p (0)
42 DISABLE_COPY_AND_ASSIGN (stap_parse_info);
44 /* The probe's argument in a string format. */
45 const char *arg;
47 /* The parser state to be used when generating the expression. */
48 struct expr_builder pstate;
50 /* A pointer to the full chain of arguments. This is useful for printing
51 error messages. The parser functions should not modify this argument
52 directly; instead, they should use the ARG pointer above. */
53 const char *saved_arg;
55 /* The expected argument type (bitness), as defined in the probe's
56 argument. For instance, if the argument begins with `-8@', it means
57 the bitness is 64-bit signed. In this case, ARG_TYPE would represent
58 the type `int64_t'. */
59 struct type *arg_type;
61 /* A pointer to the current gdbarch. */
62 struct gdbarch *gdbarch;
64 /* Greater than zero if we are inside a parenthesized expression. Useful
65 for knowing when to skip spaces or not. */
66 int inside_paren_p;
69 #endif /* !defined (STAP_PROBE_H) */