gdb: pass execing and following inferior to inferior_execd observers
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 3 Apr 2023 18:52:02 +0000 (14:52 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 17 Apr 2023 17:47:13 +0000 (13:47 -0400)
commit4a1283c8d56a43a5146744cec6960556d9b40605
tree53d93294ddcff0748b4abed362d1987d21fa5be4
parente49831ba4340688d7685a52099db09d12177945b
gdb: pass execing and following inferior to inferior_execd observers

The upcoming patch to support exec in the amd-dbgapi target needs to
detach amd-dbgapi from the inferior doing the exec and attach amd-dbgapi
to the inferior continuing the execution.  They may or may not be the
same, depending on the `set follow-exec-mode` setting.  But even if they
are the same, we need to do the detach / attach dance.

With the current observable signature, the observers only receive the
inferior in which execution continues (the "following" inferior).

Change the signature to pass both inferiors, and update all existing
observers.

Change-Id: I259d1ea09f70f43be739378d6023796f2fce2659
Reviewed-By: Pedro Alves <pedro@palves.net>
gdb/infrun.c
gdb/jit.c
gdb/linux-tdep.c
gdb/observable.h
gdb/solib.c