aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-varobj.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2017-11-22 15:08:05 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2017-11-22 15:08:05 -0500
commit9e5b9d2b295d1771647a9e4bc942e398142ccf9b (patch)
treece91e5898a34b8b236602baf53b8c41c8b894d1f /gdb/ada-varobj.c
parent2469b3c58447e98e073ffe7ab6c9627dbbd1aa81 (diff)
downloadgdb-9e5b9d2b295d1771647a9e4bc942e398142ccf9b.zip
gdb-9e5b9d2b295d1771647a9e4bc942e398142ccf9b.tar.gz
gdb-9e5b9d2b295d1771647a9e4bc942e398142ccf9b.tar.bz2
Basic c++ification of varobj
This patch does a basic c++ification or the varobj data structure. - varobj: add constructor and destructor, initialize fields - varobj_root: initialize fields - varobj_dynamic: initialize fields This allows getting rid of new_variable, new_root_variable. free_variable essentially becomes varobj's destructor. This also allows getting rid of a cleanup, make_cleanup_free_variable, which was only used in varobj_create in case the varobj creation fails. It is replaced with a unique_ptr. gdb/ChangeLog: * varobj.h (struct varobj): Add constructor and destructor, initialize fields. * varobj.c (struct varobj_root): Initialize fields. (struct varobj_dynamic): Initialize fields. (varobj_create): Use unique_ptr instead of cleanup. Create varobj with new instead of new_root_variable. (delete_variable_1): Free variable with delete instead of free_variable. (create_child_with_value): Create variable with new instead of new_variable. (varobj::varobj): New. (varobj::~varobj): New (body mostly coming from free_variable). (new_variable): Remove. (free_variable): Remove. (do_free_variable_cleanup): Remove. (make_cleanup_free_variable): Remove.
Diffstat (limited to 'gdb/ada-varobj.c')
0 files changed, 0 insertions, 0 deletions