]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/infrun.c
gdb: make inferior_list use intrusive_list
authorPedro Alves <pedro@palves.net>
Sun, 14 Jun 2020 19:57:04 +0000 (20:57 +0100)
committerSimon Marchi <simon.marchi@polymtl.ca>
Tue, 13 Jul 2021 00:46:52 +0000 (20:46 -0400)
commit08bdefb58b78621f50b30f64170e2cdc31c1b2cf
tree05c3de69ddd7f935e415b7f9c88af0ef798daa91
parentbf8093108164a7ed7fdf4c6dc751e0b2043caf7b
gdb: make inferior_list use intrusive_list

Change inferior_list, the global list of inferiors, to use
intrusive_list.  I think most other changes are somewhat obvious
fallouts from this change.

There is a small change in behavior in scoped_mock_context.  Before this
patch, constructing a scoped_mock_context would replace the whole
inferior list with only the new mock inferior.  Tests using two
scoped_mock_contexts therefore needed to manually link the two inferiors
together, as the second scoped_mock_context would bump the first mock
inferior from the thread list.  With this patch, a scoped_mock_context
adds its mock inferior to the inferior list on construction, and removes
it on destruction.  This means that tests run with mock inferiors in the
inferior list in addition to any pre-existing inferiors (there is always
at least one).  There is no possible pid clash problem, since each
scoped mock inferior uses its own process target, and pids are per
process target.

Co-Authored-By: Simon Marchi <simon.marchi@efficios.com>
Change-Id: I7eb6a8f867d4dcf8b8cd2dcffd118f7270756018
gdb/ada-tasks.c
gdb/inferior-iter.h
gdb/inferior.c
gdb/inferior.h
gdb/infrun.c
gdb/progspace.c
gdb/regcache.c
gdb/scoped-mock-context.h
gdb/thread-iter.c
gdb/thread.c