From: Paul Smith <psmith@gnu.org>
To: gdb@sourceware.org
Subject: GDB: Setting the prompt from python
Date: Sat, 17 Oct 2020 23:26:24 -0400 [thread overview]
Message-ID: <46a8f2123a154c4b86b8f38fff332f059b72fc77.camel@gnu.org> (raw)
Is it possible to change the GDB prompt from within Python, such that
the prompt contains a trailing space (like the default prompt)?
I cannot figure it out.
If I run set prompt from the normal command interpreter I can easily
just put a space at the end and it works:
(gdb) set prompt XXX\n
XXXprint 1
1
(gdb) set prompt XXX \n
XXX print 1
1
showing \n to indicate where I type ENTER
Fine. But this doesn't work from Python:
(gdb) python
> gdb.execute('set prompt XXX ', True)
> ^D
XXXprint 1
1
It seems that no matter what I do, the trailing space is stripped off.
Is there some other way to set the prompt from Python?
Help!!
next reply other threads:[~2020-10-18 3:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-18 3:26 Paul Smith [this message]
2020-10-18 9:24 ` Matt Rice
2020-10-18 14:08 ` Paul Smith
2020-10-18 14:45 ` Matt Rice
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46a8f2123a154c4b86b8f38fff332f059b72fc77.camel@gnu.org \
--to=psmith@gnu.org \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).