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 12:10:04 +0200

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.

On Fri, Jun 2, 2023 at 8:20 PM Eli Zaretskii <[email-masked]> wrote:
>
> > From: Jonas Bülow <[email-masked]>
> > Date: Fri, 2 Jun 2023 18:00:33 +0200
> >
> > 0. (start with emacs -Q)
> > 1. M-x gdb <RET>
> > 2. Run gdb (like this): gdb -i=mi <RET>
> > 3. Enter python interactive mode with: pi <RET>
> > 4. Try to exit gdb's python interactive mode with Ctrl-D
> >
> > Expected: get back to gdb prompt
> >
> > Actual: gdb exits with "Debugger finished"
>
> AFAIR, this is the best we can do in that situation.  You should exit
> python interactive mode by other means, if you want to stay inside
> GDB.  Sorry.
>
> (Of course, if someone knows how to teach gdb-mi.el to distinguish
> between the two possible interpretations of EOF, patches to do so will
> be welcome.)