This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gdb: use std::vector instead of alloca in core_target::get_core_register_section


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]