@@ -215,43 +215,22 @@ def get_stack_trace(self, source=None, script=None,
215215 elif script :
216216 args += [script ]
217217
218- # print args
219- # print ' '.join(args)
220-
221218 # Use "args" to invoke gdb, capturing stdout, stderr:
222219 out , err = run_gdb (* args , PYTHONHASHSEED = '0' )
223220
224- errlines = err .splitlines ()
225- unexpected_errlines = []
226-
227- # Ignore some benign messages on stderr.
228- ignore_patterns = (
229- 'Function "%s" not defined.' % breakpoint ,
230- 'Do you need "set solib-search-path" or '
231- '"set sysroot"?' ,
232- # BFD: /usr/lib/debug/(...): unable to initialize decompress
233- # status for section .debug_aranges
234- 'BFD: ' ,
235- # ignore all warnings
236- 'warning: ' ,
237- )
238- for line in errlines :
239- if not line :
240- continue
241- # bpo34007: Sometimes some versions of the shared libraries that
242- # are part of the traceback are compiled in optimised mode and the
243- # Program Counter (PC) is not present, not allowing gdb to walk the
244- # frames back. When this happens, the Python bindings of gdb raise
245- # an exception, making the test impossible to succeed.
246- if "PC not saved" in line :
247- raise unittest .SkipTest ("gdb cannot walk the frame object"
248- " because the Program Counter is"
249- " not present" )
250- if not line .startswith (ignore_patterns ):
251- unexpected_errlines .append (line )
252-
253- # Ensure no unexpected error messages:
254- self .assertEqual (unexpected_errlines , [])
221+ for line in err .splitlines ():
222+ print >> sys .stderr , line
223+
224+ # bpo-34007: Sometimes some versions of the shared libraries that
225+ # are part of the traceback are compiled in optimised mode and the
226+ # Program Counter (PC) is not present, not allowing gdb to walk the
227+ # frames back. When this happens, the Python bindings of gdb raise
228+ # an exception, making the test impossible to succeed.
229+ if "PC not saved" in err :
230+ raise unittest .SkipTest ("gdb cannot walk the frame object"
231+ " because the Program Counter is"
232+ " not present" )
233+
255234 return out
256235
257236 def get_gdb_repr (self , source ,
0 commit comments