gdb/stap-probe.h - gdb

Data types defined

Macros defined

Source code

  1. /* SystemTap probe support for GDB.

  2.    Copyright (C) 2012-2015 Free Software Foundation, Inc.

  3.    This file is part of GDB.

  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 3 of the License, or
  7.    (at your option) any later version.

  8.    This program is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.    GNU General Public License for more details.

  12.    You should have received a copy of the GNU General Public License
  13.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  14. #if !defined (STAP_PROBE_H)
  15. #define STAP_PROBE_H 1

  16. /* For `struct parser_state'.  */
  17. #include "parser-defs.h"

  18. /* Structure which holds information about the parsing process of one probe's
  19.    argument.  */

  20. struct stap_parse_info
  21. {
  22.   /* The probe's argument in a string format.  */
  23.   const char *arg;

  24.   /* The parser state to be used when generating the expression.  */
  25.   struct parser_state pstate;

  26.   /* A pointer to the full chain of arguments.  This is useful for printing
  27.      error messages.  The parser functions should not modify this argument
  28.      directly; instead, they should use the ARG pointer above.  */
  29.   const char *saved_arg;

  30.   /* The expected argument type (bitness), as defined in the probe's
  31.      argument.  For instance, if the argument begins with `-8@', it means
  32.      the bitness is 64-bit signed.  In this case, ARG_TYPE would represent
  33.      the type `int64_t'.  */
  34.   struct type *arg_type;

  35.   /* A pointer to the current gdbarch.  */
  36.   struct gdbarch *gdbarch;

  37.   /* Greater than zero if we are inside a parenthesized expression.  Useful
  38.      for knowing when to skip spaces or not.  */
  39.   int inside_paren_p;
  40. };

  41. #endif /* !defined (STAP_PROBE_H) */