GDB (xrefs)

compile.h
Go to the documentation of this file.
1 /* Header file for Compile and inject module.
2
3 Copyright (C) 2014-2018 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
21 struct ui_file;
22 struct gdbarch;
23 struct dwarf2_per_cu_data;
24 struct symbol;
25 struct 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
31 extern void eval_compile_command (struct command_line *cmd,
32 const char *cmd_string,
33 enum compile_i_scope_types scope,
34 void *scope_data);
35
36 /* Compile a DWARF location expression to C, suitable for use by the
37 compiler.
38
39 STREAM is the stream where the code should be written.
40
41 RESULT_NAME is the name of a variable in the resulting C code. The
42 result of the expression will be assigned to this variable.
43
44 SYM is the symbol corresponding to this expression.
45 PC is the location at which the expression is being evaluated.
46 ARCH is the architecture to use.
47
48 REGISTERS_USED is an out parameter which is updated to note which
49 registers were needed by this expression.
50
51 ADDR_SIZE is the DWARF address size to use.
52
53 OPT_PTR and OP_END are the bounds of the DWARF expression.
54
55 PER_CU is the per-CU object used for looking up various other
56 things. */
57
58 extern void compile_dwarf_expr_to_c (string_file &stream,
59 const char *result_name,
60 struct symbol *sym,
61 CORE_ADDR pc,
62 struct gdbarch *arch,
63 unsigned char *registers_used,
64 unsigned int addr_size,
65 const gdb_byte *op_ptr,
66 const gdb_byte *op_end,
67 struct dwarf2_per_cu_data *per_cu);
68
69 /* Compile a DWARF bounds expression to C, suitable for use by the
70 compiler.
71
72 STREAM is the stream where the code should be written.
73
74 RESULT_NAME is the name of a variable in the resulting C code. The
75 result of the expression will be assigned to this variable.
76
77 PROP is the dynamic property for which we're compiling.
78
79 SYM is the symbol corresponding to this expression.
80 PC is the location at which the expression is being evaluated.
81 ARCH is the architecture to use.
82
83 REGISTERS_USED is an out parameter which is updated to note which
84 registers were needed by this expression.
85
86 ADDR_SIZE is the DWARF address size to use.
87
88 OPT_PTR and OP_END are the bounds of the DWARF expression.
89
90 PER_CU is the per-CU object used for looking up various other
91 things. */
92
93 extern void compile_dwarf_bounds_to_c (string_file &stream,
94 const char *result_name,
95 const struct dynamic_prop *prop,
96 struct symbol *sym, CORE_ADDR pc,
97 struct gdbarch *arch,
98 unsigned char *registers_used,
99 unsigned int addr_size,
100 const gdb_byte *op_ptr,
101 const gdb_byte *op_end,
102 struct dwarf2_per_cu_data *per_cu);
103
104 extern void compile_print_value (struct value *val, void *data_voidp);
105
106 #endif /* GDB_COMPILE_H */
gdbarch
Definition: gdbarch.c:127
command_line
Definition: cli-script.h:51
compile_dwarf_expr_to_c
void compile_dwarf_expr_to_c(string_file &stream, const char *result_name, struct symbol *sym, CORE_ADDR pc, struct gdbarch *arch, unsigned char *registers_used, unsigned int addr_size, const gdb_byte *op_ptr, const gdb_byte *op_end, struct dwarf2_per_cu_data *per_cu)
Definition: compile-loc2c.c:1118
CORE_ADDR
bfd_vma CORE_ADDR
Definition: common-types.h:41
compile_i_scope_types
compile_i_scope_types
Definition: defs.h:61
dynamic_prop
Definition: gdbtypes.h:398
ui_file
Definition: ui-file.h:26
compile_dwarf_bounds_to_c
void compile_dwarf_bounds_to_c(string_file &stream, const char *result_name, const struct dynamic_prop *prop, struct symbol *sym, CORE_ADDR pc, struct gdbarch *arch, unsigned char *registers_used, unsigned int addr_size, const gdb_byte *op_ptr, const gdb_byte *op_end, struct dwarf2_per_cu_data *per_cu)
Definition: compile-loc2c.c:1133
compile_print_value
void compile_print_value(struct value *val, void *data_voidp)
Definition: compile.c:161
value
Definition: value.c:169
gdb_byte
bfd_byte gdb_byte
Definition: common-types.h:38
eval_compile_command
void eval_compile_command(struct command_line *cmd, const char *cmd_string, enum compile_i_scope_types scope, void *scope_data)
Definition: compile.c:622
symbol
Definition: symtab.h:1049
dwarf2_per_cu_data
Definition: dwarf2read.c:781
string_file
Definition: ui-file.h:106