diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2017-11-22 15:08:06 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2017-11-22 15:08:06 -0500 |
commit | 0604393c22f626f26b5a4a30e57da40404f5aa5e (patch) | |
tree | 9c0975d7db4c7d18f7a5a23816ac31b683e7dfb2 /gdb/breakpoint.c | |
parent | ddf0ea085b626ddcbb14f88f495bcb677b7ab6e9 (diff) | |
download | binutils-0604393c22f626f26b5a4a30e57da40404f5aa5e.zip binutils-0604393c22f626f26b5a4a30e57da40404f5aa5e.tar.gz binutils-0604393c22f626f26b5a4a30e57da40404f5aa5e.tar.bz2 |
Replace VEC (varobj_update_result) with std::vector
This patch replaces makes varobj_update return an std::vector, and
updates the fallouts.
To make that easier, the varobj_update_result is c++ified a bit. I
added a constructor and initialized its fields in-class. The newobj
vector is also made an std::vector, so that it's automatically freed
when varobj_update_result is destroyed and handled correctly by the
default move constructor. I disabled copy constructor and assignment
for that structure, because normally it never needs to be copied, only
moved.
As a result, the newobj parameter of update_dynamic_varobj_children must
be changed to an std::vector. The patch converts the other vector
parameters of update_dynamic_varobj_children to std::vector. It's not
strictly necessary to do it in the same patch, but I think it makes
sense to do it.
gdb/ChangeLog:
* varobj.h (struct varobj_update_result): Add constructor, add
move constructor, disable copy and assign, initialize fields.
<newobj>: Change type to std::vector.
(varobj_update): Return std::vector.
* varobj.c (install_dynamic_child): Change VEC parameters to
std::vector and adjust.
(update_dynamic_varobj_children): Likewise.
(varobj_update): Return std::vector and adjust.
* mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
Diffstat (limited to 'gdb/breakpoint.c')
0 files changed, 0 insertions, 0 deletions