gdb/compile/compile.h - gdb

Macros defined

Source code

  1. /* Header file for Compile and inject module.

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

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

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

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

  13. #ifndef GDB_COMPILE_H
  14. #define GDB_COMPILE_H

  15. struct ui_file;
  16. struct gdbarch;
  17. struct dwarf2_per_cu_data;
  18. struct symbol;
  19. struct dynamic_prop;

  20. /* Public function that is called from compile_control case in the
  21.    expression command.  GDB returns either a CMD, or a CMD_STRING, but
  22.    never both.  */

  23. extern void eval_compile_command (struct command_line *cmd, char *cmd_string,
  24.                                   enum compile_i_scope_types scope);

  25. /* Compile a DWARF location expression to C, suitable for use by the
  26.    compiler.

  27.    STREAM is the stream where the code should be written.

  28.    RESULT_NAME is the name of a variable in the resulting C code.  The
  29.    result of the expression will be assigned to this variable.

  30.    SYM is the symbol corresponding to this expression.
  31.    PC is the location at which the expression is being evaluated.
  32.    ARCH is the architecture to use.

  33.    REGISTERS_USED is an out parameter which is updated to note which
  34.    registers were needed by this expression.

  35.    ADDR_SIZE is the DWARF address size to use.

  36.    OPT_PTR and OP_END are the bounds of the DWARF expression.

  37.    PER_CU is the per-CU object used for looking up various other
  38.    things.  */

  39. extern void compile_dwarf_expr_to_c (struct ui_file *stream,
  40.                                      const char *result_name,
  41.                                      struct symbol *sym,
  42.                                      CORE_ADDR pc,
  43.                                      struct gdbarch *arch,
  44.                                      unsigned char *registers_used,
  45.                                      unsigned int addr_size,
  46.                                      const gdb_byte *op_ptr,
  47.                                      const gdb_byte *op_end,
  48.                                      struct dwarf2_per_cu_data *per_cu);

  49. /* Compile a DWARF bounds expression to C, suitable for use by the
  50.    compiler.

  51.    STREAM is the stream where the code should be written.

  52.    RESULT_NAME is the name of a variable in the resulting C code.  The
  53.    result of the expression will be assigned to this variable.

  54.    PROP is the dynamic property for which we're compiling.

  55.    SYM is the symbol corresponding to this expression.
  56.    PC is the location at which the expression is being evaluated.
  57.    ARCH is the architecture to use.

  58.    REGISTERS_USED is an out parameter which is updated to note which
  59.    registers were needed by this expression.

  60.    ADDR_SIZE is the DWARF address size to use.

  61.    OPT_PTR and OP_END are the bounds of the DWARF expression.

  62.    PER_CU is the per-CU object used for looking up various other
  63.    things.  */

  64. extern void compile_dwarf_bounds_to_c (struct ui_file *stream,
  65.                                        const char *result_name,
  66.                                        const struct dynamic_prop *prop,
  67.                                        struct symbol *sym, CORE_ADDR pc,
  68.                                        struct gdbarch *arch,
  69.                                        unsigned char *registers_used,
  70.                                        unsigned int addr_size,
  71.                                        const gdb_byte *op_ptr,
  72.                                        const gdb_byte *op_end,
  73.                                        struct dwarf2_per_cu_data *per_cu);

  74. #endif /* GDB_COMPILE_H */