diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2017-04-28 17:16:17 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2017-04-28 17:16:17 -0400 |
commit | 76e75227c37bc058449a09fe5017eeb40cda0781 (patch) | |
tree | c560183af00d3490f64620cc0c902566544e649e /gdb/solib-svr4.h | |
parent | 51046d9e60727cd6a4cfeae29a05ce2e1e394dc9 (diff) | |
download | gdb-76e75227c37bc058449a09fe5017eeb40cda0781.zip gdb-76e75227c37bc058449a09fe5017eeb40cda0781.tar.gz gdb-76e75227c37bc058449a09fe5017eeb40cda0781.tar.bz2 |
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.
Diffstat (limited to 'gdb/solib-svr4.h')
-rw-r--r-- | gdb/solib-svr4.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/solib-svr4.h b/gdb/solib-svr4.h index a9b09aa..705c587 100644 --- a/gdb/solib-svr4.h +++ b/gdb/solib-svr4.h @@ -38,14 +38,14 @@ struct lm_info_svr4 : public lm_info_base It is commonly the same value. It is cached as we want to warn about the difference and compute it only once. L_ADDR is valid iff L_ADDR_P. */ - CORE_ADDR l_addr, l_addr_inferior; - unsigned int l_addr_p : 1; + CORE_ADDR l_addr = 0, l_addr_inferior = 0; + bool l_addr_p = false; /* The target location of lm. */ - CORE_ADDR lm_addr; + CORE_ADDR lm_addr = 0; /* Values read in from inferior's fields of the same name. */ - CORE_ADDR l_ld, l_next, l_prev, l_name; + CORE_ADDR l_ld = 0, l_next = 0, l_prev = 0, l_name = 0; }; /* Critical offsets and sizes which describe struct r_debug and |