xref: /dflybsd-src/contrib/gdb-7/gdb/stap-probe.h (revision de8e141f24382815c10a4012d209bbbf7abf1112)
1*ef5ccd6cSJohn Marino /* SystemTap probe support for GDB.
2*ef5ccd6cSJohn Marino 
3*ef5ccd6cSJohn Marino    Copyright (C) 2012-2013 Free Software Foundation, Inc.
4*ef5ccd6cSJohn Marino 
5*ef5ccd6cSJohn Marino    This file is part of GDB.
6*ef5ccd6cSJohn Marino 
7*ef5ccd6cSJohn Marino    This program is free software; you can redistribute it and/or modify
8*ef5ccd6cSJohn Marino    it under the terms of the GNU General Public License as published by
9*ef5ccd6cSJohn Marino    the Free Software Foundation; either version 3 of the License, or
10*ef5ccd6cSJohn Marino    (at your option) any later version.
11*ef5ccd6cSJohn Marino 
12*ef5ccd6cSJohn Marino    This program is distributed in the hope that it will be useful,
13*ef5ccd6cSJohn Marino    but WITHOUT ANY WARRANTY; without even the implied warranty of
14*ef5ccd6cSJohn Marino    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15*ef5ccd6cSJohn Marino    GNU General Public License for more details.
16*ef5ccd6cSJohn Marino 
17*ef5ccd6cSJohn Marino    You should have received a copy of the GNU General Public License
18*ef5ccd6cSJohn Marino    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19*ef5ccd6cSJohn Marino 
20*ef5ccd6cSJohn Marino #if !defined (STAP_PROBE_H)
21*ef5ccd6cSJohn Marino #define STAP_PROBE_H 1
22*ef5ccd6cSJohn Marino 
23*ef5ccd6cSJohn Marino /* Structure which holds information about the parsing process of one probe's
24*ef5ccd6cSJohn Marino    argument.  */
25*ef5ccd6cSJohn Marino 
26*ef5ccd6cSJohn Marino struct stap_parse_info
27*ef5ccd6cSJohn Marino {
28*ef5ccd6cSJohn Marino   /* The probe's argument in a string format.  */
29*ef5ccd6cSJohn Marino   const char *arg;
30*ef5ccd6cSJohn Marino 
31*ef5ccd6cSJohn Marino   /* A pointer to the full chain of arguments.  This is useful for printing
32*ef5ccd6cSJohn Marino      error messages.  The parser functions should not modify this argument
33*ef5ccd6cSJohn Marino      directly; instead, they should use the ARG pointer above.  */
34*ef5ccd6cSJohn Marino   const char *saved_arg;
35*ef5ccd6cSJohn Marino 
36*ef5ccd6cSJohn Marino   /* The expected argument type (bitness), as defined in the probe's
37*ef5ccd6cSJohn Marino      argument.  For instance, if the argument begins with `-8@', it means
38*ef5ccd6cSJohn Marino      the bitness is 64-bit signed.  In this case, ARG_TYPE would represent
39*ef5ccd6cSJohn Marino      the type `int64_t'.  */
40*ef5ccd6cSJohn Marino   struct type *arg_type;
41*ef5ccd6cSJohn Marino 
42*ef5ccd6cSJohn Marino   /* A pointer to the current gdbarch.  */
43*ef5ccd6cSJohn Marino   struct gdbarch *gdbarch;
44*ef5ccd6cSJohn Marino 
45*ef5ccd6cSJohn Marino   /* Greater than zero if we are inside a parenthesized expression.  Useful
46*ef5ccd6cSJohn Marino      for knowing when to skip spaces or not.  */
47*ef5ccd6cSJohn Marino   int inside_paren_p;
48*ef5ccd6cSJohn Marino };
49*ef5ccd6cSJohn Marino 
50*ef5ccd6cSJohn Marino #endif /* !defined (STAP_PROBE_H) */
51