summaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-01-23 12:20:11 -0700
committerTom Tromey <tom@tromey.com>2021-01-23 20:33:25 -0700
commit3637a558a50141676f9997979491296dc007168d (patch)
tree6a15b32e0bbf8f7d81f6557cbc0ce0e343bddbd2 /gdb/symtab.h
parent18454c151f5824564130ba626bd90e9de30444ef (diff)
downloadbinutils-gdb-3637a558a50141676f9997979491296dc007168d.tar.gz
Use std::vector for "registers_used" in compile feature
This changes the GDB compile code to use std::vector<bool> when computing which registers are used. This is a bit more idiomatic, but the main benefit is that it also adds some checking when the libstd++ debug mode is enabled. 2021-01-23 Tom Tromey <tom@tromey.com> * symtab.h (struct symbol_computed_ops) <generate_c_location>: Change type of "registers_used". * dwarf2/loc.h (dwarf2_compile_property_to_c): Update. * dwarf2/loc.c (dwarf2_compile_property_to_c) (locexpr_generate_c_location, loclist_generate_c_location): Change type of "registers_used". * compile/compile.h (compile_dwarf_expr_to_c) (compile_dwarf_bounds_to_c): Update. * compile/compile-loc2c.c (pushf_register_address) (pushf_register, do_compile_dwarf_expr_to_c) (compile_dwarf_expr_to_c, compile_dwarf_bounds_to_c): Change type of "registers_used". * compile/compile-c.h (generate_c_for_variable_locations): Update. * compile/compile-c-symbols.c (generate_vla_size) (generate_c_for_for_one_variable): Change type of "registers_used". (generate_c_for_variable_locations): Return std::vector. * compile/compile-c-support.c (generate_register_struct): Change type of "registers_used". (compute): Update.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 3c3483e5415..f060e0ebc15 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1022,7 +1022,7 @@ struct symbol_computed_ops
void (*generate_c_location) (struct symbol *symbol, string_file *stream,
struct gdbarch *gdbarch,
- unsigned char *registers_used,
+ std::vector<bool> &registers_used,
CORE_ADDR pc, const char *result_name);
};