8000 [3.8] bpo-38239: Fix test_gdb for Link Time Optimization (LTO) (GH-16422) by miss-islington · Pull Request #16424 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.8] bpo-38239: Fix test_gdb for Link Time Optimization (LTO) (GH-16422) #16424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Lib/test/test_gdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,15 @@ def get_gdb_repr(self, source,
# gdb can insert additional '\n' and space characters in various places
# in its output, depending on the width of the terminal it's connected
# to (using its "wrap_here" function)
m = re.match(r'.*#0\s+builtin_id\s+\(self\=.*,\s+v=\s*(.*?)?\)\s+at\s+\S*Python/bltinmodule.c.*',
gdb_output, re.DOTALL)
m = re.search(
# Match '#0 builtin_id(self=..., v=...)'
r'#0\s+builtin_id\s+\(self\=.*,\s+v=\s*(.*?)?\)'
# Match ' at Python/bltinmodule.c'.
# bpo-38239: builtin_id() is defined in Python/bltinmodule.c,
# but accept any "Directory\file.c" to support Link Time
# Optimization (LTO).
r'\s+at\s+\S*[A-Za-z]+/[A-Za-z0-9_-]+\.c',
gdb_output, re.DOTALL)
if not m:
self.fail('Unexpected gdb output: %r\n%s' % (gdb_output, gdb_output))
return m.group(1), gdb_output
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix test_gdb for Link Time Optimization (LTO) builds.
0