From: Tom Tromey <tromey@redhat.com>
To: Niko Sams <niko.sams@gmail.com>
Cc: gdb <gdb@sourceware.org>
Subject: Re: Modify address of a gdb.Value
Date: Wed, 17 Jun 2009 16:21:00 -0000 [thread overview]
Message-ID: <m3d492zv8x.fsf@fleche.redhat.com> (raw)
In-Reply-To: <629542d40906162251v4a4723f3l9423eec5998d0ee6@mail.gmail.com> (Niko Sams's message of "Wed\, 17 Jun 2009 07\:51\:28 +0200")
>>>>> "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
prev parent reply other threads:[~2009-06-17 16:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-15 6:22 Niko Sams
2009-06-15 16:43 ` Tom Tromey
2009-06-15 17:05 ` Vladimir Prus
2009-06-15 17:33 ` Paul Pluzhnikov
2009-06-15 19:27 ` Tom Tromey
2009-06-17 5:51 ` Niko Sams
2009-06-17 15:52 ` Niko Sams
2009-06-17 16:21 ` Tom Tromey [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3d492zv8x.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb@sourceware.org \
--cc=niko.sams@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox