mirror of https://github.com/python/cpython
bpo-38239: Fix test_gdb for Link Time Optimization (LTO) (GH-16422)
This commit is contained in:
parent
12f2f177fc
commit
64b4a3a2de
|
@ -255,7 +255,14 @@ class DebuggerTests(unittest.TestCase):
|
||||||
# gdb can insert additional '\n' and space characters in various places
|
# gdb can insert additional '\n' and space characters in various places
|
||||||
# in its output, depending on the width of the terminal it's connected
|
# in its output, depending on the width of the terminal it's connected
|
||||||
# to (using its "wrap_here" function)
|
# 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.*',
|
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)
|
gdb_output, re.DOTALL)
|
||||||
if not m:
|
if not m:
|
||||||
self.fail('Unexpected gdb output: %r\n%s' % (gdb_output, gdb_output))
|
self.fail('Unexpected gdb output: %r\n%s' % (gdb_output, gdb_output))
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Fix test_gdb for Link Time Optimization (LTO) builds.
|
Loading…
Reference in New Issue