This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]