mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 13:56:22 +08:00
Use std::vector for traceframe_info::memory
Straightforward change from a VEC to std::vector. This allows making the destruction of a traceframe_info trivial. I added a constructor with parameters to mem_range to be able to emplace_back directly with the values. It is necessary to leave a default constructor there because mem_range is still used in a VEC. gdb/ChangeLog: * memrange.h (struct mem_range): Add constructors. * tracepoint.h (struct traceframe_info) <memory>: Change type to std::vector<mem_range>. * tracepoint.c (free_traceframe_info): Don't manually free vector. (traceframe_info_start_memory): Adjust to vector change. (traceframe_available_memory): Likewise. * tracefile-tfile.c (build_traceframe_info): Likewise. * ctf.c (ctf_traceframe_info): Likewise.
This commit is contained in:

committed by
Simon Marchi

parent
d0d292a274
commit
4cdd21a8d3
@ -32,7 +32,7 @@
|
||||
struct traceframe_info
|
||||
{
|
||||
/* Collected memory. */
|
||||
VEC(mem_range_s) *memory = NULL;
|
||||
std::vector<mem_range> memory;
|
||||
|
||||
/* Collected trace state variables. */
|
||||
std::vector<int> tvars;
|
||||
|
Reference in New Issue
Block a user