diff options
author | Phil Muldoon <pmuldoon@redhat.com> | 2011-07-21 11:03:48 +0000 |
---|---|---|
committer | Phil Muldoon <pmuldoon@redhat.com> | 2011-07-21 11:03:48 +0000 |
commit | d17b6f81012b6844de08934193fe7cb7db8cbd5f (patch) | |
tree | 38de35dc7c7f44f1f76fbe6af3bed4037b600e00 /gdb/doc/gdb.texinfo | |
parent | 3779080d04bb9504542076e02969f77dff46ae63 (diff) | |
download | gdb-d17b6f81012b6844de08934193fe7cb7db8cbd5f.zip gdb-d17b6f81012b6844de08934193fe7cb7db8cbd5f.tar.gz gdb-d17b6f81012b6844de08934193fe7cb7db8cbd5f.tar.bz2 |
2011-07-21 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey <tromey@redhat.com>
* top.c (set_prompt): Rewrite to free previous prompt, free
asynch_new_prompt and set both on new prompts.
* event-top.c (display_gdb_prompt): Add prompt substitution
logic.
* python/python.c (before_prompt_hook): New function.
2011-07-21 Phil Muldoon <pmuldoon@redhat.com>
* gdb.python/python.exp: Add prompt substitution tests.
2011-07-21 Phil Muldoon <pmuldoon@redhat.com>
* observer.texi (GDB Observers): Add before_prompt observer.
* gdb.texinfo (Basic Python): Add documentation for prompt
substitution.
Diffstat (limited to 'gdb/doc/gdb.texinfo')
-rw-r--r-- | gdb/doc/gdb.texinfo | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 3a3a9fb..5b26bbb 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -21080,6 +21080,22 @@ provided, it is decoded the way that @value{GDBN}'s inbuilt @code{break} or @code{edit} commands do (@pxref{Specify Location}). @end defun +@defop Operation {@value{GDBN}} prompt_hook current_prompt +If @var{prompt_hook} is callable, @value{GDBN} will call the method +assigned to this operation before a prompt is displayed by +@value{GDBN}. + +The parameter @code{current_prompt} contains the current @value{GDBN} +prompt. This method must return a Python string, or @code{None}. If +a string is returned, the @value{GDBN} prompt will be set to that +string. If @code{None} is returned, @value{GDBN} will continue to use +the current prompt. + +Some prompts cannot be substituted in @value{GDBN}. Secondary prompts +such as those used by readline for command input, and annotation +related prompts are prohibited from being changed. +@end defop + @node Exception Handling @subsubsection Exception Handling @cindex python exceptions |