This is the mail archive of the gdb-patches@sources.redhat.com 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/RFC/RFA] Print in-memory struct return values


   Date: Wed, 12 May 2004 17:46:58 +0000
   From: Michael Snyder <msnyder@redhat.com>

   Mark Kettenis wrote:
   >    Date: Fri, 07 May 2004 18:35:28 -0400
   >    From: Andrew Cagney <cagney@gnu.org>
   > 
   >    > 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


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