GDB (xrefs)
Loading...
Searching...
No Matches
compile-c-symbols.c
Go to the documentation of this file.
1/* Convert symbols from GDB to GCC
2
3 Copyright (C) 2014-2023 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20
21#include "defs.h"
22#include "compile-internal.h"
23#include "compile-c.h"
24#include "symtab.h"
25#include "parser-defs.h"
26#include "block.h"
27#include "objfiles.h"
28#include "compile.h"
29#include "value.h"
30#include "exceptions.h"
31#include "gdbtypes.h"
32#include "dwarf2/loc.h"
33
34
35
36/* Compute the name of the pointer representing a local symbol's
37 address. */
38
39gdb::unique_xmalloc_ptr<char>
41{
42 return gdb::unique_xmalloc_ptr<char>
43 (concat ("__", sym->natural_name (), "_ptr", (char *) NULL));
44}
45
46/* Convert a given symbol, SYM, to the compiler's representation.
47 CONTEXT is the compiler instance. IS_GLOBAL is true if the
48 symbol came from the global scope. IS_LOCAL is true if the symbol
49 came from a local scope. (Note that the two are not strictly
50 inverses because the symbol might have come from the static
51 scope.) */
52
53static void
55 struct block_symbol sym,
56 int is_global,
57 int is_local)
58{
59 gcc_type sym_type;
60 const char *filename = sym.symbol->symtab ()->filename;
61 unsigned int line = sym.symbol->line ();
62
63 context->error_symbol_once (sym.symbol);
64
65 if (sym.symbol->aclass () == LOC_LABEL)
66 sym_type = 0;
67 else
68 sym_type = context->convert_type (sym.symbol->type ());
69
70 if (sym.symbol->domain () == STRUCT_DOMAIN)
71 {
72 /* Binding a tag, so we don't need to build a decl. */
73 context->plugin ().tagbind (sym.symbol->natural_name (),
74 sym_type, filename, line);
75 }
76 else
77 {
78 gcc_decl decl;
79 enum gcc_c_symbol_kind kind;
80 CORE_ADDR addr = 0;
81 gdb::unique_xmalloc_ptr<char> symbol_name;
82
83 switch (sym.symbol->aclass ())
84 {
85 case LOC_TYPEDEF:
86 kind = GCC_C_SYMBOL_TYPEDEF;
87 break;
88
89 case LOC_LABEL:
90 kind = GCC_C_SYMBOL_LABEL;
91 addr = sym.symbol->value_address ();
92 break;
93
94 case LOC_BLOCK:
95 kind = GCC_C_SYMBOL_FUNCTION;
96 addr = sym.symbol->value_block ()->entry_pc ();
97 if (is_global && sym.symbol->type ()->is_gnu_ifunc ())
98 addr = gnu_ifunc_resolve_addr (target_gdbarch (), addr);
99 break;
100
101 case LOC_CONST:
102 if (sym.symbol->type ()->code () == TYPE_CODE_ENUM)
103 {
104 /* Already handled by convert_enum. */
105 return;
106 }
107 context->plugin ().build_constant
108 (sym_type, sym.symbol->natural_name (),
109 sym.symbol->value_longest (),
110 filename, line);
111 return;
112
113 case LOC_CONST_BYTES:
114 error (_("Unsupported LOC_CONST_BYTES for symbol \"%s\"."),
115 sym.symbol->print_name ());
116
117 case LOC_UNDEF:
118 internal_error (_("LOC_UNDEF found for \"%s\"."),
119 sym.symbol->print_name ());
120
121 case LOC_COMMON_BLOCK:
122 error (_("Fortran common block is unsupported for compilation "
123 "evaluaton of symbol \"%s\"."),
124 sym.symbol->print_name ());
125
127 error (_("Symbol \"%s\" cannot be used for compilation evaluation "
128 "as it is optimized out."),
129 sym.symbol->print_name ());
130
131 case LOC_COMPUTED:
132 if (is_local)
133 goto substitution;
134 /* Probably TLS here. */
135 warning (_("Symbol \"%s\" is thread-local and currently can only "
136 "be referenced from the current thread in "
137 "compiled code."),
138 sym.symbol->print_name ());
139 /* FALLTHROUGH */
140 case LOC_UNRESOLVED:
141 /* 'symbol_name' cannot be used here as that one is used only for
142 local variables from compile_dwarf_expr_to_c.
143 Global variables can be accessed by GCC only by their address, not
144 by their name. */
145 {
146 struct value *val;
147 frame_info_ptr frame = NULL;
148
150 {
151 frame = get_selected_frame (NULL);
152 if (frame == NULL)
153 error (_("Symbol \"%s\" cannot be used because "
154 "there is no selected frame"),
155 sym.symbol->print_name ());
156 }
157
158 val = read_var_value (sym.symbol, sym.block, frame);
159 if (val->lval () != lval_memory)
160 error (_("Symbol \"%s\" cannot be used for compilation "
161 "evaluation as its address has not been found."),
162 sym.symbol->print_name ());
163
164 kind = GCC_C_SYMBOL_VARIABLE;
165 addr = val->address ();
166 }
167 break;
168
169
170 case LOC_REGISTER:
171 case LOC_ARG:
172 case LOC_REF_ARG:
173 case LOC_REGPARM_ADDR:
174 case LOC_LOCAL:
175 substitution:
176 kind = GCC_C_SYMBOL_VARIABLE;
177 symbol_name = c_symbol_substitution_name (sym.symbol);
178 break;
179
180 case LOC_STATIC:
181 kind = GCC_C_SYMBOL_VARIABLE;
182 addr = sym.symbol->value_address ();
183 break;
184
185 case LOC_FINAL_VALUE:
186 default:
187 gdb_assert_not_reached ("Unreachable case in convert_one_symbol.");
188
189 }
190
191 /* Don't emit local variable decls for a raw expression. */
192 if (context->scope () != COMPILE_I_RAW_SCOPE
193 || symbol_name == NULL)
194 {
195 decl = context->plugin ().build_decl
196 (sym.symbol->natural_name (),
197 kind,
198 sym_type,
199 symbol_name.get (), addr,
200 filename, line);
201
202 context->plugin ().bind (decl, is_global);
203 }
204 }
205}
206
207/* Convert a full symbol to its gcc form. CONTEXT is the compiler to
208 use, IDENTIFIER is the name of the symbol, SYM is the symbol
209 itself, and DOMAIN is the domain which was searched. */
210
211static void
212convert_symbol_sym (compile_c_instance *context, const char *identifier,
213 struct block_symbol sym, domain_enum domain)
214{
215 int is_local_symbol;
216
217 /* If we found a symbol and it is not in the static or global
218 scope, then we should first convert any static or global scope
219 symbol of the same name. This lets this unusual case work:
220
221 int x; // Global.
222 int func(void)
223 {
224 int x;
225 // At this spot, evaluate "extern int x; x"
226 }
227 */
228
229 const struct block *static_block = nullptr;
230 if (sym.block != nullptr)
232 /* STATIC_BLOCK is NULL if FOUND_BLOCK is the global block. */
233 is_local_symbol = (sym.block != static_block && static_block != NULL);
234 if (is_local_symbol)
235 {
236 struct block_symbol global_sym;
237
238 global_sym = lookup_symbol (identifier, NULL, domain, NULL);
239 /* If the outer symbol is in the static block, we ignore it, as
240 it cannot be referenced. */
241 if (global_sym.symbol != NULL
242 && global_sym.block != global_sym.block->static_block ())
243 {
244 if (compile_debug)
246 "gcc_convert_symbol \"%s\": global symbol\n",
247 identifier);
248 convert_one_symbol (context, global_sym, 1, 0);
249 }
250 }
251
252 if (compile_debug)
254 "gcc_convert_symbol \"%s\": local symbol\n",
255 identifier);
256 convert_one_symbol (context, sym, 0, is_local_symbol);
257}
258
259/* Convert a minimal symbol to its gcc form. CONTEXT is the compiler
260 to use and BMSYM is the minimal symbol to convert. */
261
262static void
264 struct bound_minimal_symbol bmsym)
265{
266 struct minimal_symbol *msym = bmsym.minsym;
267 struct objfile *objfile = bmsym.objfile;
268 struct type *type;
269 enum gcc_c_symbol_kind kind;
270 gcc_type sym_type;
271 gcc_decl decl;
272 CORE_ADDR addr;
273
274 addr = msym->value_address (objfile);
275
276 /* Conversion copied from write_exp_msymbol. */
277 switch (msym->type ())
278 {
279 case mst_text:
280 case mst_file_text:
283 kind = GCC_C_SYMBOL_FUNCTION;
284 break;
285
288 kind = GCC_C_SYMBOL_FUNCTION;
289 addr = gnu_ifunc_resolve_addr (target_gdbarch (), addr);
290 break;
291
292 case mst_data:
293 case mst_file_data:
294 case mst_bss:
295 case mst_file_bss:
297 kind = GCC_C_SYMBOL_VARIABLE;
298 break;
299
300 case mst_slot_got_plt:
302 kind = GCC_C_SYMBOL_FUNCTION;
303 break;
304
305 default:
307 kind = GCC_C_SYMBOL_VARIABLE;
308 break;
309 }
310
311 sym_type = context->convert_type (type);
312 decl = context->plugin ().build_decl (msym->natural_name (),
313 kind, sym_type, NULL, addr,
314 NULL, 0);
315 context->plugin ().bind (decl, 1 /* is_global */);
316}
317
318/* See compile-internal.h. */
319
320void
322 struct gcc_c_context *gcc_context,
323 enum gcc_c_oracle_request request,
324 const char *identifier)
325{
326 compile_c_instance *context
327 = static_cast<compile_c_instance *> (datum);
328 domain_enum domain;
329 int found = 0;
330
331 switch (request)
332 {
333 case GCC_C_ORACLE_SYMBOL:
334 domain = VAR_DOMAIN;
335 break;
336 case GCC_C_ORACLE_TAG:
337 domain = STRUCT_DOMAIN;
338 break;
339 case GCC_C_ORACLE_LABEL:
340 domain = LABEL_DOMAIN;
341 break;
342 default:
343 gdb_assert_not_reached ("Unrecognized oracle request.");
344 }
345
346 /* We can't allow exceptions to escape out of this callback. Safest
347 is to simply emit a gcc error. */
348 try
349 {
350 struct block_symbol sym;
351
352 sym = lookup_symbol (identifier, context->block (), domain, NULL);
353 if (sym.symbol != NULL)
354 {
355 convert_symbol_sym (context, identifier, sym, domain);
356 found = 1;
357 }
358 else if (domain == VAR_DOMAIN)
359 {
360 struct bound_minimal_symbol bmsym;
361
362 bmsym = lookup_minimal_symbol (identifier, NULL, NULL);
363 if (bmsym.minsym != NULL)
364 {
365 convert_symbol_bmsym (context, bmsym);
366 found = 1;
367 }
368 }
369 }
370
371 catch (const gdb_exception &e)
372 {
373 context->plugin ().error (e.what ());
374 }
375
376 if (compile_debug && !found)
378 "gcc_convert_symbol \"%s\": lookup_symbol failed\n",
379 identifier);
380 return;
381}
382
383/* See compile-internal.h. */
384
385gcc_address
386gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context,
387 const char *identifier)
388{
389 compile_c_instance *context
390 = static_cast<compile_c_instance *> (datum);
391 gcc_address result = 0;
392 int found = 0;
393
394 /* We can't allow exceptions to escape out of this callback. Safest
395 is to simply emit a gcc error. */
396 try
397 {
398 struct symbol *sym;
399
400 /* We only need global functions here. */
401 sym = lookup_symbol (identifier, NULL, VAR_DOMAIN, NULL).symbol;
402 if (sym != NULL && sym->aclass () == LOC_BLOCK)
403 {
404 if (compile_debug)
406 "gcc_symbol_address \"%s\": full symbol\n",
407 identifier);
408 result = sym->value_block ()->entry_pc ();
409 if (sym->type ()->is_gnu_ifunc ())
410 result = gnu_ifunc_resolve_addr (target_gdbarch (), result);
411 found = 1;
412 }
413 else
414 {
415 struct bound_minimal_symbol msym;
416
417 msym = lookup_bound_minimal_symbol (identifier);
418 if (msym.minsym != NULL)
419 {
420 if (compile_debug)
422 "gcc_symbol_address \"%s\": minimal "
423 "symbol\n",
424 identifier);
425 result = msym.value_address ();
426 if (msym.minsym->type () == mst_text_gnu_ifunc)
427 result = gnu_ifunc_resolve_addr (target_gdbarch (), result);
428 found = 1;
429 }
430 }
431 }
432
433 catch (const gdb_exception_error &e)
434 {
435 context->plugin ().error (e.what ());
436 }
437
438 if (compile_debug && !found)
440 "gcc_symbol_address \"%s\": failed\n",
441 identifier);
442 return result;
443}
444
445
446
447/* A hash function for symbol names. */
448
449static hashval_t
450hash_symname (const void *a)
451{
452 const struct symbol *sym = (const struct symbol *) a;
453
454 return htab_hash_string (sym->natural_name ());
455}
456
457/* A comparison function for hash tables that just looks at symbol
458 names. */
459
460static int
461eq_symname (const void *a, const void *b)
462{
463 const struct symbol *syma = (const struct symbol *) a;
464 const struct symbol *symb = (const struct symbol *) b;
465
466 return strcmp (syma->natural_name (), symb->natural_name ()) == 0;
467}
468
469/* If a symbol with the same name as SYM is already in HASHTAB, return
470 1. Otherwise, add SYM to HASHTAB and return 0. */
471
472static int
473symbol_seen (htab_t hashtab, struct symbol *sym)
474{
475 void **slot;
476
477 slot = htab_find_slot (hashtab, sym, INSERT);
478 if (*slot != NULL)
479 return 1;
480
481 *slot = sym;
482 return 0;
483}
484
485/* Generate C code to compute the length of a VLA. */
486
487static void
489 string_file *stream,
490 struct gdbarch *gdbarch,
491 std::vector<bool> &registers_used,
492 CORE_ADDR pc,
493 struct type *type,
494 struct symbol *sym)
495{
497
500
501 switch (type->code ())
502 {
503 case TYPE_CODE_RANGE:
504 {
505 if (type->bounds ()->high.kind () == PROP_LOCEXPR
506 || type->bounds ()->high.kind () == PROP_LOCLIST)
507 {
508 const struct dynamic_prop *prop = &type->bounds ()->high;
509 std::string name = c_get_range_decl_name (prop);
510
512 gdbarch, registers_used,
513 prop, pc, sym);
514 }
515 }
516 break;
517
518 case TYPE_CODE_ARRAY:
519 generate_vla_size (compiler, stream, gdbarch, registers_used, pc,
520 type->index_type (), sym);
521 generate_vla_size (compiler, stream, gdbarch, registers_used, pc,
522 type->target_type (), sym);
523 break;
524
525 case TYPE_CODE_UNION:
526 case TYPE_CODE_STRUCT:
527 {
528 int i;
529
530 for (i = 0; i < type->num_fields (); ++i)
531 if (!type->field (i).is_static ())
532 generate_vla_size (compiler, stream, gdbarch, registers_used, pc,
533 type->field (i).type (), sym);
534 }
535 break;
536 }
537}
538
539/* Generate C code to compute the address of SYM. */
540
541static void
543 string_file *stream,
544 struct gdbarch *gdbarch,
545 std::vector<bool> &registers_used,
546 CORE_ADDR pc,
547 struct symbol *sym)
548{
549
550 try
551 {
552 if (is_dynamic_type (sym->type ()))
553 {
554 /* We need to emit to a temporary buffer in case an error
555 occurs in the middle. */
556 string_file local_file;
557
558 generate_vla_size (compiler, &local_file, gdbarch, registers_used, pc,
559 sym->type (), sym);
560
561 stream->write (local_file.c_str (), local_file.size ());
562 }
563
564 if (SYMBOL_COMPUTED_OPS (sym) != NULL)
565 {
566 gdb::unique_xmalloc_ptr<char> generated_name
568 /* We need to emit to a temporary buffer in case an error
569 occurs in the middle. */
570 string_file local_file;
571
572 SYMBOL_COMPUTED_OPS (sym)->generate_c_location (sym, &local_file,
573 gdbarch,
574 registers_used,
575 pc,
576 generated_name.get ());
577 stream->write (local_file.c_str (), local_file.size ());
578 }
579 else
580 {
581 switch (sym->aclass ())
582 {
583 case LOC_REGISTER:
584 case LOC_ARG:
585 case LOC_REF_ARG:
586 case LOC_REGPARM_ADDR:
587 case LOC_LOCAL:
588 error (_("Local symbol unhandled when generating C code."));
589
590 case LOC_COMPUTED:
591 gdb_assert_not_reached ("LOC_COMPUTED variable "
592 "missing a method.");
593
594 default:
595 /* Nothing to do for all other cases, as they don't represent
596 local variables. */
597 break;
598 }
599 }
600 }
601
602 catch (const gdb_exception_error &e)
603 {
604 compiler->insert_symbol_error (sym, e.what ());
605 }
606}
607
608/* See compile-c.h. */
609
610std::vector<bool>
612 string_file *stream,
613 struct gdbarch *gdbarch,
614 const struct block *block,
615 CORE_ADDR pc)
616{
617 if (block == nullptr)
618 return {};
619
620 const struct block *static_block = block->static_block ();
621
622 /* If we're already in the static or global block, there is nothing
623 to write. */
624 if (static_block == NULL || block == static_block)
625 return {};
626
627 std::vector<bool> registers_used (gdbarch_num_regs (gdbarch));
628
629 /* Ensure that a given name is only entered once. This reflects the
630 reality of shadowing. */
631 htab_up symhash (htab_create_alloc (1, hash_symname, eq_symname, NULL,
632 xcalloc, xfree));
633
634 while (1)
635 {
636 /* Iterate over symbols in this block, generating code to
637 compute the location of each local variable. */
638 for (struct symbol *sym : block_iterator_range (block))
639 {
640 if (!symbol_seen (symhash.get (), sym))
641 generate_c_for_for_one_variable (compiler, stream, gdbarch,
642 registers_used, pc, sym);
643 }
644
645 /* If we just finished the outermost block of a function, we're
646 done. */
647 if (block->function () != NULL)
648 break;
649 block = block->superblock ();
650 }
651
652 return registers_used;
653}
const char *const name
void xfree(void *)
void * xcalloc(size_t number, size_t size)
Definition alloc.c:85
struct gdbarch * target_gdbarch(void)
iterator_range< block_iterator_wrapper > block_iterator_range
Definition block.h:553
gcc_c_plugin & plugin()
Definition compile-c.h:55
gcc_type convert_type(struct type *type)
void error_symbol_once(const struct symbol *sym)
Definition compile.c:225
void insert_symbol_error(const struct symbol *sym, const char *text)
Definition compile.c:204
enum compile_i_scope_types scope() const
Definition compile.h:105
const struct block * block() const
Definition compile.h:117
size_t size() const
Definition ui-file.h:223
void write(const char *buf, long length_buf) override
Definition ui-file.c:214
const char * c_str() const
Definition ui-file.h:222
std::string c_get_range_decl_name(const struct dynamic_prop *prop)
static void convert_symbol_bmsym(compile_c_instance *context, struct bound_minimal_symbol bmsym)
gdb::unique_xmalloc_ptr< char > c_symbol_substitution_name(struct symbol *sym)
static void generate_vla_size(compile_instance *compiler, string_file *stream, struct gdbarch *gdbarch, std::vector< bool > &registers_used, CORE_ADDR pc, struct type *type, struct symbol *sym)
static int symbol_seen(htab_t hashtab, struct symbol *sym)
static void convert_one_symbol(compile_c_instance *context, struct block_symbol sym, int is_global, int is_local)
static void convert_symbol_sym(compile_c_instance *context, const char *identifier, struct block_symbol sym, domain_enum domain)
std::vector< bool > generate_c_for_variable_locations(compile_instance *compiler, string_file *stream, struct gdbarch *gdbarch, const struct block *block, CORE_ADDR pc)
static void generate_c_for_for_one_variable(compile_instance *compiler, string_file *stream, struct gdbarch *gdbarch, std::vector< bool > &registers_used, CORE_ADDR pc, struct symbol *sym)
static hashval_t hash_symname(const void *a)
static int eq_symname(const void *a, const void *b)
gcc_c_oracle_function gcc_convert_symbol
gcc_c_symbol_address_function gcc_symbol_address
bool compile_debug
Definition compile.c:61
@ COMPILE_I_RAW_SCOPE
Definition defs.h:81
@ lval_memory
Definition defs.h:363
int symbol_read_needs_frame(struct symbol *sym)
Definition findvar.c:388
struct value * read_var_value(struct symbol *var, const struct block *var_block, frame_info_ptr frame)
Definition findvar.c:739
frame_info_ptr get_selected_frame(const char *message)
Definition frame.c:1888
int gdbarch_num_regs(struct gdbarch *gdbarch)
Definition gdbarch.c:1930
int is_dynamic_type(struct type *type)
Definition gdbtypes.c:2140
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
Definition gdbtypes.c:6168
struct type * check_typedef(struct type *type)
Definition gdbtypes.c:2966
@ PROP_LOCEXPR
Definition gdbtypes.h:278
@ PROP_LOCLIST
Definition gdbtypes.h:279
#define TYPE_IS_REFERENCE(t)
Definition gdbtypes.h:139
void dwarf2_compile_property_to_c(string_file *stream, const char *result_name, struct gdbarch *gdbarch, std::vector< bool > &registers_used, const struct dynamic_prop *prop, CORE_ADDR pc, struct symbol *sym)
Definition loc.c:1783
struct bound_minimal_symbol lookup_minimal_symbol(const char *name, const char *sfile, struct objfile *objf)
Definition minsyms.c:363
struct bound_minimal_symbol lookup_bound_minimal_symbol(const char *name)
Definition minsyms.c:481
enum var_types type
Definition scm-param.c:142
const struct block * block
Definition symtab.h:1537
struct symbol * symbol
Definition symtab.h:1533
Definition block.h:109
const block * superblock() const
Definition block.h:135
CORE_ADDR entry_pc() const
Definition block.h:195
const struct block * static_block() const
Definition block.c:354
symbol * function() const
Definition block.h:127
struct objfile * objfile
Definition minsyms.h:54
CORE_ADDR value_address() const
Definition minsyms.h:41
struct minimal_symbol * minsym
Definition minsyms.h:49
struct type * nodebug_text_gnu_ifunc_symbol
Definition gdbtypes.h:2171
struct type * nodebug_got_plt_symbol
Definition gdbtypes.h:2172
struct type * nodebug_data_symbol
Definition gdbtypes.h:2173
struct type * nodebug_unknown_symbol
Definition gdbtypes.h:2174
struct type * nodebug_text_symbol
Definition gdbtypes.h:2170
dynamic_prop_kind kind() const
Definition gdbtypes.h:320
struct type * type() const
Definition gdbtypes.h:547
bool is_static() const
Definition gdbtypes.h:593
const char * natural_name() const
Definition symtab.c:1056
const char * print_name() const
Definition symtab.h:475
minimal_symbol_type type() const
Definition symtab.h:770
CORE_ADDR value_address(objfile *objfile) const
Definition symtab.c:439
struct dynamic_prop high
Definition gdbtypes.h:721
const block * value_block() const
Definition symtab.h:1549
address_class aclass() const
Definition symtab.h:1274
struct type * type() const
Definition symtab.h:1331
domain_enum domain() const
Definition symtab.h:1286
LONGEST value_longest() const
Definition symtab.h:1351
unsigned int line() const
Definition symtab.h:1341
CORE_ADDR value_address() const
Definition symtab.h:1361
struct symtab * symtab
Definition symtab.h:1457
const char * filename
Definition symtab.h:1725
struct type * target_type() const
Definition gdbtypes.h:1037
type_code code() const
Definition gdbtypes.h:956
struct field & field(int idx) const
Definition gdbtypes.h:1012
bool is_gnu_ifunc() const
Definition gdbtypes.h:1216
unsigned int num_fields() const
Definition gdbtypes.h:994
range_bounds * bounds() const
Definition gdbtypes.h:1065
type * index_type() const
Definition gdbtypes.h:1032
Definition value.h:130
enum lval_type lval() const
Definition value.h:332
CORE_ADDR address
Definition value.h:658
struct block_symbol lookup_symbol(const char *name, const struct block *block, domain_enum domain, struct field_of_this_result *is_a_field_of_this)
Definition symtab.c:1964
@ LOC_STATIC
Definition symtab.h:979
@ LOC_BLOCK
Definition symtab.h:1028
@ LOC_LABEL
Definition symtab.h:1022
@ LOC_REGISTER
Definition symtab.h:993
@ LOC_REF_ARG
Definition symtab.h:1001
@ LOC_UNRESOLVED
Definition symtab.h:1057
@ LOC_LOCAL
Definition symtab.h:1013
@ LOC_CONST
Definition symtab.h:975
@ LOC_CONST_BYTES
Definition symtab.h:1033
@ LOC_UNDEF
Definition symtab.h:971
@ LOC_OPTIMIZED_OUT
Definition symtab.h:1062
@ LOC_TYPEDEF
Definition symtab.h:1018
@ LOC_FINAL_VALUE
Definition symtab.h:1073
@ LOC_REGPARM_ADDR
Definition symtab.h:1009
@ LOC_COMMON_BLOCK
Definition symtab.h:1070
@ LOC_COMPUTED
Definition symtab.h:1066
@ LOC_ARG
Definition symtab.h:997
@ mst_bss
Definition symtab.h:695
@ mst_data
Definition symtab.h:694
@ mst_solib_trampoline
Definition symtab.h:705
@ mst_file_text
Definition symtab.h:708
@ mst_slot_got_plt
Definition symtab.h:693
@ mst_file_data
Definition symtab.h:709
@ mst_text
Definition symtab.h:672
@ mst_text_gnu_ifunc
Definition symtab.h:681
@ mst_file_bss
Definition symtab.h:710
#define SYMBOL_COMPUTED_OPS(symbol)
Definition symtab.h:1543
domain_enum
Definition symtab.h:900
@ VAR_DOMAIN
Definition symtab.h:910
@ STRUCT_DOMAIN
Definition symtab.h:916
@ LABEL_DOMAIN
Definition symtab.h:924
#define gnu_ifunc_resolve_addr
Definition symtab.h:2313
void gdb_printf(struct ui_file *stream, const char *format,...)
Definition utils.c:1886
#define gdb_stdlog
Definition utils.h:190