+2014-08-15 Siva Chandra Reddy <sivachandra@google.com>
+
+ * gdb.python/py-xmethods.py (A_getarrayind)
+ (E_method_char_worker.__call__, E_method_int_worker.__call__):
+ Use 'print' with function call syntax.
+ (E_method_matcher.match): Fix tab vs space indentation mixup.
+
2014-08-15 Yao Qi <yao@codesourcery.com>
* gdb.trace/tfile.exp: Return -1 if generate_tracefile returns
def A_plus_A(obj, opr):
- print ('From Python <A_plus_A>:')
+ print('From Python <A_plus_A>:')
return obj['a'] + opr['a']
def plus_plus_A(obj):
- print ('From Python <plus_plus_A>:')
+ print('From Python <plus_plus_A>:')
return obj['a'] + 1
def A_geta(obj):
- print ('From Python <A_geta>:')
+ print('From Python <A_geta>:')
return obj['a']
def A_getarrayind(obj, index):
- print 'From Python <A_getarrayind>:'
+ print('From Python <A_getarrayind>:')
return obj['array'][index]
return gdb.lookup_type('char')
def __call__(self, obj, arg):
- print 'From Python <E_method_char>'
+ print('From Python <E_method_char>')
return None
return gdb.lookup_type('int')
def __call__(self, obj, arg):
- print 'From Python <E_method_int>'
+ print('From Python <E_method_int>')
return None
class_tag = class_type.unqualified().tag
if not re.match('^dop::E$', class_tag):
return None
- if not re.match('^method$', method_name):
+ if not re.match('^method$', method_name):
return None
workers = []
if self.methods[0].enabled:
pass
def __call__(self, obj):
- print ('From Python G<>::size_diff()')
+ print('From Python G<>::size_diff()')
return (self._method_template_type.sizeof -
self._class_template_type.sizeof)
pass
def __call__(self, obj):
- print ('From Python G<>::size_mul()')
+ print('From Python G<>::size_mul()')
return self._class_template_type.sizeof * self._method_template_val
return self._method_template_type
def __call__(self, obj, arg):
- print ('From Python G<>::mul()')
+ print('From Python G<>::mul()')
return obj['t'] * arg