diff options
author | Yao Qi <yao.qi@linaro.org> | 2017-08-11 09:30:02 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2017-08-11 09:30:02 +0100 |
commit | 1c90d9f022469629c255d44664b4452998168359 (patch) | |
tree | 5ae995a5dc538729561ca26f9f85ec9d5ef98a78 /depcomp | |
parent | afe37d6be57a505e6abd01778474a2b73dff52c4 (diff) | |
download | gdb-1c90d9f022469629c255d44664b4452998168359.zip gdb-1c90d9f022469629c255d44664b4452998168359.tar.gz gdb-1c90d9f022469629c255d44664b4452998168359.tar.bz2 |
Class-fy dwarf2_frame_state_reg_info
This patch adds dwarf2_frame_state_reg_info ctor, dtor, copy ctor,
assignment operator, and move assignment. This patch also adds unit test
to execute_cfa_program to cover the changes.
gdb:
2017-08-11 Yao Qi <yao.qi@linaro.org>
* dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
(dwarf2_frame_state_copy_regs): Remove.
(dwarf2_frame_state_free_regs): Remove.
(dwarf2_frame_state::~dwarf2_frame_state): Remove.
(dwarf2_restore_rule): Call method .alloc_regs instead of
dwarf2_frame_state_alloc_regs.
(execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
constructor. Call std::move.
(dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
(dwarf2_frame_cache): Likewise.
[GDB_SELF_TEST]: Include selftest.h and
selftest-arch.h.
[GDB_SELF_TEST] (execute_cfa_program_test): New function.
(_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
execute_cfa_program_test.
* dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
copy ctor, assignment operator, move assignment.
<alloc_regs>: New method.
<swap>: New method.
(struct dwarf2_frame_state): Delete dtor.
(dwarf2_frame_state_alloc_regs): Remove declaration.
* sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
Diffstat (limited to 'depcomp')
0 files changed, 0 insertions, 0 deletions