This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: python-interactive, and quitting gdb pagination
- From: Tom Tromey <tromey at redhat dot com>
- To: Khoo Yit Phang <khooyp at cs dot umd dot edu>
- Cc: Pedro Alves <palves at redhat dot com>, GDB Patches <gdb-patches at sourceware dot org>
- Date: Mon, 10 Sep 2012 14:07:08 -0600
- Subject: Re: python-interactive, and quitting gdb pagination
- References: <5036634E.6060202@redhat.com> <AB38DA2F-50A2-40DF-A39E-1E38384BC620@cs.umd.edu>
>>>>> "Yit" == Khoo Yit Phang <khooyp@cs.umd.edu> writes:
Yit> Hmm, this happens because quitting from GDB's pager happens to raise
Yit> the same error reason, RETURN_QUIT, as typing Ctrl-C, i.e., quitting
Yit> from the pager looks exactly like Ctrl-C. I'm not quite sure what the
Yit> best way to fix this is; perhaps disable the pager while in Python?
Yit> Python's "help" runs a pager too, but I think it's disabled because
Yit> stdin/stdout is redirected through GDB. Or alternatively, perhaps
Yit> somehow differentiate quitting from the pager or quitting from Ctrl-C,
Yit> e.g., with a different error.message?
Having Python use the pager is kind of a feature. It lets one write gdb
commands in Python that work like other gdb commands.
I suppose we could provide a way to bypass the pager.
Doing so during python-interactive might make sense, though I am not
sure.
Tom