Bug 25388 - Leaving the python-interactive pyton interpreter without EOF (also works strangely with the Emacs interface)
Summary: Leaving the python-interactive pyton interpreter without EOF (also works stra...
Status: UNCONFIRMED
Alias: None
Product: gdb
Classification: Unclassified
Component: python (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-15 05:31 UTC by lockywolf
Modified: 2021-10-11 05:19 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lockywolf 2020-01-15 05:31:21 UTC
In a running gdb session it is possible to enter a python REPL by typing 
python-interactive or pi.

If you type quit in the new prompt, the interpreter responds:
>>> quit
Use quit() or Ctrl-D (i.e. EOF) to exit

Ctrl-D indeed leaves the python interpreter and returns you to the gdb interpreter.

However, quit() leaves the whole gdb. If this is intended, then I would ask to correct the message. If this is not intended, then please, could you make quit() return to the gdb prompt?
Comment 1 lockywolf 2020-01-20 01:14:33 UTC
This bug also intertwines with a bug in Emacs:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39140

Namely, it makes it hard to leave GUD in Emacs. 
Neither quit(), nor EOF seem to work.
Comment 2 lockywolf 2020-01-21 03:28:04 UTC
Ctrl-D in gdb -i=mi end both the python interpreter and the gdb interpreter at the same time.

Not so in plain gdb, without -i=mi.
Comment 3 lockywolf 2021-10-11 05:19:38 UTC
The behaviour is the same in 11.1