Skip to content

Commit

Permalink
bpo-34007: Skip traceback tests if the Program Counter is not availab…
Browse files Browse the repository at this point in the history
…le. (GH-9018)

Sometimes some versions of the shared libraries that are part of the
traceback are compiled in optimised mode and the Program Counter (PC)
is not present, not allowing gdb to walk the frames back. When this
happens, the Python bindings of gdb raise an exception, making the
test impossible to succeed.
(cherry picked from commit f2ef51f)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
  • Loading branch information
miss-islington and pablogsal committed Aug 31, 2018
1 parent d8b103b commit 5d594f3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Lib/test/test_gdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,15 @@ def get_stack_trace(self, source=None, script=None,
for line in errlines:
if not line:
continue
# bpo34007: Sometimes some versions of the shared libraries that
# are part of the traceback are compiled in optimised mode and the
# Program Counter (PC) is not present, not allowing gdb to walk the
# frames back. When this happens, the Python bindings of gdb raise
# an exception, making the test impossible to succeed.
if "PC not saved" in line:
raise unittest.SkipTest("gdb cannot walk the frame object"
" because the Program Counter is"
" not present")
if not line.startswith(ignore_patterns):
unexpected_errlines.append(line)

Expand Down

0 comments on commit 5d594f3

Please sign in to comment.