Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Chris Moller <cmoller@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: PR10687 Printing c++ class with static array (of same type) can produce  infinite output
Date: Tue, 20 Apr 2010 18:27:00 -0000	[thread overview]
Message-ID: <m339yqgesa.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4BC524E8.404@redhat.com> (Chris Moller's message of "Tue, 13 Apr 	2010 22:14:00 -0400")

>>>>> "Chris" == Chris Moller <cmoller@redhat.com> writes:

Chris> Added yet another recursion detector (the third, so far as I noticed)
Chris> to cp-valprint.c.  This one detects recursing static arrays which,
Chris> although it comes unstuck in the same place as the 9067 recursing
Chris> static structs, comes unstuck in a different way and thus needs a
Chris> slightly different mechanism to detect.

Thanks.

A couple nits and then this is ok.

Chris>        addr = value_address (val);
Chris> +
Chris>        obstack_grow (&dont_print_statmem_obstack, (char *) &addr,
Chris>  		    sizeof (CORE_ADDR));
 
Chris>        CHECK_TYPEDEF (type);
Chris> +
Chris>        cp_print_value_fields (type, value_enclosing_type (val),
Chris>  			     value_contents_all (val),
Chris>  			     value_embedded_offset (val), addr,

These two newline additions seem gratuitous.

Chris> +      struct type * target_type = TYPE_TARGET_TYPE (type);

No space after the "*" here.

This is ok with those changes.  Thanks.

Tom


  reply	other threads:[~2010-04-20 18:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-14  2:14 Chris Moller
2010-04-20 18:27 ` Tom Tromey [this message]
2010-04-20 20:24   ` Chris Moller
2010-06-14 16:12 ` Ulrich Weigand

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=m339yqgesa.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=cmoller@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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