This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Allow struct 'return' on 32-bit sparc.
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: davem at davemloft dot net (David Miller)
- Cc: gdb-patches at sourceware dot org, kettenis at gnu dot org
- Date: Fri, 8 Feb 2013 19:16:39 +0100 (CET)
- Subject: 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