python2/00189-gdb-py-bt-dont-raise-exception-from-eval.patch
Bohuslav Kabrda c86b2c6e57 Fix processing gdb py-bt command in eval calls.
Resolves: rhbz#1008154
2013-10-08 14:04:54 +02:00

12 lines
553 B
Diff

--- Python-2.7.5-orig/Tools/gdb/libpython.py 2013-05-12 03:32:54.000000000 +0000
+++ Python-2.7.5-orig/Tools/gdb/libpython.py 2013-09-15 09:56:25.494000000 +0000
@@ -887,6 +887,8 @@
newline character'''
if self.is_optimized_out():
return '(frame information optimized out)'
+ if self.filename() == '<string>':
+ return '(in an eval block)'
with open(self.filename(), 'r') as f:
all_lines = f.readlines()
# Convert from 1-based current_line_num to 0-based list offset: