Fix fork-related regressions on GNU/Linux
Commit
5cd63fda035d ("Fix "Remote 'g' packet reply is too long"
problems with multiple inferiors") caused a number of regressions on
native GNU/Linux, all related to follow-fork support. E.g.:
src/gdb/target.c:3141: internal-error: gdbarch* default_thread_architecture(target_ops*, ptid_t): Assertion `inf != NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)
Resyncing due to internal error.
FAIL: gdb.base/catch-signal-fork.exp: got SIGHUP after fork (GDB internal error)
This commit fixes it.
gdb/ChangeLog:
2017-10-05 Pedro Alves <palves@redhat.com>
* linux-nat.c (linux_child_follow_fork): When following the parent
and detaching the child, consult the parent thread's architecture
instead of the child's.