Fix up cast in gdb macros
authorAlexander Larsson <alexl@redhat.com>
Fri, 25 Sep 2009 07:50:49 +0000 (09:50 +0200)
committerAlexander Larsson <alexl@redhat.com>
Mon, 28 Sep 2009 13:48:17 +0000 (15:48 +0200)
We need to actually assign the casted value somewhere.

glib/glib.py

index 494eb69827fe8a444abe40a36958294c44cf7067..0953aee7cab35d860cc7087e3c22f8ab04504179 100644 (file)
@@ -214,7 +214,7 @@ class ForeachCommand (gdb.Command):
         return (var, val, command)
 
     def do_iter(self, arg, item, command):
-        item.cast (gdb.lookup_type("void").pointer())
+        item = item.cast (gdb.lookup_type("void").pointer())
         item = long(item)
         to_eval = "set $%s = (void *)0x%x\n"%(arg, item)
         gdb.execute(to_eval)