[PATCH 3 PR gdb/16959] gdb hangs in infinite recursion
Wei-min Pan
weimin.pan@oracle.com
Sat Mar 24 19:32:00 GMT 2018
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
More information about the Gdb-patches
mailing list