This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3 PR gdb/16959] gdb hangs in infinite recursion
- From: Pedro Alves <palves at redhat dot com>
- To: Weimin Pan <weimin dot pan at oracle dot com>, gdb-patches at sourceware dot org
- Date: Sat, 24 Mar 2018 10:10:31 +0000
- Subject: Re: [PATCH 3 PR gdb/16959] gdb hangs in infinite recursion
- References: <1521840352-75024-1-git-send-email-weimin.pan@oracle.com>
On 03/23/2018 09:25 PM, Weimin Pan wrote:
> - if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
> + struct type *real_type = check_typedef (type);
> + if (TYPE_CODE (real_type) == TYPE_CODE_STRUCT)
> {
> CORE_ADDR *first_dont_print;
> CORE_ADDR addr;
> @@ -658,15 +659,14 @@ cp_print_static_field (struct type *type,
> addr = value_address (val);
> obstack_grow (&dont_print_statmem_obstack, (char *) &addr,
> sizeof (CORE_ADDR));
> - type = check_typedef (type);
> - cp_print_value_fields (type, value_enclosing_type (val),
> + cp_print_value_fields (real_type, value_enclosing_type (val),
This is still passing the resolved type down instead of the
original type.
Pedro Alves