]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/solib-svr4.c
Class-ify lm_info_svr4
authorSimon Marchi <simon.marchi@ericsson.com>
Fri, 28 Apr 2017 21:16:17 +0000 (17:16 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Fri, 28 Apr 2017 21:16:17 +0000 (17:16 -0400)
commit76e75227c37bc058449a09fe5017eeb40cda0781
treec560183af00d3490f64620cc0c902566544e649e
parent51046d9e60727cd6a4cfeae29a05ce2e1e394dc9
Class-ify lm_info_svr4

This patch makes lm_info_svr4 a "real" class.  It initializes fields,
uses bool and replaces XCNEW/xfree with new/delete.

The memcpy in svr4_copy_library_list is replaced by a usage of the
default copy constructor.

gdb/ChangeLog:

* solib-svr4.h (struct lm_info_svr4): Initialize fields.
<l_addr_p>: Change type to bool.
* solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
(svr4_free_so): Free lm_info_svr4 with delete.
(svr4_copy_library_list): Replace memcpy with call to copy
constructor.
(library_list_start_library, svr4_default_sos): Allocate
lm_info_svr4 with new.
gdb/ChangeLog
gdb/solib-svr4.c
gdb/solib-svr4.h