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