Class-fy dwarf2_frame_state
authorYao Qi <yao.qi@linaro.org>
Fri, 11 Aug 2017 08:30:02 +0000 (09:30 +0100)
committerYao Qi <yao.qi@linaro.org>
Fri, 11 Aug 2017 08:30:02 +0000 (09:30 +0100)
commitafe37d6be57a505e6abd01778474a2b73dff52c4
tree02ac8a5a14ad3dbe0373deab4bc03a068c2eb6c8
parentb348037fd8c0de5c39cc43970697c51048a8ec9c
Class-fy dwarf2_frame_state

This patch adds ctor and dtor to dwarf2_frame_state, so that we can
remove one cleanup "old_chain".

gdb:

2017-08-11  Yao Qi  <yao.qi@linaro.org>

* dwarf2-frame.c (dwarf2_frame_state_free): Remove.
(dwarf2_frame_state::dwarf2_frame_state): New.
(dwarf2_frame_state::~dwarf2_frame_state): New.
(dwarf2_fetch_cfa_info): Update.
(dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
rather than a pointer.  Update code.
* dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
dtor.
<data_align, code_align, retaddr_column>: Change them to const.
<armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
to bool.
gdb/ChangeLog
gdb/dwarf2-frame.c
gdb/dwarf2-frame.h