This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb: use std::vector instead of alloca in core_target::get_core_register_section
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>, gdb-patches at sourceware dot org
- Date: Mon, 13 Jan 2020 19:40:29 +0000
- Subject: Re: [PATCH] gdb: use std::vector instead of alloca in core_target::get_core_register_section
- References: <20200112201729.489317-1-simon.marchi@polymtl.ca>
On 1/12/20 8:17 PM, Simon Marchi wrote:
> - contents = (char *) alloca (size);
> - if (! bfd_get_section_contents (core_bfd, section, contents,
> + std::vector<char> contents (size);
> + if (! bfd_get_section_contents (core_bfd, section, contents.data (),
> (file_ptr) 0, size))
> {
gdb::byte_vector
Thanks,
Pedro Alves