Extending gdb.Value

Joel Borggrén-Franck
2010-09-24T07:29:15Z

So I noticed today that I cant extend gdb.Value:

(gdb) python class foo(gdb.Value): pass
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: Error when calling the metaclass bases
type 'gdb.Value' is not an acceptable base type
Error while executing Python code.
(gdb)

So a couple of questions regarding this:

1) Is this intended?
2) If so, why?

I have just started writhing magic proxies around gdb.Value, which is quite
doable in Python, but I realized it might be easier to just 'fix' the basic
problem if there is no explicit reason to disallow using gdb.Value as a
base.

Cheers
Joel Borggrén-Franck