Subject: bug#63855: 29.0.91; Exiting gdb's python interactive mode within gud-mode exits gdb as well

From: Eli Zaretskii <[email-masked]>
Date: Sat, 03 Jun 2023 14:11:41 +0300

> Cc: [email-masked]
> Date: Sat, 03 Jun 2023 13:36:41 +0300
> From: Eli Zaretskii <[email-masked]>
> 
> > From: Jonas Bülow <[email-masked]>
> > Date: Sat, 3 Jun 2023 12:10:04 +0200
> > Cc: [email-masked]
> > 
> > Unfortunately, there doesn't seem to be any other way to exit python
> > interactive mode. Using exit() or quit() from python interactive mode
> > exits gdb even from the terminal.
> 
> Then I guess we need someone smart to tell how to send Ctrl-D to GDB
> so that it doesn't exit in this case.

Btw, I see a similar behavior from the console, if I start GDB with
the -i=mi option, like Emacs does: when you type Ctrl-D after invoking
"pi", you can no longer interact with GDB: any input you type exits
GDB and gets interpreted by the shell instead.

So maybe this is a GDB bug that needs to be reported to the GDB
developers?