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 v2 01/12] Zero-initialize linux note sections


>>>>> "Pedro" == Pedro Franco de Carvalho <pedromfc@linux.ibm.com> writes:

Pedro> This patches changes linux-tdep.c so that the buffer used to write
Pedro> note sections when generating a core file is zero-initialized.  This
Pedro> way, bytes that are not collected won't contain random
Pedro> data (e.g. padding bytes).

Pedro> -  char *buf;
Pedro> +  std::vector<char> buf (size);

It might be nice for future developers if there were a comment here
explaining that this is intentionally zero-initialized.  Other spots in
gdb use gdb::def_vector and perhaps someone might think that would be a
worthwhile micro-optimization.

Tom


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