Zero-initialize linux note sections
authorPedro Franco de Carvalho <pedromfc@linux.ibm.com>
Fri, 26 Oct 2018 12:37:53 +0000 (09:37 -0300)
committerPedro Franco de Carvalho <pedromfc@linux.ibm.com>
Fri, 26 Oct 2018 12:41:20 +0000 (09:41 -0300)
commitafde3032dde478a2bbb2e0c4b0cb4256b27eb949
tree82722bc0bbdba33634a51e4d76d1e61c51662108
parentb971899198607b844f5a37e39dc561766c3b331a
Zero-initialize linux note sections

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

gdb/ChangeLog:
2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>

* linux-tdep.c (linux_collect_regset_section_cb): Use
std::vector<gdb_byte> instead of char * and malloc for buf.
Remove xfree.
gdb/ChangeLog
gdb/linux-tdep.c