From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8915 invoked by alias); 20 Dec 2011 16:40:14 -0000 Received: (qmail 8738 invoked by uid 22791); 20 Dec 2011 16:40:11 -0000 X-SWARE-Spam-Status: No, hits=-5.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_XG X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 20 Dec 2011 16:39:53 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pBKGdrjU007246 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 20 Dec 2011 11:39:53 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pBKGdqj3005962; Tue, 20 Dec 2011 11:39:53 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id pBKGdpoR011541; Tue, 20 Dec 2011 11:39:51 -0500 From: Tom Tromey To: xgsa Cc: gdb-patches@sourceware.org Subject: Re: set print object on should affect MI varobjs (PR 13393) References: <4ED92C05.9080803@yandex.ru> Date: Tue, 20 Dec 2011 17:47:00 -0000 In-Reply-To: <4ED92C05.9080803@yandex.ru> (xgsa@yandex.ru's message of "Fri, 02 Dec 2011 21:50:29 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 2011-12/txt/msg00685.txt.bz2 >>>>> ">" == xgsa writes: >> (it seems that my previous message about this patch was lost somehow, >> so I resend it again; sorry, if I sent it twice) No problem. Thanks for working on this. >> 2011-12-02 Anton Gorenkov >> PR 13393 I think it has to mention the category for the commit->bz scanner to work. Your patch got wrapped by your mailer, making it harder to read. >> -static struct type * >> +struct type * >> make_qualified_type (struct type *type, int new_flags, >> struct type *storage) I'd prefer not to export this. I think you can just use make_cv_type instead. >> + else if (TYPE_CODE(type) == TYPE_CODE_PTR) Missing space before the open paren here. This occurs a few times. >> +struct type * >> +actual_type (struct value *value, int resolve_simple_types) >> +{ This should have an introductory comment saying to look at value.h. >> + struct type *real_type; >> + real_type = value_rtti_target_type ( value, 0, 0, 0 ); Blank line between declaration and code. This has an extra space after "(" and before ")". >> +/* Returns value_type() or value_enclosing_type () depending on Remove the '()'s. >> + value_print_options.objectprint. >> + >> + If RESOLVE_SIMPLE_TYPES is 0 the enclosing type will be resolved >> + only for pointers and references, else it will be returned also >> + all the types (e.g. for structures). This option is useful >> + to prevent retrieving enclosing type for the base classes fields */ Sentences should end with a period followed by 2 spaces. The last sentence needs this too. >> + struct type *enclosing_type; >> + var->type = value_type (value); Blank line. >> + enclosing_type = actual_type(value, 0); Missing space. >> + if (check_typedef (enclosing_type) != check_typedef (var->type)) >> + { >> + var->type = enclosing_type; >> + value = value_cast (enclosing_type, value); Will this always do the right thing? It seems questionable. >> + // Access a real type of the value (if necessary and possible) GDB is C90 and can't use // comments. >> + enclosing_type = actual_type(*value, 1); I don't understand why this one call has a '1' here. >> + // It is necessary to access a real type (via RTTI) >> + if (opts.objectprint) >> + { >> + value = var->value; >> + lookup_actual_type = TYPE_CODE (var->type) == TYPE_CODE_REF >> || TYPE_CODE (var->type) == TYPE_CODE_PTR; This line has to be reformatted per the GNU coding standards. Do you have copyright assignment papers filed with the FSF? If not, contact me off-list to get started with this. We can't put anything in until the paperwork is finished. Tom