public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* GDB: Setting the prompt from python
@ 2020-10-18  3:26 Paul Smith
  2020-10-18  9:24 ` Matt Rice
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Smith @ 2020-10-18  3:26 UTC (permalink / raw)
  To: gdb

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!!


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-18 14:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-18  3:26 GDB: Setting the prompt from python Paul Smith
2020-10-18  9:24 ` Matt Rice
2020-10-18 14:08   ` Paul Smith
2020-10-18 14:45     ` Matt Rice

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).