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

From: Jonas Bülow <[email-masked]>
Date: Sat, 3 Jun 2023 13:22:44 +0200

This gdb bug looks relevant:
https://sourceware.org/bugzilla/show_bug.cgi?id=25388

On Sat, Jun 3, 2023 at 1:10 PM Eli Zaretskii <[email-masked]> wrote:
>
> > 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?