public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] tromey/python: in_scope.py: Fix Python3 incompatibilities.
@ 2015-02-04 16:43 jkratoch
0 siblings, 0 replies; only message in thread
From: jkratoch @ 2015-02-04 16:43 UTC (permalink / raw)
To: archer-commits
The branch, tromey/python has been updated
via 89a19af106857845ac47c2e400f71631c36641e5 (commit)
from 8baa783f3ae8013c1ae623640d90ddb5b5ff90e5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 89a19af106857845ac47c2e400f71631c36641e5
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Feb 4 17:42:53 2015 +0100
in_scope.py: Fix Python3 incompatibilities.
-----------------------------------------------------------------------
Summary of changes:
gdb/python/lib/gdb/function/in_scope.py | 32 +++++++++++++++---------------
1 files changed, 16 insertions(+), 16 deletions(-)
First 500 lines of diff:
diff --git a/gdb/python/lib/gdb/function/in_scope.py b/gdb/python/lib/gdb/function/in_scope.py
index debb3bb..8742680 100644
--- a/gdb/python/lib/gdb/function/in_scope.py
+++ b/gdb/python/lib/gdb/function/in_scope.py
@@ -22,26 +22,26 @@ class InScope (gdb.Function):
Takes one argument for each variable name to be checked."""
def __init__ (self):
- super (InScope, self).__init__ ("in_scope")
+ super (InScope, self).__init__ ("in_scope")
def invoke (self, *vars):
if len (vars) == 0:
- raise TypeError, "in_scope takes at least one argument"
+ raise (TypeError, "in_scope takes at least one argument")
# gdb.Value isn't hashable so it can't be put in a map.
- # Convert to string first.
- wanted = set (map (lambda x: x.string (), vars))
- found = set ()
- block = gdb.selected_frame ().block ()
- while block:
- for sym in block:
- if (sym.is_argument or sym.is_constant
- or sym.is_function or sym.is_variable):
- if sym.name in wanted:
- found.add (sym.name)
-
- block = block.superblock
-
- return wanted == found
+ # Convert to string first.
+ wanted = set (map (lambda x: x.string (), vars))
+ found = set ()
+ block = gdb.selected_frame ().block ()
+ while block:
+ for sym in block:
+ if (sym.is_argument or sym.is_constant
+ or sym.is_function or sym.is_variable):
+ if sym.name in wanted:
+ found.add (sym.name)
+
+ block = block.superblock
+
+ return wanted == found
InScope ()
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-02-04 16:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-04 16:43 [SCM] tromey/python: in_scope.py: Fix Python3 incompatibilities jkratoch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).