Change dwarf2_frame_state_reg_info::reg to be std::vector
authorTom Tromey <tom@tromey.com>
Tue, 28 Aug 2018 22:14:52 +0000 (16:14 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 3 Oct 2018 21:19:06 +0000 (15:19 -0600)
commit780942fc2422d80a49b748e484890f11db31f49e
treef2204a52bac7da0d2eda824cc0ea2d5088ab2f4d
parent10657c047e4e0257440c80fda5f4e23a3452616c
Change dwarf2_frame_state_reg_info::reg to be std::vector

This changes dwarf2_frame_state_reg_info::reg to be a std::vector.
This avoids passing NULL to memcpy in the copy constructor when the
original object does not have any registers.

gdb/ChangeLog
2018-10-03  Tom Tromey  <tom@tromey.com>

* dwarf2-frame.h (dwarf2_frame_state_reg_info)
<~dwarf2_frame_state_reg_info>: Update.
<dwarf2_frame_state_reg_info>: Update.
<alloc_regs>: Add assertion.  Update.
<reg>: Now a std::vector.
<num_regs>: Remove.
<swap>: Update.
* dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
(execute_cfa_program_test, dwarf2_frame_cache): Update.
gdb/ChangeLog
gdb/dwarf2-frame.c
gdb/dwarf2-frame.h