Store objfiles on a std::list
authorTom Tromey <tom@tromey.com>
Sun, 10 Mar 2019 12:56:33 +0000 (06:56 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 12 Dec 2019 22:50:55 +0000 (15:50 -0700)
commitd0801dd8f22a3e739c6a7d126d45829df981794d
treebe0659729b37d9464c10d7991b1d250b4a785465
parent13bff72615e5a93a6e5f28e83a594125e66ccced
Store objfiles on a std::list

This removes objfile::next and changes objfiles to be stored in a
std::list.

gdb/ChangeLog
2019-12-12  Tom Tromey  <tom@tromey.com>

* progspace.c (program_space::add_objfile)
(program_space::remove_objfile): Update.
(program_space::multi_objfile_p): Remove.
* objfiles.h (struct objfile) <next>: Remove.
* objfiles.c (objfile::objfile): Update.
(put_objfile_before): Update.
(unlink_objfile): Update.
* progspace.h (object_files): Remove.
(struct program_space) <objfiles_head>: Remove.
<objfiles_list>: New member.
<objfiles_range, objfiles_safe_range>: Change type.
(objfiles): Change return type.
(objfiles_safe): Update.
(multi_objfile_p): Rewrite and inline.
(object_files): Remove macro.

Change-Id: Ib4430e3db6f9a390399924379a5c10426c514853
gdb/ChangeLog
gdb/objfiles.c
gdb/objfiles.h
gdb/progspace.c
gdb/progspace.h