Fix interpreter-exec crash
authorTom Tromey <tromey@adacore.com>
Fri, 12 Aug 2022 19:15:01 +0000 (13:15 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 31 Aug 2022 17:03:40 +0000 (11:03 -0600)
commit058dc2c95935d54caa8891613a1080d57665fc43
treeb32d1a2bb50f93731aee58c0137b3daea4b5bc6b
parent1e28eebbbc34ebec69ea4913f7e8d19352e35630
Fix interpreter-exec crash

PR mi/10347 points out that using interpreter-exec inside of a
"define" command will crash gdb.  The bug here is that
gdb_setup_readline doesn't check for the case where instream==nullptr.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=10347
gdb/event-top.c
gdb/testsuite/gdb.base/interp.exp