sim,arch: Move code that waits for a GDB connection to startup().
authorGabe Black <gabeblack@google.com>
Sat, 1 Feb 2020 00:53:46 +0000 (16:53 -0800)
committerGabe Black <gabeblack@google.com>
Thu, 27 Feb 2020 13:02:44 +0000 (13:02 +0000)
commit4f4fe6f80e8cbfcbf8f4a96a74643079e69e8295
treee12c48a9068035bfb61cdee3c3c7dc8f4e7c60f7
parent27dbffdb006c7bd12ad2489a2d346274fe646720
sim,arch: Move code that waits for a GDB connection to startup().

Currently the System class has a mechanism to wait for a GDB connection
for each CPU which has requested it through one of its parameters.
Unfortunately, not every thread context/CPU will be ready for GDB at
that point, particularly considering that in an FS simulation the
kernel won't have been read so there will be no symbols, none of the
registers or the entry point will have been set.

Also in the fast models, the CPUs haven't had a chance to initialize
themselves enough by that point to respond to the API calls which are
used to implement GDB support.

Change-Id: If27cb3e0259a1f67599ab0493695b2f8af640d8e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24963
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Chun-Chen TK Hsu <chunchenhsu@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/arm/freebsd/system.cc
src/arch/arm/freebsd/system.hh
src/arch/arm/linux/system.cc
src/sim/system.cc
src/sim/system.hh