[PATCH 3 PR gdb/16959] gdb hangs in infinite recursion
Pedro Alves
palves@redhat.com
Sat Mar 24 10:10:00 GMT 2018
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
More information about the Gdb-patches
mailing list