This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: new testsuite function for c++ ptype
- From: Andrew Cagney <cagney at gnu dot org>
- To: Michael Chastain <mec dot gnu at mindspring dot com>
- Cc: gdb at sources dot redhat dot com, david dot carlton at sun dot com, carlton at bactrian dot org
- Date: Tue, 03 Aug 2004 15:16:09 -0400
- Subject: Re: new testsuite function for c++ ptype
- References: <410F9C94.nail8KU11N4AM@mindspring.com>
Here is a sample. Consider the C++ class:
class A : virtual public V
{
public:
virtual int f();
private:
int a;
};
The call to test this is:
cp_test_ptype_class "ptype A" "ptype A" \
"class" "VA" { "public virtual V" } \
{ "V" } \
{
{ "private" "int a;" }
} \
{
{ "public" "virtual int f();" }
} \
""
Yes, we desperatly need this. Some random ideas.
- can the list of fields be grouped vis:
.... {
{
{ "private" "int a;" }
}
{
{ "public" "virtual int f();" }
}
} ...
so that the formatting / indentation looks more C++ like.
- could, for fields and methods, they have explicit tag fields vis:
{
{ field private "int a;" }
{ method public "virtual int f();" }
}
or:
{
field { private "int a;" }
method { public "virtual int f();" }
}
so that there are more textual clues on what is going on (it's a very
long parameter list)
- I don't undersand why "V" appears twice in:
> "class" "VA" { "public virtual V" } \
> { "V" } \
I guess I'm really asking if "V" can be extracted from "public virtual V"
Have fun.
Andrew