aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2010-05-19 23:32:24 +0000
committerDoug Evans <dje@google.com>2010-05-19 23:32:24 +0000
commit0bf0f8c4cd47073fe38adb1053787fe10d66b5d3 (patch)
tree3c69ce6210fb0075e1ac473d64bb7dd3a435a1b1
parent3a1d4620d60dd678aa4d5a62f877caf0a5f209f1 (diff)
downloadgdb-0bf0f8c4cd47073fe38adb1053787fe10d66b5d3.zip
gdb-0bf0f8c4cd47073fe38adb1053787fe10d66b5d3.tar.gz
gdb-0bf0f8c4cd47073fe38adb1053787fe10d66b5d3.tar.bz2
* python.c (gdbpy_print_stack): Ensure output ends with a newline.
-rw-r--r--gdb/ChangeLog2
-rw-r--r--gdb/python/python.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0c827b9..5cba88b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,7 @@
2010-05-19 Doug Evans <dje@google.com>
+ * python.c (gdbpy_print_stack): Ensure output ends with a newline.
+
* python.c (source_python_script): Add comment.
(source_python_script_for_objfile): Remove unnecessary call to
gdbpy_print_stack.
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 ();
}