From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64587 invoked by alias); 24 Mar 2018 02:41:48 -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 64567 invoked by uid 89); 24 Mar 2018 02:41:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=referred, blanket X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 24 Mar 2018 02:41:45 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 43C551E4AE; Fri, 23 Mar 2018 22:41:44 -0400 (EDT) Subject: Re: [PATCH 3 PR gdb/16959] gdb hangs in infinite recursion To: Weimin Pan , gdb-patches@sourceware.org References: <1521840352-75024-1-git-send-email-weimin.pan@oracle.com> From: Simon Marchi Message-ID: <81bdfa62-48d6-b607-6ac1-d90d15021e8e@simark.ca> Date: Sat, 24 Mar 2018 02:41:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1521840352-75024-1-git-send-email-weimin.pan@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-03/txt/msg00473.txt.bz2 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. 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? > 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. 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. Also, from what I can see, Oracle has a blanket copyright assignment, so you don't need one specifically for you, is that right? Simon