This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: new testsuite function for c++ ptype


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]