This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 10/12] entryval: @entry values even for references
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 19 Jul 2011 09:49:01 -0600
- Subject: Re: [patch 10/12] entryval: @entry values even for references
- References: <20110718202224.GK30496@host1.jankratochvil.net>
>>>>> "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