aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/python.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 9c1e8bd..3110328 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -416,7 +416,13 @@ void
gdbpy_print_stack (void)
{
if (gdbpy_should_print_stack)
- PyErr_Print ();
+ {
+ PyErr_Print ();
+ /* PyErr_Print doesn't necessarily end output with a newline.
+ This works because Python's stdout/stderr is fed through
+ printf_filtered. */
+ begin_line ();
+ }
else
PyErr_Clear ();
}