the "compile" command
[deliverable/binutils-gdb.git] / gdb / compile / compile.h
CommitLineData
bb2ec1b3
TT
1/* Header file for Compile and inject module.
2
3 Copyright (C) 2014 Free Software Foundation, Inc.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17
18#ifndef GDB_COMPILE_H
19#define GDB_COMPILE_H
20
21struct ui_file;
22struct gdbarch;
23struct dwarf2_per_cu_data;
24struct symbol;
25struct dynamic_prop;
26
27/* Public function that is called from compile_control case in the
28 expression command. GDB returns either a CMD, or a CMD_STRING, but
29 never both. */
30
31extern void eval_compile_command (struct command_line *cmd, char *cmd_string,
32 enum compile_i_scope_types scope);
33
34/* Compile a DWARF location expression to C, suitable for use by the
35 compiler.
36
37 STREAM is the stream where the code should be written.
38
39 RESULT_NAME is the name of a variable in the resulting C code. The
40 result of the expression will be assigned to this variable.
41
42 SYM is the symbol corresponding to this expression.
43 PC is the location at which the expression is being evaluated.
44 ARCH is the architecture to use.
45
46 REGISTERS_USED is an out parameter which is updated to note which
47 registers were needed by this expression.
48
49 ADDR_SIZE is the DWARF address size to use.
50
51 OPT_PTR and OP_END are the bounds of the DWARF expression.
52
53 PER_CU is the per-CU object used for looking up various other
54 things. */
55
56extern void compile_dwarf_expr_to_c (struct ui_file *stream,
57 const char *result_name,
58 struct symbol *sym,
59 CORE_ADDR pc,
60 struct gdbarch *arch,
61 unsigned char *registers_used,
62 unsigned int addr_size,
63 const gdb_byte *op_ptr,
64 const gdb_byte *op_end,
65 struct dwarf2_per_cu_data *per_cu);
66
67/* Compile a DWARF bounds expression to C, suitable for use by the
68 compiler.
69
70 STREAM is the stream where the code should be written.
71
72 RESULT_NAME is the name of a variable in the resulting C code. The
73 result of the expression will be assigned to this variable.
74
75 PROP is the dynamic property for which we're compiling.
76
77 SYM is the symbol corresponding to this expression.
78 PC is the location at which the expression is being evaluated.
79 ARCH is the architecture to use.
80
81 REGISTERS_USED is an out parameter which is updated to note which
82 registers were needed by this expression.
83
84 ADDR_SIZE is the DWARF address size to use.
85
86 OPT_PTR and OP_END are the bounds of the DWARF expression.
87
88 PER_CU is the per-CU object used for looking up various other
89 things. */
90
91extern void compile_dwarf_bounds_to_c (struct ui_file *stream,
92 const char *result_name,
93 const struct dynamic_prop *prop,
94 struct symbol *sym, CORE_ADDR pc,
95 struct gdbarch *arch,
96 unsigned char *registers_used,
97 unsigned int addr_size,
98 const gdb_byte *op_ptr,
99 const gdb_byte *op_end,
100 struct dwarf2_per_cu_data *per_cu);
101
102#endif /* GDB_COMPILE_H */
This page took 0.026834 seconds and 4 git commands to generate.