]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ChangeLog
Use std::vector for "registers_used" in compile feature
authorTom Tromey <tom@tromey.com>
Sat, 23 Jan 2021 19:20:11 +0000 (12:20 -0700)
committerTom Tromey <tom@tromey.com>
Sun, 24 Jan 2021 03:33:25 +0000 (20:33 -0700)
commit3637a558a50141676f9997979491296dc007168d
tree6a15b32e0bbf8f7d81f6557cbc0ce0e343bddbd2
parent18454c151f5824564130ba626bd90e9de30444ef
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.
gdb/ChangeLog
gdb/compile/compile-c-support.c
gdb/compile/compile-c-symbols.c
gdb/compile/compile-c.h
gdb/compile/compile-loc2c.c
gdb/compile/compile.h
gdb/dwarf2/loc.c
gdb/dwarf2/loc.h
gdb/symtab.h