Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Weimin Pan <weimin.pan@oracle.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 3 PR gdb/16959] gdb hangs in infinite recursion
Date: Sat, 24 Mar 2018 02:41:00 -0000	[thread overview]
Message-ID: <81bdfa62-48d6-b607-6ac1-d90d15021e8e@simark.ca> (raw)
In-Reply-To: <1521840352-75024-1-git-send-email-weimin.pan@oracle.com>

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 <http://www.gnu.org/licenses/>.
> +
> +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 = <same as static member of an already seen type>}}.*" \
> +         "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


  reply	other threads:[~2018-03-24  2:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23 21:51 Weimin Pan
2018-03-24  2:41 ` Simon Marchi [this message]
2018-03-24 19:41   ` Wei-min Pan
2018-03-24 19:51     ` Simon Marchi
2018-03-26 22:28       ` Weimin Pan
2018-03-24 10:10 ` Pedro Alves
2018-03-24 12:33   ` Simon Marchi
2018-03-24 18:56     ` Wei-min Pan
2018-03-24 19:23       ` Simon Marchi
2018-03-24 19:32         ` Wei-min Pan
2018-03-24 19:48           ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81bdfa62-48d6-b607-6ac1-d90d15021e8e@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=weimin.pan@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox