From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14894 invoked by alias); 7 Apr 2009 19:52:42 -0000 Received: (qmail 14886 invoked by uid 22791); 7 Apr 2009 19:52:41 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Apr 2009 19:52:34 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n37JqDrA012875; Tue, 7 Apr 2009 15:52:13 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n37JqDp5029628; Tue, 7 Apr 2009 15:52:13 -0400 Received: from opsy.redhat.com (vpn-13-55.rdu.redhat.com [10.11.13.55]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n37JqBAX013653; Tue, 7 Apr 2009 15:52:12 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 4FC073781B3; Tue, 7 Apr 2009 13:52:09 -0600 (MDT) To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: Python pretty-printing [3/6] References: From: Tom Tromey Reply-To: Tom Tromey Date: Tue, 07 Apr 2009 19:52:00 -0000 In-Reply-To: (Eli Zaretskii's message of "Fri\, 03 Apr 2009 18\:14\:12 +0300") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00131.txt.bz2 >>>>> "Eli" == Eli Zaretskii 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