Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: Python pretty-printing [3/6]
Date: Tue, 07 Apr 2009 19:52:00 -0000	[thread overview]
Message-ID: <m3tz50z1g7.fsf@fleche.redhat.com> (raw)
In-Reply-To: <ufxgpixbv.fsf@gnu.org> (Eli Zaretskii's message of "Fri\, 03 Apr 2009 18\:14\:12 +0300")

>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

Tom> +@item bitpos
Tom> +This attribute is not available for @code{static} fields.  For
Tom> +non-@code{static} fields, the value is the bit position of the field.

Eli> What are "static fields"?  Should that be explained here?

A static field is a C++ (and Java, and probably others) concept.  I
don't think we should explain it, we can just refer to C++.

Tom> +@item type
Tom> +The type of the field.  This is usually an instance of @code{Type},
Tom> +but it can be @code{None} in some situations.

Eli> Should we tell what are those situations where you get "None", or at
Eli> least give an example or two?

I would like to but I don't know when this can happen.  Basically it
is when FIELD_TYPE is NULL, but I don't know the conditions under
which this can happen.

Tom> +@defmethod Type tag
Tom> +Return the tag name for this type.  The tag name is the name after
Tom> +@code{struct}, @code{union}, or @code{enum} in C; not all languages
Tom> +have this concept.

Eli> Should we talk about more than just C?  (I assume that at least one
Eli> more language has some of these tag names.)

C++ does, though I think in C++ the tag is also the name.  I don't
know about others.

Tom> +For a pointer type, the target type is the type of the pointed-to
Tom> +object.  For an array type, the target type is the type of the
Tom> +elements of the array.  For a function type, the target type is the
Tom> +type of the return value.  For a complex type, the target type is the
Tom> +type of the elements.  For a typedef, the target type is the aliased
Tom> +type.

Eli> Again, this sounds specific to C and C++; isn't there something useful
Eli> we can tell for other languages, like Ada or Pascal or Java?

I can update the places that I know to be C-specific.  Much of this
does not apply to Java.  I don't know Ada or Pascal, so someone else
would have to supply that information.

Tom> +@defmethod Type template_argument n
Tom> +If this @code{gdb.Type} is a template type, this will return a new
Tom> +@code{gdb.Type} which represents the type of the @var{n}th template
Tom> +argument.

Eli> Is this C++-specific?  If so, what will happen in other languages?

I assume it is specific to C++, but I can't say for certain.
I will update the text to indicate that an exception is thrown for
non-template types.

Tom> +@item TYPE_CODE_METHOD
Tom> +A C++ method type.

Eli> Would it make sense to call it TYPE_CODE_CPP_METHOD, to make more
Eli> clear that it's C++-specific (is it?)?  Likewise for other
Eli> C++-specific constants described below.

I believe Java will use this as well as C++.
I assume that some other languages provide methods, but I don't know.

Tom


  reply	other threads:[~2009-04-07 19:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-02 20:55 Tom Tromey
2009-04-03 15:16 ` Eli Zaretskii
2009-04-07 19:52   ` Tom Tromey [this message]
2009-04-07 21:45     ` Eli Zaretskii
2009-04-03 16:30 ` Daniel Jacobowitz
2009-04-06 23:26   ` Tom Tromey
2009-04-07  0:34     ` Thiago Jung Bauermann
2009-04-07  1:16     ` Daniel Jacobowitz
2009-04-07  2:03       ` Thiago Jung Bauermann
2009-04-07  2:27         ` Daniel Jacobowitz
2009-04-03 20:34 ` Thiago Jung Bauermann
2009-04-06 23:32   ` Tom Tromey
2009-04-08 18:26   ` Tom Tromey
2009-04-08 18:39 ` Tom Tromey
2009-04-08 19:23   ` Eli Zaretskii
2009-04-09  1:16     ` Tom Tromey

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=m3tz50z1g7.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@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