Modify address of a gdb.Value
Tom Tromey
tromey@redhat.com
Wed Jun 17 16:21:00 GMT 2009
>>>>> "Niko" == Niko Sams <niko.sams@gmail.com> writes:
Niko> I tried to implement this payload method in python
[...]
Niko> the obvious solution would be gdb.lookup_type('QMapPayloadNode<%s,
Niko> %s>' % (self.ktype, self.vtype)).sizeof
Niko> but that doesn't work, i get this error:
Niko> RuntimeError: No type named QMapPayloadNode<int, QString *>
Niko> This is because that QMapPayloadNode is not instanciated, it's only
Niko> used for this sizeof.
Niko> So any idea how i can compute the payload?
There's no easy way. gdb only knows what the compiler tells it, and
in this case, the information is omitted.
You could try recreating the ABI struct layout rules in Python.
This is a pain but not insanely hard.
Tom
More information about the Gdb
mailing list