Change target_write_memory_blocks to use std::vector
authorTom Tromey <tom@tromey.com>
Sat, 24 Feb 2018 16:55:30 +0000 (09:55 -0700)
committerTom Tromey <tom@tromey.com>
Tue, 27 Feb 2018 19:00:34 +0000 (12:00 -0700)
commit55089490f79ce1ddb9610fd6abeeaf896825fb71
tree9e745a2bfcfc782e678ab8df7876c9f401038116
parent5b616beff49ce5fe10c5efc2784b6b234bb8cb4f
Change target_write_memory_blocks to use std::vector

This changes target_write_memory_blocks to use std::vector, rather
than VEC.  This allows the removal of some cleanups.

This version incorporates the additions that Simon made.

Regression tested by the buildbot.

ChangeLog
2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
    Tom Tromey  <tom@tromey.com>

* target.h (memory_write_request_s): Remove typedef.  Don't define
VEC.
(target_write_memory_blocks): Change argument to std::vector.
(struct memory_write_request): Add constructor.
* target-memory.c (compare_block_starting_address): Return bool.
Change argument types.
(claim_memory): Change arguments to use std::vector.
(split_regular_and_flash_blocks, blocks_to_erase)
(compute_garbled_blocks): Likewise.
(cleanup_request_data, cleanup_write_requests_vector): Remove.
(target_write_memory_blocks): Change argument to std::vector.
* symfile.c (struct load_section_data): Add constructor and
destructor.  Use std::vector for "requests".
(struct load_progress_data): Add initializers.
(load_section_callback): Update.  Use "new".
(clear_memory_write_data): Remove.
(generic_load): Update.
gdb/ChangeLog
gdb/symfile.c
gdb/target-memory.c
gdb/target.h