Re: [PATCH v2 01/12] Zero-initialize linux note sections

Tom Tromey
2018-08-10T16:13:55Z

>>>>> "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