Avoid crash with Ravenscar tasks
authorTom Tromey <tromey@adacore.com>
Fri, 5 Aug 2022 16:43:48 +0000 (10:43 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 22 Aug 2022 18:03:41 +0000 (12:03 -0600)
commit6bab7e67d07896d4fad755d9c2127f914c5c6492
tree42b50fc58c3f5354c8cac1c47d4a570b65115cb5
parentb3ea2010cd06d49dd4fbfaa64b055700f7869e34
Avoid crash with Ravenscar tasks

When using Ravenscar, gdb can crash if the user sets a breakpoint very
early in task startup.  This happens because gdb thinks the runtime is
initialized, but in practice the particular task isn't sufficiently
initialized.  This patch avoids the issue by turning an assertion into
an early return.

I tested this using the AdaCore internal test suite.  I don't know how
to test Ravenscar using the FSF test suite.
gdb/ravenscar-thread.c