Use containers to avoid cleanups
authorTom Tromey <tom@tromey.com>
Sat, 29 Apr 2017 05:34:32 +0000 (23:34 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 3 Aug 2017 13:59:02 +0000 (07:59 -0600)
commit26fcd5d7572ea1bf0cc697158969749420900e0b
tree4fd942f6a9ce113d4c1733b77c3191c5fe679a47
parent7c218e6c9c88cb8120adf1a7a530cfdec23aaf81
Use containers to avoid cleanups

This patch introduces the use of various containers -- std::vector,
std::string, or gdb::byte_vector -- in several spots in gdb that were
using xmalloc and a cleanup.

ChangeLog
2017-08-03  Tom Tromey  <tom@tromey.com>

* valops.c (search_struct_method): Use gdb::byte_vector.
* valarith.c (value_concat): Use std::vector.
* target.c (memory_xfer_partial): Use gdb::byte_vector.
(simple_search_memory): Likewise.
* printcmd.c (find_string_backward): Use gdb::byte_vector.
* mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
* gcore.c (gcore_copy_callback): Use gdb::byte_vector.
* elfread.c (elf_rel_plt_read): Use std::string.
* cp-valprint.c (cp_print_value): Use gdb::byte_vector.
* cli/cli-dump.c (restore_section_callback): Use
gdb::byte_vector.
gdb/ChangeLog
gdb/cli/cli-dump.c
gdb/cp-valprint.c
gdb/elfread.c
gdb/gcore.c
gdb/mi/mi-main.c
gdb/printcmd.c
gdb/target.c
gdb/valarith.c
gdb/valops.c