From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102943 invoked by alias); 27 Mar 2018 19:54:25 -0000 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 Received: (qmail 102640 invoked by uid 89); 27 Mar 2018 19:54:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*u:6.1, H*UA:6.1, HContent-Transfer-Encoding:8bit X-HELO: aserp2120.oracle.com Received: from aserp2120.oracle.com (HELO aserp2120.oracle.com) (141.146.126.78) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Mar 2018 19:54:23 +0000 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2RJprUf011499; Tue, 27 Mar 2018 19:54:14 GMT Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2120.oracle.com with ESMTP id 2gyvg3g0bv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 27 Mar 2018 19:54:14 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w2RJsDmE005830 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 27 Mar 2018 19:54:13 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w2RJsDAP006390; Tue, 27 Mar 2018 19:54:13 GMT Received: from [10.132.97.56] (/10.132.97.56) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 27 Mar 2018 12:54:13 -0700 Subject: Re: [PATCH 4 PR gdb/16959] gdb hangs in infinite recursion To: Simon Marchi Cc: gdb-patches@sourceware.org References: <1522101276-114428-1-git-send-email-weimin.pan@oracle.com> From: Weimin Pan Message-ID: Date: Tue, 27 Mar 2018 19:54:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8845 signatures=668695 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803270190 X-SW-Source: 2018-03/txt/msg00574.txt.bz2 On 3/26/2018 8:28 PM, Simon Marchi wrote: > On 2018-03-26 17:54, Weimin Pan wrote: >> @@ -658,15 +659,14 @@ cp_print_static_field (struct type *type, >>        addr = value_address (val); >>        obstack_grow (&dont_print_statmem_obstack, (char *) &addr, >>              sizeof (CORE_ADDR)); >> -      type = check_typedef (type); >> -      cp_print_value_fields (type, value_enclosing_type (val), >> +      cp_print_value_fields (real_type, value_enclosing_type (val), > > As discussed previously, here we should pass the original type. Hi Simon, OK, just made the change to pass the original type to cp_print_value_fields() which in turn calls check_typedef() to get the real type. > > Btw, if you now have push access to the git repo, you should add > yourself in the "Write After Approval" section of the gdb/MAINTAINERS > file.  This will help you make sure everything is set up correctly.  > Don't forget to include a ChangeLog entry for it and post the patch on > the mailing list afterwards (mentioning that you have pushed it), you > can inspire yourself from how people have done it in the past. Is there any document or instructions that I can access to understand the whole process better? Thanks, Weimin > > Simon