[Python-checkins] cpython (merge 3.4 -> default): Issue #23881: Only use entry-values with gdb 7.4 in tests.

serhiy.storchaka python-checkins at python.org
Fri Feb 6 08:01:45 CET 2015


https://hg.python.org/cpython/rev/981e108039f1
changeset:   94533:981e108039f1
parent:      94531:e7dbef447157
parent:      94532:30e6c8caa5b9
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Fri Feb 06 08:35:54 2015 +0200
summary:
  Issue #23881: Only use entry-values with gdb 7.4 in tests.
Fixes a regression in issue #22765.  Patch by Vinson Lee.

files:
  Lib/test/test_gdb.py |  18 ++++++++++--------
  1 files changed, 10 insertions(+), 8 deletions(-)


diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py
--- a/Lib/test/test_gdb.py
+++ b/Lib/test/test_gdb.py
@@ -124,14 +124,6 @@
         commands = ['set breakpoint pending yes',
                     'break %s' % breakpoint,
 
-                    # GDB as of 7.4 (?) onwards can distinguish between the
-                    # value of a variable at entry vs current value:
-                    #   http://sourceware.org/gdb/onlinedocs/gdb/Variables.html
-                    # which leads to the selftests failing with errors like this:
-                    #   AssertionError: 'v at entry=()' != '()'
-                    # Disable this:
-                    'set print entry-values no',
-
                     # The tests assume that the first frame of printed
                     #  backtrace will not contain program counter,
                     #  that is however not guaranteed by gdb
@@ -143,6 +135,16 @@
                     'set print address off',
 
                     'run']
+
+        # GDB as of 7.4 onwards can distinguish between the
+        # value of a variable at entry vs current value:
+        #   http://sourceware.org/gdb/onlinedocs/gdb/Variables.html
+        # which leads to the selftests failing with errors like this:
+        #   AssertionError: 'v at entry=()' != '()'
+        # Disable this:
+        if (gdb_major_version, gdb_minor_version) >= (7, 4):
+            commands += ['set print entry-values no']
+
         if cmds_after_breakpoint:
             commands += cmds_after_breakpoint
         else:

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list