gdb: Remove a VEC from gdbsupport/btrace-common.h
authorAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 16 Sep 2019 13:12:27 +0000 (09:12 -0400)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 2 Oct 2019 13:05:49 +0000 (14:05 +0100)
commit46f29a9a260da1a03176682aff63bad03d8f2e8b
tree4fd2bb40deed8e0e8b6745bd2c6f70bab02347d0
parentde4859eacb74a440d9fd61e4a0f051e3737a05dd
gdb: Remove a VEC from gdbsupport/btrace-common.h

Converts a VEC into a std::vector in gdbsupport/btrace-common.h.  This
commit just performs a mechanical conversion and doesn't do any
refactoring.  One consequence of this is that the std::vector must
actually be a pointer to std::vector as it is placed within a union.
It might be possible in future to refactor to a class hierarchy and
remove the need for a union, but I'd rather have that be a separate
change to make it easier to see the evolution of the code.

gdb/ChangeLog:

* btrace.c (btrace_compute_ftrace_bts): Update for std::vector,
make accesses into the vector constant references.
(btrace_add_pc): Update for std::vector.
(btrace_stitch_bts): Likewise.
(parse_xml_btrace_block): Likewise.
(btrace_maint_update_packets): Likewise.
(btrace_maint_print_packets): Likewise.
(maint_info_btrace_cmd): Likewise.
* gdbsupport/btrace-common.c (btrace_data::fini): Update for
std::vector.
(btrace_data::empty): Likewise.
(btrace_data_append): Likewise.
* gdbsupport/btrace-common.h: Remove use of DEF_VEC_O.
(typedef btrace_block_s): Delete.
(struct btrace_block): Add constructor.
(struct btrace_data_bts) <blocks>: Change to std::vector.
* nat/linux-btrace.c (perf_event_read_bts): Update for
std::vector.
(linux_read_bts): Likewise.

gdb/gdbserver/ChangeLog:

* linux-low.c (linux_low_read_btrace): Update for change to
std::vector.
gdb/ChangeLog
gdb/btrace.c
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-low.c
gdb/gdbsupport/btrace-common.c
gdb/gdbsupport/btrace-common.h
gdb/nat/linux-btrace.c
This page took 0.025732 seconds and 4 git commands to generate.