Re: [patch 10/12] entryval: @entry values even for references

Tom Tromey
2011-07-19T15:49:23Z

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> + CORE_ADDR deref_val_int;

Jan> + if (VALUE_LVAL (original_value) == lval_computed)
Jan> + {
Jan> + const struct lval_funcs *funcs;
Jan> +
Jan> + funcs = value_computed_funcs (original_value);
Jan> + if (funcs->indirect)
Jan> + {
Jan> + struct value *result = funcs->indirect (original_value);
Jan> +
Jan> + if (result)
Jan> + {
Jan> + common_val_print (result, stream, recurse,
Jan> + options, current_language);
Jan> + return 0;
Jan> + }
Jan> + }
Jan> + }

This code is repeated a few times. I think it should go into a new
function.

Jan> +struct value *
Jan> +entry_data_value_indirect (struct value *value)
Jan> +{

I think this should be static.

Jan> +static struct lval_funcs entry_data_value_funcs =

const

Tom