@@ -124,14 +124,6 @@ def get_stack_trace(self, source=None, script=None,
124
124
commands = ['set breakpoint pending yes' ,
125
125
'break %s' % breakpoint ,
126
126
127
- # GDB as of 7.4 (?) onwards can distinguish between the
128
- # value of a variable at entry vs current value:
129
- # http://sourceware.org/gdb/onlinedocs/gdb/Variables.html
130
- # which leads to the selftests failing with errors like this:
131
- # AssertionError: 'v@entry=()' != '()'
132
- # Disable this:
133
- 'set print entry-values no' ,
134
-
135
127
# The tests assume that the first frame of printed
136
128
# backtrace will not contain program counter,
137
129
# that is however not guaranteed by gdb
@@ -143,6 +135,16 @@ def get_stack_trace(self, source=None, script=None,
143
135
'set print address off' ,
144
136
145
137
'run' ]
138
+
139
+ # GDB as of 7.4 onwards can distinguish between the
140
+ # value of a variable at entry vs current value:
141
+ # http://sourceware.org/gdb/onlinedocs/gdb/Variables.html
142
+ # which leads to the selftests failing with errors like this:
143
+ # AssertionError: 'v@entry=()' != '()'
144
+ # Disable this:
145
+ if (gdb_major_version , gdb_minor_version ) >= (7 , 4 ):
146
+ commands += ['set print entry-values no' ]
147
+
146
148
if cmds_after_breakpoint :
147
149
commands += cmds_after_breakpoint
148
150
else :
0 commit comments