From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10598 invoked by alias); 24 Mar 2018 19:41:02 -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 10583 invoked by uid 89); 24 Mar 2018 19:41:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=fourth, doublecheck, double-check X-HELO: userp2130.oracle.com Received: from userp2130.oracle.com (HELO userp2130.oracle.com) (156.151.31.86) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 24 Mar 2018 19:41:00 +0000 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2OJdoW0086548; Sat, 24 Mar 2018 19:40:57 GMT Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2gww1ar03c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 24 Mar 2018 19:40:57 +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 w2OJetkj004750 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 24 Mar 2018 19:40:56 GMT Received: from ubhmp0019.oracle.com (ubhmp0019.oracle.com [156.151.24.72]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w2OJestO028564; Sat, 24 Mar 2018 19:40:55 GMT Received: from [10.159.238.237] (/10.159.238.237) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 24 Mar 2018 19:40:54 +0000 Subject: Re: [PATCH 3 PR gdb/16959] gdb hangs in infinite recursion To: Simon Marchi , gdb-patches@sourceware.org References: <1521840352-75024-1-git-send-email-weimin.pan@oracle.com> <81bdfa62-48d6-b607-6ac1-d90d15021e8e@simark.ca> From: Wei-min Pan Message-ID: <4e6f1943-b264-79e7-8c6e-de7ade496c8f@oracle.com> Date: Sat, 24 Mar 2018 19:41: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: <81bdfa62-48d6-b607-6ac1-d90d15021e8e@simark.ca> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8841 signatures=668695 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 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-1803240225 X-SW-Source: 2018-03/txt/msg00491.txt.bz2 HI Simon, On 3/23/2018 7:41 PM, Simon Marchi wrote: > Hi Weimin, > > The commit title should state what the patch does/changes, not what the problem > is. So it could be "Fix infinite recursion when printing static type", or > something like that. I see, done. > Also, when applying your patch, I get this: > > .git/rebase-apply/patch:20: trailing whitespace. > * cp-valprint.c: (cp_print_static_field) Use check_typedef() to get > .git/rebase-apply/patch:21: trailing whitespace. > static member's real type for TYPE_CODE_STRUCT and TYPE_CODE_ARRAY > .git/rebase-apply/patch:22: trailing whitespace. > comparisons. > .git/rebase-apply/patch:112: new blank line at EOF. > + > warning: 4 lines add whitespace errors. > > > Could you fix those? I have fixed the first three warnings which complained the trailing whitespace but couldn't figure out what caused the fourth one - new blank line at EOF? >> diff --git a/gdb/testsuite/gdb.cp/static-typedef-print.exp b/gdb/testsuite/gdb.cp/static-typedef-print.exp >> new file mode 100644 >> index 0000000..e0da0c9 >> --- /dev/null >> +++ b/gdb/testsuite/gdb.cp/static-typedef-print.exp >> @@ -0,0 +1,40 @@ >> +# Copyright 2018 Free Software Foundation, Inc. >> + >> +# This program is free software; you can redistribute it and/or modify >> +# it under the terms of the GNU General Public License as published by >> +# the Free Software Foundation; either version 3 of the License, or >> +# (at your option) any later version. >> +# >> +# This program is distributed in the hope that it will be useful, >> +# but WITHOUT ANY WARRANTY; without even the implied warranty of >> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> +# GNU General Public License for more details. >> +# >> +# You should have received a copy of the GNU General Public License >> +# along with this program. If not, see . >> + >> +if { [skip_cplus_tests] } { continue } >> + >> +standard_testfile .cc >> + >> +if [get_compiler_info "c++"] { >> + return -1 >> +} >> + >> +if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { >> + return -1 >> +} >> + >> +clean_restart $testfile >> + >> +if ![runto_main] { >> + untested "could not run to main" >> + return -1 >> +} >> + >> +gdb_test "print a" \ >> + "static INSTANCE = }}.*" \ >> + "print static member" >> + >> +gdb_exit >> +return 0 > You can remove these last two lines. Done. > Some boring administrative stuff: > > If you plan on submitting more patches, it would be a good idea for you to have > an account on sourceware.org, so that you can push your patches once they are > approved. If so, you can use the following form to request an account: > > https://sourceware.org/cgi-bin/pdw/ps_form.cgi > > You can put me as the person that referred you. Will give it a try. Thanks. > > Also, from what I can see, Oracle has a blanket copyright assignment, so you > don't need one specifically for you, is that right? I think that's correct. Will double-check. Weimin > > Simon