This is the mail archive of the mailing list for the Archer project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[python] 2 bug fixes in new-backtrace

This fixes a couple of bugs in new-backtrace.
Now you can actually install a backtrace filter.


2008-12-02  Tom Tromey  <>

	* python/lib/gdb/command/ (FrameWrapper.__getattr__):
	Rename from __getattribute__.
	* python/lib/gdb/ (push_frame_filter): Add missing
	(create_frame_filter): Likewise.

diff --git a/gdb/python/lib/gdb/ b/gdb/python/lib/gdb/
index 317c6d8..2baab5f 100644
--- a/gdb/python/lib/gdb/
+++ b/gdb/python/lib/gdb/
@@ -28,12 +28,14 @@ def push_frame_filter (constructor):
 The filter will be passed an iterator as an argument.  The iterator
 will return gdb.Frame-like objects.  The filter should in turn act as
 an iterator returning such objects."""
+    global frame_filter
     if frame_filter == None:
         frame_filter = constructor
         frame_filter = lambda iterator: constructor (frame_filter (iterator))
 def create_frame_filter (iter):
+    global frame_filter
     if frame_filter is None:
         return iter
     return frame_filter (iter)
diff --git a/gdb/python/lib/gdb/command/ b/gdb/python/lib/gdb/command/
index 2884b72..9e37cef 100644
--- a/gdb/python/lib/gdb/command/
+++ b/gdb/python/lib/gdb/command/
@@ -111,7 +111,7 @@ class FrameWrapper:
             if full:
                 self.print_frame_locals (stream, func)
-    def __getattribute__ (self, name):
+    def __getattr__ (self, name):
         return getattr (self.frame, name)
 class ReverseBacktraceParameter (gdb.Parameter):

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]