GDB: Setting the prompt from python
Paul Smith via Gdb <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Organization | GNU's Not UNIX! |
| Message-ID | <[email protected]> |
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!!