This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: Relax checking of garbage struct return values
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: jimb at redhat dot com
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 9 Oct 2005 22:32:16 +0200 (CEST)
- Subject: Re: RFC: Relax checking of garbage struct return values
- References: <m31x2ybkw2.fsf@alligator.red-bean.com>
> From: Jim Blandy <jimb@redhat.com>
> Date: Thu, 06 Oct 2005 10:44:29 -0700
>
> The comments are supposed to have the story. Tested on
> x86_64-pc-linux-gnu.
>
> 2005-10-05 Jim Blandy <jimb@redhat.com>
>
> * gdb.base/structs.exp (any): New function.
> (test_struct_returns): Don't make any assumptions at all about
> what value the function returns when GDB can't set the return
> value.
I remember having a discussion about this with Andrew some time ago.
I believe Andrew argued that if the compiler doesn't pass L<n> as the
buffer, this should be considered a compiler bug.
Anyway, there is another case where things fail. Some compilers use a
"static" buffer to store function values. On those systems these
tests fail too.
I think your patch is ok: gdb is not a compiler testsuite.
Mark