diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2023-10-10 14:47:13 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-10-19 10:57:51 -0400 |
commit | 7ad0a42e88c09b4046205316bd6352dfb31afd79 (patch) | |
tree | b64102b23c6e0bcd53196a21e2c11ba919c6b61f /gdb/solist.h | |
parent | 1c0dfccba7bac021456198597fdce080d4a8315b (diff) | |
download | gdb-7ad0a42e88c09b4046205316bd6352dfb31afd79.zip gdb-7ad0a42e88c09b4046205316bd6352dfb31afd79.tar.gz gdb-7ad0a42e88c09b4046205316bd6352dfb31afd79.tar.bz2 |
gdb: make so_list::lm_info a unique_ptr
Make it a unique_ptr, so it gets automatically deleted when the so_list
is deleted.
Change-Id: Ib62d60ae2a80656239860b80e4359121c93da13d
Approved-By: Pedro Alves <pedro@palves.net>
Reviewed-By: Reviewed-By: Lancelot Six <lancelot.six@amd.com>
Diffstat (limited to 'gdb/solist.h')
-rw-r--r-- | gdb/solist.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/solist.h b/gdb/solist.h index 12ea516..5f9090a 100644 --- a/gdb/solist.h +++ b/gdb/solist.h @@ -34,6 +34,8 @@ struct lm_info virtual ~lm_info () = 0; }; +using lm_info_up = std::unique_ptr<lm_info>; + struct so_list { /* The following fields of the structure come directly from the @@ -46,7 +48,7 @@ struct so_list will be a copy of struct link_map from the user process, but it need not be; it can be any collection of data needed to traverse the dynamic linker's data structures. */ - struct lm_info *lm_info = nullptr; + lm_info_up lm_info; /* Shared object file name, exactly as it appears in the inferior's link map. This may be a relative path, or something |