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: [RFA] MIPS16 FP manual call/return fixes


>>>>> "Maciej" == Maciej W Rozycki <macro@codesourcery.com> writes:

Maciej>  Therefore I had to change the return handlers' internal API to
Maciej> take the value of the function being handled rather than its
Maciej> lone type, if available.  This has led to adjusting the whole
Maciej> infrastructure.

It seems reasonable to me.

I didn't try to read the MIPS part of the patch.

Maybe Jan could read the ifunc change in elfread.c.

Maciej>  # stored into the appropriate register.  This can be used when we want
Maciej>  # to force the value returned by a function (see the "return" command
Maciej>  # for instance).
Maciej> -M:enum return_value_convention:return_value:struct type *functype, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf:functype, valtype, regcache, readbuf, writebuf
Maciej> +M:enum return_value_convention:return_value:struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf:functype, valtype, regcache, readbuf, writebuf

A couple of nits here:

Update the introductory comment to refer to FUNCTION, not FUNCTYPE.

Also, please s/functype/function/ in the list of argument names (at the
end of the line).

Maciej> +	      CORE_ADDR faddr = BLOCK_START (SYMBOL_BLOCK_VALUE (a->function));
Maciej> +	      struct value *func = allocate_value (SYMBOL_TYPE (a->function));

I think read_var_value would be better here.

Maciej> +      if (thisfun != NULL)
Maciej> +	{
Maciej> +	  function = allocate_value (SYMBOL_TYPE (thisfun));
Maciej> +	  set_value_address (function,
Maciej> +			     BLOCK_START (SYMBOL_BLOCK_VALUE (thisfun)));

Here too.

Maciej> +                  func_value = allocate_value (SYMBOL_TYPE (function));
Maciej> +                  func_addr = BLOCK_START (SYMBOL_BLOCK_VALUE (function));
Maciej> +                  set_value_address (func_value, func_addr);
Maciej> +                  self_bpfinish->function_value =
Maciej> +                      value_to_value_object (func_value);

Here too.

The rest looked good to me.

Tom


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