aboutsummaryrefslogtreecommitdiff
path: root/gdb/progspace.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2023-10-19 10:55:38 -0400
committerSimon Marchi <simon.marchi@efficios.com>2023-10-19 10:57:51 -0400
commit8971d2788e79db2ffc1205ed36935483eedf2fab (patch)
treeff5dead00b54316d0786af5c6558c41f6407c143 /gdb/progspace.c
parent98107b0b17acd9d2c28829cbe93a75b72677d220 (diff)
downloadbinutils-8971d2788e79db2ffc1205ed36935483eedf2fab.zip
binutils-8971d2788e79db2ffc1205ed36935483eedf2fab.tar.gz
binutils-8971d2788e79db2ffc1205ed36935483eedf2fab.tar.bz2
gdb: link so_list using intrusive_list
Replace the hand-made linked list implementation with intrusive_list, simplying management of list items. Change-Id: I7f55fd88325bb197cc655c9be5a2ec966d8cc48d Approved-By: Pedro Alves <pedro@palves.net> Reviewed-By: Reviewed-By: Lancelot Six <lancelot.six@amd.com>
Diffstat (limited to 'gdb/progspace.c')
-rw-r--r--gdb/progspace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/progspace.c b/gdb/progspace.c
index 555fa79..4b816b4 100644
--- a/gdb/progspace.c
+++ b/gdb/progspace.c
@@ -132,8 +132,8 @@ void
program_space::free_all_objfiles ()
{
/* Any objfile reference would become stale. */
- for (struct so_list *so : current_program_space->solibs ())
- gdb_assert (so->objfile == NULL);
+ for (const struct so_list &so : current_program_space->solibs ())
+ gdb_assert (so.objfile == NULL);
while (!objfiles_list.empty ())
objfiles_list.front ()->unlink ();