From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5032 invoked by alias); 16 Aug 2007 22:39:21 -0000 Received: (qmail 4879 invoked by uid 22791); 16 Aug 2007 22:39:20 -0000 X-Spam-Check-By: sourceware.org Received: from igw1.br.ibm.com (HELO igw1.br.ibm.com) (32.104.18.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 16 Aug 2007 22:39:12 +0000 Received: from mailhub3.br.ibm.com (mailhub3 [9.18.232.110]) by igw1.br.ibm.com (Postfix) with ESMTP id D7106148151 for ; Thu, 16 Aug 2007 19:22:31 -0300 (BRT) Received: from d24av02.br.ibm.com (d24av02.br.ibm.com [9.18.232.47]) by mailhub3.br.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id l7GMd94c1781982 for ; Thu, 16 Aug 2007 19:39:09 -0300 Received: from d24av02.br.ibm.com (loopback [127.0.0.1]) by d24av02.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l7GMd9wR025425 for ; Thu, 16 Aug 2007 19:39:09 -0300 Received: from [9.18.238.45] (dyn531778.br.ibm.com [9.18.238.45]) by d24av02.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l7GMd9mX025422 for ; Thu, 16 Aug 2007 19:39:09 -0300 Message-ID: <46C4D20E.1010703@linux.vnet.ibm.com> Date: Thu, 16 Aug 2007 22:39:00 -0000 From: Carlos Eduardo Seo User-Agent: Thunderbird 2.0.0.6 (X11/20070802) MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [patch] ptype: show members of an unnamed struct inside an union OpenPGP: id=8BFFA900 Content-Type: multipart/mixed; boundary="------------090508020709040606000908" X-IsSubscribed: yes 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: 2007-08/txt/msg00330.txt.bz2 This is a multi-part message in MIME format. --------------090508020709040606000908 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 566 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello! The attached patched fixes an issue described on this post: http://sourceware.org/ml/gdb-patches/2002-04/msg01114.html Any comments? Thanks and regards, - -- Carlos Eduardo Seo Software Engineer IBM Linux Technology Center E-Mail: cseo@linux.vnet.ibm.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGxNINqvq7Aov/qQARAvUXAKCLQ5hF+jNzreDyiubG2cHFRbDMNQCfYudG Kuve0/kwqXrVF9k8rxLwtto= =8Qjd -----END PGP SIGNATURE----- --------------090508020709040606000908 Content-Type: text/plain; name="ptype_issue.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ptype_issue.diff" Content-length: 715 2007-08-16 Carlos Eduardo Seo gdb/c-typeprint.c (c_type_print_base): check value of TYPE_NFIELDS (type) when displaying members of an unnamed struct inside an union. Index: src-git/gdb/c-typeprint.c =================================================================== --- src-git.orig/gdb/c-typeprint.c 2007-08-16 15:28:04.000000000 -0700 +++ src-git/gdb/c-typeprint.c 2007-08-16 15:29:07.000000000 -0700 @@ -735,7 +735,7 @@ fputs_filtered (" ", stream); } wrap_here (" "); - if (show < 0) + if ((show < 0) && (TYPE_NFIELDS (type) == 0)) { /* If we just printed a tag name, no need to print anything else. */ if (TYPE_TAG_NAME (type) == NULL) --------------090508020709040606000908 Content-Type: application/octet-stream; name="ptype_issue.diff.sig" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="ptype_issue.diff.sig" Content-length: 90 iD8DBQBGxNINqvq7Aov/qQARAtgpAJ4jIrF/sTp4dknGhBBI6g8Wchq6lwCf TELwXqiJebEmW3oDs4KGMRkRt4M= --------------090508020709040606000908--