From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13179 invoked by alias); 24 Apr 2003 20:14:26 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 13172 invoked from network); 24 Apr 2003 20:14:26 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 24 Apr 2003 20:14:26 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h3OKEQD24306 for ; Thu, 24 Apr 2003 16:14:26 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h3OKEQq14310 for ; Thu, 24 Apr 2003 16:14:26 -0400 Received: from [150.1.200.14] (vpn50-53.rdu.redhat.com [172.16.50.53]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h3OKEPh31584 for ; Thu, 24 Apr 2003 16:14:25 -0400 Subject: [RFA] varobj: call CHECK_TYPEDEF From: Keith Seitz To: "gdb-patches@sources.redhat.com" Content-Type: multipart/mixed; boundary="=-1/XkYSKDOzkIEn62n3uO" Organization: Message-Id: <1051215397.1538.43.camel@lindt.uglyboxes.com> Mime-Version: 1.0 Date: Thu, 24 Apr 2003 20:47:00 -0000 X-SW-Source: 2003-04/txt/msg00467.txt.bz2 --=-1/XkYSKDOzkIEn62n3uO Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 495 Hi, Well, I am not really sure what this does, or why it is necessary (check_typedef has no comment in gdbtypes.c), but it's what type_print code does. Occasionally, some (C++?) files can show no child objects because nfields will be zero. After calling CHECK_TYPEDEF, nfields is suddenly non-zero. This was first reported as insight/219. Keith ChangeLog 2003-04-24 Keith Seitz * varobj.c (get_type): Call CHECK_TYPEDEF. (get_type_deref): Likewise. --=-1/XkYSKDOzkIEn62n3uO Content-Disposition: inline; filename=varobj-check_typedef.patch Content-Type: text/x-patch; name=varobj-check_typedef.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-length: 651 Index: varobj.c =================================================================== RCS file: /cvs/src/src/gdb/varobj.c,v retrieving revision 1.38 diff -u -p -r1.38 varobj.c --- varobj.c 4 Dec 2002 00:05:54 -0000 1.38 +++ varobj.c 24 Apr 2003 20:12:52 -0000 @@ -1394,6 +1394,7 @@ get_type (struct varobj *var) while (type != NULL && TYPE_CODE (type) == TYPE_CODE_TYPEDEF) type = TYPE_TARGET_TYPE (type); + CHECK_TYPEDEF (type); return type; } @@ -1409,6 +1410,7 @@ get_type_deref (struct varobj *var) || TYPE_CODE (type) == TYPE_CODE_REF)) type = get_target_type (type); + CHECK_TYPEDEF (type); return type; } --=-1/XkYSKDOzkIEn62n3uO--