From: Wei-min Pan <weimin.pan@oracle.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: Pedro Alves <palves@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 3 PR gdb/16959] gdb hangs in infinite recursion
Date: Sat, 24 Mar 2018 19:32:00 -0000 [thread overview]
Message-ID: <1fdfd913-55d2-121a-6228-8e99e3ed4619@oracle.com> (raw)
In-Reply-To: <1571cea710a01e250774e10b211672e6@polymtl.ca>
On 3/24/2018 12:23 PM, Simon Marchi wrote:
> On 2018-03-24 14:54, Wei-min Pan wrote:
>> Please note the check_typedef() call (now redundant and removed)
>> before calling cp_print_value_fields().
>> So passing the resolved type is correct.
>
> I think it's better if functions don't assume too much what other
> functions need (original type vs real type). cp_print_value_fields may
> not require the real type today, but maybe that will change one day,
> and that call will have to be changed (if we even notice it). So in
> that sense, it's better to always pass down the original type and let
> functions get the real type for their own use if they need it.
>
> Simon
The original code is like:
- Â Â Â type = check_typedef (type);
-Â Â Â Â Â cp_print_value_fields (type, value_enclosing_type (val),
So it's passing the real type. Do you think that we still need to pass
the original type?
Weimin
next prev parent reply other threads:[~2018-03-24 19:32 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
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 [this message]
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=1fdfd913-55d2-121a-6228-8e99e3ed4619@oracle.com \
--to=weimin.pan@oracle.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=simon.marchi@polymtl.ca \
/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