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] Allow struct 'return' on 32-bit sparc.


David Miller wrote:

>  void
>  return_command (char *retval_exp, int from_tty)
>  {
> +  enum return_value_convention rv_conv;
>    struct frame_info *thisframe;
>    struct gdbarch *gdbarch;
>    struct symbol *thisfun;

This gives me:

cc1: warnings being treated as errors
/home/kwerner/dailybuild/spu-tc-2013-02-08/gdb-head/src/gdb/stack.c: In function 'return_command':
/home/kwerner/dailybuild/spu-tc-2013-02-08/gdb-head/src/gdb/stack.c:2281: warning: 'rv_conv' may be used uninitialized in this function

when building with GCC 4.1.2 (as of RHEL5).

> @@ -2327,6 +2328,7 @@ return_command (char *retval_exp, int from_tty)
>        if (thisfun != NULL)
>  	function = read_var_value (thisfun, thisframe);
>  
> +      rv_conv = RETURN_VALUE_REGISTER_CONVENTION;
>        if (TYPE_CODE (return_type) == TYPE_CODE_VOID)
>  	/* If the return-type is "void", don't try to find the
>             return-value's location.  However, do still evaluate the

Maybe just move this up to the definition?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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