From: <Paul_Koning@Dell.com>
To: <gdb@sourceware.org>
Subject: Python: gdb.Type.template_argument method issue
Date: Wed, 14 Sep 2011 19:33:00 -0000 [thread overview]
Message-ID: <09787EF419216C41A903FD14EE5506DD0307EF93D7@AUSX7MCPC103.AMER.DELL.COM> (raw)
The template_argument method assumes that all template arguments are types. While that's the most common, other things are also found in the wild. My C++ book says that the arguments can be integers, enums, pointers, references, or pointer-to-member constant values. (GCC doesn't want to accept pointers and references, perhaps because it thinks they are relocatable.)
Looking at the code, it appears that the template_argument method will be looking at the demangled type string. It seems that that's insufficient to sort out exactly what a given template argument is. For example, if it's an enum, the method will simply see the enum value name, but I don't see how it would know which enum type that is so that doesn't allow it to nail down exactly what we have.
I figure that the thing to do would be to have the method return either a gdb.Type or a gdb.Value, depending on what the template argument is. But it looks like it needs more detailed knowledge about the template arguments than it has in the current logic, and I don't know enough GDB to know where to look for that.
Any hints on where to look?
paul
next reply other threads:[~2011-09-14 19:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-14 19:33 Paul_Koning [this message]
2011-09-15 11:17 ` Phil Muldoon
2011-09-15 14:06 ` Paul_Koning
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=09787EF419216C41A903FD14EE5506DD0307EF93D7@AUSX7MCPC103.AMER.DELL.COM \
--to=paul_koning@dell.com \
--cc=gdb@sourceware.org \
/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