This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Use std::unique_ptr in reg_buffer
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Sat, 09 Jun 2018 23:14:43 -0400
- Subject: [binutils-gdb] Use std::unique_ptr in reg_buffer
*** TEST RESULTS FOR COMMIT 835dcf92618e294d3c6c2bedd94af712809c96a3 ***
Author: Simon Marchi <simon.marchi@ericsson.com>
Branch: master
Commit: 835dcf92618e294d3c6c2bedd94af712809c96a3
Use std::unique_ptr in reg_buffer
Using std::unique_ptr allows to remove the manual xfree in the
destructor.
If I understand correctly, using the () after the new operator will make
sure the allocated objects will be value initialized, which for scalars
means they are zero-initialized. So it should have the same behavior as
XCNEWVEC.
gdb/ChangeLog:
* regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
<m_registers, m_register_status>: Change type to
std::unique_ptr.
* regcache.c (reg_buffer::reg_buffer): Use new instead of
XCNEWVEC.
- Follow-Ups:
- Failures on Fedora-s390x-m64, branch master
- Failures on RHEL-s390x-m64, branch master
- Failures on Debian-s390x-m64, branch master
- Failures on Debian-s390x-native-extended-gdbserver-m64, branch master
- Failures on Fedora-i686, branch master
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- Failures on Fedora-x86_64-m64, branch master
- *** COMPILATION FAILED *** Failures on Fedora-x86_64-w64-mingw32, branch master *** BREAKAGE ***
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Fedora-x86_64-native-gdbserver-m64, branch master