diff --git a/gdb/python/lib/gdb/command/xmethods.py b/gdb/python/lib/gdb/command/xmethods.py index 55cc81f..206313e 100644 --- a/gdb/python/lib/gdb/command/xmethods.py +++ b/gdb/python/lib/gdb/command/xmethods.py @@ -140,7 +140,7 @@ def print_xm_info(xm_dict, name_re): def set_xm_status1(xm_dict, name_re, status): """Set the status (enabled/disabled) of a dictionary of xmethods.""" - for locus_str, matchers in xm_dict.iteritems(): + for locus_str, matchers in xm_dict.items(): for matcher in matchers: if not name_re: # If the name regex is missing, then set the status of the diff --git a/gdb/testsuite/gdb.python/py-xmethods.py b/gdb/testsuite/gdb.python/py-xmethods.py index 6fecf2b..26df3de 100644 --- a/gdb/testsuite/gdb.python/py-xmethods.py +++ b/gdb/testsuite/gdb.python/py-xmethods.py @@ -40,7 +40,7 @@ def A_geta(obj): def A_getarrayind(obj, index): - print 'From Python :' + print ('From Python :') return obj['array'][index] @@ -61,7 +61,7 @@ class E_method_char_worker(XMethodWorker): return gdb.lookup_type('char') def __call__(self, obj, arg): - print 'From Python ' + print ('From Python ') return None @@ -73,7 +73,7 @@ class E_method_int_worker(XMethodWorker): return gdb.lookup_type('int') def __call__(self, obj, arg): - print 'From Python ' + print ('From Python ') return None @@ -86,7 +86,7 @@ class E_method_matcher(XMethodMatcher): 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: