From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Kettenis To: msnyder@redhat.com Cc: cagney@gnu.org, gdb-patches@sources.redhat.com Subject: Re: [PATCH/RFC/RFA] Print in-memory struct return values Date: Sat, 15 May 2004 21:26:00 -0000 Message-id: <200405152125.i4FLPr7E000952@elgar.kettenis.dyndns.org> References: <200405071707.i47H7kG5071172@elgar.kettenis.dyndns.org> <409C0F30.4090409@gnu.org> <200405081958.i48Jw3dm000345@elgar.kettenis.dyndns.org> <40A26312.7060109@redhat.com> X-SW-Source: 2004-05/msg00450.html Date: Wed, 12 May 2004 17:46:58 +0000 From: Michael Snyder Mark Kettenis wrote: > Date: Fri, 07 May 2004 18:35:28 -0400 > From: Andrew Cagney > > > The current GDB doesn't print the return value when using `finish' for > > functions return structures that are not returned in registers. Note > > that this is a regression from GDB 6.0 for many systems. Anyway, the > > attached patch provides a way to fix this, and adds the necessary > > support to the i386 target. > > > > If there are no comments, I'll check this in in a few days. Eli, is > > the doc bit OK? > > Why not add another member to `enum return_value_convention' so that > return_value() can directly differentate between these two cases? > > I called the new member RETURN_VALUE_ADDRESS_CONVENTION. I'm not > really satisfied with that name, but I couldn't think of something > better. RETURN_VALUE_BY_REFERENCE? This is, in effect, an invisible reference variable. Well, yes. However, the patch is already in, with names that pleased Andrew a bit more. Anyway, to what extent are the m68k ABI's documented to return the structure return address in %d0 and/or %a0? For the PCC_STATIC_STRUCT_RETURN targets this is clear, but how is this for the systems where the caller is supposed to pass the memory area. Do you have access to the m68k SVR4 ABI? What does it say about this? Mark