* gdbarch.sh: Document the return_value method. Explain that
authorJoel Brobecker <brobecker@gnat.com>
Tue, 29 Apr 2008 16:06:07 +0000 (16:06 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Tue, 29 Apr 2008 16:06:07 +0000 (16:06 +0000)
        the FUNCTYPE parameter might be NULL.
        * gdbarch.h: Regenerated.
        * sparc-tdep.c (sparc32_push_dummy_code): Do not pass the function
        type when calling using_struct_return, as this is unnecessary
        on this target.

gdb/ChangeLog
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/sparc-tdep.c

index 016a213f119c0110cfbdf7515d2f334a61af447d..35c6ceac1041ee3461f86b33a50e035fcca687d1 100644 (file)
@@ -1,3 +1,12 @@
+2008-04-29  Joel Brobecker  <brobecker@adacore.com>
+
+       * gdbarch.sh: Document the return_value method. Explain that
+       the FUNCTYPE parameter might be NULL.
+       * gdbarch.h: Regenerated.
+       * sparc-tdep.c (sparc32_push_dummy_code): Do not pass the function
+       type when calling using_struct_return, as this is unnecessary
+       on this target.
+
 2008-04-28  Joel Brobecker  <brobecker@adacore.com>
 
        * terminal.h (create_tty_session): Fix return type.
index 6b4658e19e4e8a3dbb4bc4bae8829082d295b9fc..220c2dda7c0ad04300bb26418b940c160109fa6c 100644 (file)
@@ -360,9 +360,16 @@ typedef CORE_ADDR (gdbarch_integer_to_address_ftype) (struct gdbarch *gdbarch, s
 extern CORE_ADDR gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf);
 extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_integer_to_address_ftype *integer_to_address);
 
-/* It has been suggested that this, well actually its predecessor,
-   should take the type/value of the function to be called and not the
-   return type.  This is left as an exercise for the reader. */
+/* Return the return-value convention that will be used by FUNCTYPE
+   to return a value of type VALTYPE.  FUNCTYPE may be NULL in which
+   case the return convention is computed based only on VALTYPE.
+  
+   If READBUF is not NULL, extract the return value and save it in this buffer.
+  
+   If WRITEBUF is not NULL, it contains a return value which will be
+   stored into the appropriate register.  This can be used when we want
+   to force the value returned by a function (see the "return" command
+   for instance). */
 
 extern int gdbarch_return_value_p (struct gdbarch *gdbarch);
 
index f9fee170b524302ac36f27e795281f1673d3df00..91d970e95c70e210acc3675c87495cce4afb3da8 100755 (executable)
@@ -470,10 +470,16 @@ f:CORE_ADDR:pointer_to_address:struct type *type, const gdb_byte *buf:type, buf:
 f:void:address_to_pointer:struct type *type, gdb_byte *buf, CORE_ADDR addr:type, buf, addr::unsigned_address_to_pointer::0
 M:CORE_ADDR:integer_to_address:struct type *type, const gdb_byte *buf:type, buf
 
-# It has been suggested that this, well actually its predecessor,
-# should take the type/value of the function to be called and not the
-# return type.  This is left as an exercise for the reader.
-
+# Return the return-value convention that will be used by FUNCTYPE
+# to return a value of type VALTYPE.  FUNCTYPE may be NULL in which
+# case the return convention is computed based only on VALTYPE.
+#
+# If READBUF is not NULL, extract the return value and save it in this buffer.
+#
+# If WRITEBUF is not NULL, it contains a return value which will be
+# stored into the appropriate register.  This can be used when we want
+# to force the value returned by a function (see the "return" command
+# for instance).
 M:enum return_value_convention:return_value:struct type *functype, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf:functype, valtype, regcache, readbuf, writebuf
 
 m:CORE_ADDR:skip_prologue:CORE_ADDR ip:ip:0:0
index 0140c0f65ce4049700b3946c72fa7c3ec96e275a..20f67bc809b067fac5549a8c08f81f0b2cc78173 100644 (file)
@@ -388,8 +388,7 @@ sparc32_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
   *bp_addr = sp - 4;
   *real_pc = funcaddr;
 
-  if (using_struct_return (SYMBOL_TYPE (find_pc_function (funcaddr)),
-                          value_type))
+  if (using_struct_return (NULL, value_type))
     {
       gdb_byte buf[4];
 
This page took 0.03103 seconds and 4 git commands to generate.