aboutsummaryrefslogtreecommitdiff
path: root/gdb/sparc-tdep.c
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2017-08-11 09:30:02 +0100
committerYao Qi <yao.qi@linaro.org>2017-08-11 09:30:02 +0100
commit1c90d9f022469629c255d44664b4452998168359 (patch)
tree5ae995a5dc538729561ca26f9f85ec9d5ef98a78 /gdb/sparc-tdep.c
parentafe37d6be57a505e6abd01778474a2b73dff52c4 (diff)
downloadfsf-binutils-gdb-1c90d9f022469629c255d44664b4452998168359.zip
fsf-binutils-gdb-1c90d9f022469629c255d44664b4452998168359.tar.gz
fsf-binutils-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 'gdb/sparc-tdep.c')
-rw-r--r--gdb/sparc-tdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 6135e0b..1f08865 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -1588,7 +1588,7 @@ sparc_execute_dwarf_cfa_vendor_op (struct gdbarch *gdbarch, gdb_byte op,
uint64_t reg;
int size = register_size (gdbarch, 0);
- dwarf2_frame_state_alloc_regs (&fs->regs, 32);
+ fs->regs.alloc_regs (32);
for (reg = 8; reg < 16; reg++)
{
fs->regs.reg[reg].how = DWARF2_FRAME_REG_SAVED_REG;